With Navigator for a Master Document (.odm) 2 problems (enhancements) in relation to "Insert Text" A. Context menu 1. Select "text" in Navigator (in content view). 2. Right-click and choose "Insert" Actual: "Insert" submenu shows "Text" as an active option. Expected: "Text" is "greyed out" and not active. Reason: Cannot insert text "next to" a "text" in Master document. In general, "Text" should be greyed out in Insert context menu when it is not possible to insert a "Text Field. B. Insert icon (at top panel of Master Navigator deck) Click "Insert" icon. Actual: Only shows "Text" as an option, when it is possible to insert "text" Expected: Should always show "Text" as option, but should be greyed-out, when not possible to use. (underlying UI principle: show all possible/potential actions, but grey-out and deactivate, when not applicable.)
code pointers: sw/uiconfig/swriter/ui/mastercontextmenu.ui sw/source/uibase/utlui/glbltree.cxx IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool) An "insertmenu" weld::Menu needs to be instantiated using xBuilder and then used to set the sensitivity for the insert sub menu items.
(In reply to Jim Raykowski from comment #1) > code pointers: > > sw/uiconfig/swriter/ui/mastercontextmenu.ui > > sw/source/uibase/utlui/glbltree.cxx > IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool) > > An "insertmenu" weld::Menu needs to be instantiated using xBuilder and then > used to set the sensitivity for the insert sub menu items. Wow! I don't remember leaving this pointer. While poking around for a solution to bug 155741 I ran across this and was going to report. I even made a video demo :). I *don't* repro this bug using gtk3. I *do* repro for x11 and qt5 vcl plugins. Part B. Gtk3 greys-out disabled entries while sal instance users (x11, qt5, win) hide them. The reason for this was give in: https://bugs.documentfoundation.org/show_bug.cgi?id=138246#c11 Now it's here: https://opengrok.libreoffice.org/xref/core/vcl/source/window/menu.cxx?r=b6b26421&mo=94553&fi=2875#2875
Proposed patch for part A: https://gerrit.libreoffice.org/c/core/+/156980 Proposed patch for part B: https://gerrit.libreoffice.org/c/core/+/156979
The commit message for the patch for part A was mistakenly labeled as tdf#139923. Here is the commit notification message: Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/91ca15e3f8ae13b22531745a634459a2d9b4596a tdf#139923 Part A: Master Navigator: Fix Insert popup menu It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a0955317900075371d6adb7f924af24c22f02d09 tdf#139935 Part B: Show all menu items possible/potential actions, It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thanks to Samuel Mehrbrodt for pointing out the DontHideDisabledEntry option (Menu > Tools > Options > LibreOffice > Advanced > Open Expert Configuration) which is now used by VCL PopupMenu to make disabled menu items hidden or shown greyed out.