Bug 156497 - GTK3 Disabled menu items are not hidden in DontHideDisabledEntry = false mode
Summary: GTK3 Disabled menu items are not hidden in DontHideDisabledEntry = false mode
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks: Main-Menu GTK3
  Show dependency treegraph
 
Reported: 2023-07-27 16:52 UTC by Gabor Kelemen (allotropia)
Modified: 2023-09-19 13:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-07-27 16:52:54 UTC
If the config key DontHideDisabledEntry is set to false and GTK3 vclplug is used, the disabled menu entries are not hidden from the menus.
This works fine with the gen and win backends.

1. Go to Options - Special
2. Search for the DontHideDisabledEntry config key, set it to false
3. Restart LO with the GTK3 backend
4. Open the menus with an empty Writer document
-> menus contain disabled grey entries

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 851f0dc7cd85eb146b205027cadc8decce0e5bed
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: hu-HU
Calc: threaded
Comment 1 Caolán McNamara 2023-07-28 11:01:26 UTC
vcl/unx/gtk3/gtksalmenu.cxx might be the place to look for this one too
Comment 2 Julien Nabet 2023-08-01 12:11:20 UTC
Perhaps doing a similar test as https://opengrok.libreoffice.org/xref/core/vcl/qt5/QtMenu.cxx?r=447b9196#480
479 = bool(pMenuBar->GetMenuFlags() & MenuFlags::AlwaysShowDisabledEntries)
480 || !bool(pMenuBar->GetMenuFlags() & MenuFlags::HideDisabledEntries);

in https://opengrok.libreoffice.org/xref/core/vcl/unx/gtk3/gtksalmenu.cxx?r=41a3620e#398
398 bAlwaysShowDisabledEntries = bool(mpVCLMenu->GetMenuFlags() & MenuFlags::AlwaysShowDisabledEntries);
Comment 3 Julien Nabet 2023-08-01 18:09:31 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/155197
Comment 4 Julien Nabet 2023-09-19 13:36:53 UTC
Fixed in master with:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=dedf098e742550622cec6fdc639550371d9e58cf
(sorry I forgot to put the tdf# in description)