diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-29 15:44:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-29 16:36:36 +0100 |
commit | f305b882868a03295f1b3108976d14354fa1553c (patch) | |
tree | 3a8060895c9da18a41329df3841147d8da747720 /vcl | |
parent | 37ada6f457e19b6ee2d2adb0b0ab3acb20705b51 (diff) |
unhook the alt handling thing from SystemWindow
so it could be used from things that aren't dialogs
Change-Id: I649c5a05ad9c0634be9cef2bbe16a4643e58fc12
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/syswin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 8e8e5fbf4c01..836bca900efe 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -129,14 +129,14 @@ void ImplHandleControlAccelerator( vcl::Window* pWindow, bool bShow ) } } -bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& rCEvent ) +bool Accelerator::ToggleMnemonicsOnHierarchy(const CommandEvent& rCEvent, vcl::Window *pWindow) { if (rCEvent.GetCommand() == CommandEventId::ModKeyChange) { - const CommandModKeyData *pCData = rCEvent.GetModKeyData (); - bool bShowAccel = pCData && pCData->IsMod2(); + const CommandModKeyData *pCData = rCEvent.GetModKeyData(); + const bool bShowAccel = pCData && pCData->IsMod2(); - Window *pGetChild = firstLogicalChildOfParent(this); + vcl::Window *pGetChild = firstLogicalChildOfParent(pWindow); while (pGetChild) { if ( pGetChild->GetType() == WINDOW_TABCONTROL ) @@ -144,7 +144,7 @@ bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& rCEvent ) // find currently shown tab page TabControl* pTabControl = static_cast<TabControl*>( pGetChild ); TabPage* pTabPage = pTabControl->GetTabPage( pTabControl->GetCurPageId() ); - vcl::Window* pTabPageChild = firstLogicalChildOfParent( pTabPage ); + vcl::Window* pTabPageChild = firstLogicalChildOfParent( pTabPage ); // and go through its children while ( pTabPageChild ) @@ -155,7 +155,7 @@ bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& rCEvent ) } ImplHandleControlAccelerator( pGetChild, bShowAccel ); - pGetChild = nextLogicalChildOfParent(this, pGetChild); + pGetChild = nextLogicalChildOfParent(pWindow, pGetChild); } return true; } @@ -187,7 +187,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt ) return true; if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) { - if (ImplHandleCmdEvent( *rNEvt.GetCommandEvent())) + if (Accelerator::ToggleMnemonicsOnHierarchy(*rNEvt.GetCommandEvent(), this)) return true; } } |