diff options
Diffstat (limited to 'vcl/unx/gtk/window/gloactiongroup.cxx')
-rw-r--r-- | vcl/unx/gtk/window/gloactiongroup.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx index 33e756c14229..8f7d4692b851 100644 --- a/vcl/unx/gtk/window/gloactiongroup.cxx +++ b/vcl/unx/gtk/window/gloactiongroup.cxx @@ -26,7 +26,6 @@ #include <unx/gtk/gtkinst.hxx> #include <unx/gtk/gtkframe.hxx> #include <unx/gtk/gtksalmenu.hxx> -#include <vcl/menu.hxx> /* @@ -218,20 +217,13 @@ g_lo_action_group_activate (GActionGroup *group, GtkSalFrame *pFrame = lo_group->priv->frame; - if ( pFrame == NULL ) - return; - - GtkSalMenu* pSalMenu = static_cast< GtkSalMenu* >( pFrame->GetMenu() ); - - if ( pSalMenu == NULL ) - return; - - GtkSalMenu* pSalSubMenu = pSalMenu->GetMenuForItemCommand( (gchar*) action_name ); - Menu* pSubMenu = ( pSalMenu != NULL ) ? pSalSubMenu->GetMenu() : NULL; - - MenuBar* pMenuBar = static_cast< MenuBar* >( pSalMenu->GetMenu() ); + if ( pFrame != NULL ) + { + GtkSalMenu* pSalMenu = static_cast< GtkSalMenu* >( pFrame->GetMenu() ); - pMenuBar->HandleMenuCommandEvent( pSubMenu, action->item_id ); + if ( pSalMenu != NULL ) + pSalMenu->DispatchCommand( action->item_id, action_name ); + } } void |