[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 20 16:12:52 UTC 2019


 vcl/unx/gtk3/gtk3gtksalmenu.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ca4d7f109bcae8ff05023dc334c230cceb2f46a9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 20 10:59:39 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 20 17:11:17 2019 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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)


More information about the Libreoffice-commits mailing list