summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-22 20:57:52 +0000
committerAndras Timar <andras.timar@collabora.com>2016-06-16 12:52:01 +0200
commit8b39330497f80c09e0a8e9f0f87b6fa94a09cdde (patch)
tree32475ed6370595285707a32c1afb6b4dbeffc295 /vcl/source/window
parente47cf7f2795045c70fdc38e6063d7662b8f0e575 (diff)
gtk3: some changes towards enabling native gtk3 popup menus
these menubar things can be menu things and can then do away with the casting, no logic changes intended Change-Id: Ibb1b5354d5e1483327f172d6890e134f1e4b9ee4
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/menu.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 3a6e54c67f03..6a9670ce1dad 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2673,14 +2673,13 @@ void MenuBar::SelectItem(sal_uInt16 nId)
}
// handler for native menu selection and command events
-
-bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
+bool Menu::HandleMenuActivateEvent( Menu *pMenu ) const
{
if( pMenu )
{
ImplMenuDelData aDelData( this );
- pMenu->pStartedFrom = const_cast<MenuBar*>(this);
+ pMenu->pStartedFrom = const_cast<Menu*>(this);
pMenu->bInCallback = true;
pMenu->Activate();
@@ -2690,13 +2689,13 @@ bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
return true;
}
-bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const
+bool Menu::HandleMenuDeActivateEvent( Menu *pMenu ) const
{
if( pMenu )
{
ImplMenuDelData aDelData( this );
- pMenu->pStartedFrom = const_cast<MenuBar*>(this);
+ pMenu->pStartedFrom = const_cast<Menu*>(this);
pMenu->bInCallback = true;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
@@ -2729,14 +2728,14 @@ bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventI
return false;
}
-bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const
+bool Menu::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const
{
if( !pMenu )
- pMenu = const_cast<MenuBar*>(this)->ImplFindMenu(nCommandEventId);
+ pMenu = const_cast<Menu*>(this)->ImplFindMenu(nCommandEventId);
if( pMenu )
{
pMenu->nSelectedId = nCommandEventId;
- pMenu->pStartedFrom = const_cast<MenuBar*>(this);
+ pMenu->pStartedFrom = const_cast<Menu*>(this);
pMenu->ImplSelect();
return true;
}