diff options
author | Antonio Fernandez <antonio.fernandez@aentos.es> | 2012-10-15 11:13:35 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-11-14 13:52:56 +0100 |
commit | 097e8668a416362ed5f80c0d33888678da416f5d (patch) | |
tree | d4aecaf14c6009f3c5e5b6687df4044f06b26105 /vcl/unx/gtk/window/gtksalmenu.cxx | |
parent | ce989d9a550fdd07b0af7809935bba0c1f1ca14e (diff) |
Menu is always visible now.
Change-Id: Ia6153c6630af2b04f3b022051aa1f7c48e2bfc1e
Diffstat (limited to 'vcl/unx/gtk/window/gtksalmenu.cxx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalmenu.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx index 65ee72b9e2e0..13afb2bf912a 100644 --- a/vcl/unx/gtk/window/gtksalmenu.cxx +++ b/vcl/unx/gtk/window/gtksalmenu.cxx @@ -244,10 +244,10 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, void GtkSalMenu::UpdateNativeMenu() { SolarMutexGuard aGuard; + if( !PrepUpdate() ) return; - Menu* pVCLMenu = mpVCLMenu; GLOMenu* pLOMenu = G_LO_MENU( mpMenuModel ); GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup ); @@ -431,7 +431,7 @@ void GtkSalMenu::RemoveItem( unsigned nPos ) maItems.erase( maItems.begin() + nPos ); } -void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) +void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned ) { SolarMutexGuard aGuard; GtkSalMenuItem *pItem = static_cast< GtkSalMenuItem* >( pSalMenuItem ); @@ -455,23 +455,11 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame ) // if we had a menu on the GtkSalMenu we have to free it as we generate a // full menu anyway and we might need to reuse an existing model and // actiongroup -// if(mpMenuModel) -// { -// g_object_unref(G_OBJECT(mpMenuModel)); -// mpMenuModel = NULL; -// } - -// if(mpActionGroup) -// { -// g_object_unref(G_OBJECT(mpActionGroup)); -// mpActionGroup = NULL; -// } pFrameNonConst->SetMenu( this ); mpFrame = static_cast< const GtkSalFrame* >( pFrame ); - pFrameNonConst->EnsureAppMenuWatch(); // Clean menu model and action group if needed. - GObject* pWindow = G_OBJECT( gtk_widget_get_window( GTK_WIDGET( pFrameNonConst->getWindow() ) ) ); + GObject* pWindow = G_OBJECT( pFrameNonConst->getWindow() ); GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( pWindow, "g-lo-menubar" ) ); GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( g_object_get_data( pWindow, "g-lo-action-group" ) ); @@ -481,7 +469,6 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame ) if ( pActionGroup ) g_lo_action_group_clear( pActionGroup ); - // Generate the main menu structure. UpdateNativeMenu(); } |