summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-06 13:50:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-06 13:50:41 +0100
commit945064c0b7ad4da6e215668ae7e4edb14945f00c (patch)
tree4ca5dce79cdc4ae81634af7bac618eca646c24e3 /vcl
parenttdf#70998 Termchange: Graphic->Image (diff)
downloadcore-945064c0b7ad4da6e215668ae7e4edb14945f00c.tar.gz
core-945064c0b7ad4da6e215668ae7e4edb14945f00c.zip
gtk3: getting new entries added after the menu is visible is problematic
Change-Id: Ibc2fc35c3d5315eb7d25181c2c2eba4cb5509a96
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx5
-rw-r--r--vcl/unx/gtk/gtksalmenu.cxx3
2 files changed, 3 insertions, 5 deletions
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 9bd0a77eedc7..359ac5dd963a 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -97,10 +97,7 @@ public:
void NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck );
void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName );
- void ActivateAllSubmenus()
- {
- ActivateAllSubmenus(mpVCLMenu);
- }
+ void ActivateAllSubmenus() { ActivateAllSubmenus(mpVCLMenu); }
static void DispatchCommand(const gchar* pMenuCommand);
static void Activate(const gchar* pMenuCommand);
static void Deactivate(const gchar* pMenuCommand);
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index c503234e2e15..f199f74b1aaa 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -375,7 +375,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRec
mpActionGroup = G_ACTION_GROUP(pActionGroup);
mpMenuModel = G_MENU_MODEL(g_lo_menu_new());
// Generate the main menu structure, populates mpMenuModel
- UpdateFull();
+ ActivateAllSubmenus();
GtkWidget *pWidget = gtk_menu_new_from_model(mpMenuModel);
gtk_menu_attach_to_widget(GTK_MENU(pWidget), mpFrame->getMouseEventWidget(), nullptr);
@@ -894,6 +894,7 @@ void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar)
pSalItem->mpSubMenu->Update();
}
}
+ Update();
}
void GtkSalMenu::Activate(const gchar* pCommand)