summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-20 10:59:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-20 17:11:17 +0100
commitca4d7f109bcae8ff05023dc334c230cceb2f46a9 (patch)
treeb77f7c8fb36c2f1880aef6752e0ab9e6e56e4aba
parentd79d4b63edbca7a36d546831a7b1248b652f3afd (diff)
honour MenuFlags::AlwaysShowDisabledEntries for native gtk menus
Change-Id: I3d26320061f3da01e9b857cb3dad277f3d7aa4f5 Reviewed-on: https://gerrit.libreoffice.org/83293 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/gtk3/gtk3gtksalmenu.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 301322d8c78d..db0480e3040e 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -386,7 +386,14 @@ void GtkSalMenu::Update()
const GtkSalMenu* pMenu = this;
while (pMenu->mpParentSalMenu)
pMenu = pMenu->mpParentSalMenu;
- ImplUpdate(false, !pMenu->mbMenuBar);
+
+ bool bAlwaysShowDisabledEntries;
+ if (pMenu->mbMenuBar)
+ bAlwaysShowDisabledEntries = true;
+ else
+ bAlwaysShowDisabledEntries = bool(mpVCLMenu->GetMenuFlags() & MenuFlags::AlwaysShowDisabledEntries);
+
+ ImplUpdate(false, !bAlwaysShowDisabledEntries);
}
static void MenuPositionFunc(GtkMenu* menu, gint* x, gint* y, gboolean* push_in, gpointer user_data)