This is split off from bug 104382 only for GTK3 With the patch https://gerrit.libreoffice.org/c/core/+/154938 applied, the submenus with only disabled menus are not disabled themselves when using GTK3 backend. The patch works with gen/qt5/win backends, but not with GTK3. Steps to Reproduce: 1.Open an empty document in Writer with GTK3 backend 2.Select Table menu 3.You can see Table -> Insert, Table -> Delete menus are enabled, but they have no availabla submenus, so no reason to be enabled. 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
It might be that vcl/unx/gtk3/gtksalmenu.cxx is the right place to try and implement that.
Also in Version: 24.8.0.3 (X86_64) / LibreOffice Community Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583 CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
I don't have a strong opinion on this, but this seems to go against GNOME(2) HIG: https://mbkma.github.io/gnome-2-hig-book/menus-menubar.html (the current GNOME3 ones don't really talk about menus anymore, so this is a GNOME2 copy hosted outside): > Do not disable menu titles. Allow the user to explore the menu, even though there > might be no available items on it at that time. Also FWIW e.g. GIMP2 does not disable parent menus even when all items in them are disabled, e.g. Image -> Mode when no image is open, among many many others.