diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 11:48:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-28 12:22:52 +0100 |
commit | 94af3da7e11e82c4ed2d59655e246b5201c18709 (patch) | |
tree | a5c07d6b7d0d9420722b4112dc36820fea11a81c /vcl | |
parent | 6dc8f25ecf676a2e4d1a1018b729fef4096df8e7 (diff) |
rename and explain the MENUBUTTON_MENUMODE_TIMED stuff
Change-Id: Ifc6ddfb0cc249e537c01f28bab84b42c6b1577d9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/menubtn.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index c2c099cf80b9..26241a25e4a3 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -33,7 +33,7 @@ void MenuButton::ImplInitMenuButtonData() mpMenuTimer = nullptr; mpMenu = nullptr; mnCurItemId = 0; - mnMenuMode = 0; + mbDelayMenu = false; } void MenuButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) @@ -105,7 +105,7 @@ IMPL_LINK_NOARG(MenuButton, ImplMenuTimeoutHdl, Timer *, void) void MenuButton::MouseButtonDown( const MouseEvent& rMEvt ) { bool bExecute = true; - if ( mnMenuMode & MENUBUTTON_MENUMODE_TIMED ) + if (mbDelayMenu) { // If the separated dropdown symbol is not hit, delay the popup execution if( mnDDStyle != PushButtonDropdownStyle::MenuButton || // no separator at all @@ -141,7 +141,7 @@ void MenuButton::KeyInput( const KeyEvent& rKEvt ) sal_uInt16 nCode = aKeyCode.GetCode(); if ( (nCode == KEY_DOWN) && aKeyCode.IsMod2() ) ExecuteMenu(); - else if ( !(mnMenuMode & MENUBUTTON_MENUMODE_TIMED) && + else if ( !mbDelayMenu && !aKeyCode.GetModifier() && ((nCode == KEY_RETURN) || (nCode == KEY_SPACE)) ) ExecuteMenu(); |