[okular] [Bug 395497] Menubar - No text - Editing the shell toolbar from Configure Toolbars sometimes corrupts shell.rc
David Hurka
bugzilla_noreply at kde.org
Mon Jun 15 11:48:26 BST 2020
https://bugs.kde.org/show_bug.cgi?id=395497
David Hurka <david.hurka at mailbox.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Menubar - No text |Menubar - No text - Editing
| |the shell toolbar from
| |Configure Toolbars
| |sometimes corrupts shell.rc
Version|1.7.0 |1.10.1
--- Comment #31 from David Hurka <david.hurka at mailbox.org> ---
This bug caught me again. I edited the toolbar several times, ant the last time
I edited it the menubar broke with “No Text”. The last edit was the first edit
which involved a Shell action, “Open Recent”.
So it appears that only editing the shell toolbar causes this bug, which
matches the previous reports, and the fact that shell.rc gets corrupted.
Additionally, all shell actions are now missing in the affected menus, which is
pretty problematic.
Interestingly, the View menu, wich holds the Fullscreen action, is not
affected. This is probably because the View menu is not specified in shell.rc
by default, but created purely automatically.
Another worrying thing is that Okular crashes at startup if shell.rc is not
well-formed.
Debugging this today wasn’t very successful. It appears that the <Menu
noMerge="1"> attribute causes the problem. Sometimes after Configure Toolbars
the shell.rc is not expanded to contain all KStandardActions, and with noMerge
they are not added automatically. The “No Text” comes from the
<Menu><Text/></Menu> tag missing, if noMerge="1" is present. Sometimes after
Configure Toolbars the shell.rc is expanded, and everything is fine.
I don’t know how to fix this now. First problem is that this bug does not
reproduce everytime. Second problem is that there are these options:
a) Prevent Configure Shortcuts from creating noMerge="1". The problem is, that
without noMerge and with all actions specified explicitely, the explicitely
specified actions and the automatically merged (?) KStandardActions kick each
other arround, and the menu becomes jumbled up.
b) Force Configure Shortcuts to expand shell.rc to include all actions and
noMerge everytime. Problem is... is there a problem? At least I don’t know how
to fix Configure Shortcuts.
c) Include all actions and noMerge in the source shell.rc. This way, Configure
Shortcuts will (theoretically) always end up with the fully expanded file.
Problem is that we will explicitely specify all action positions, so they will
not follow updates to KStandardAction, like happened with the Fullscreed
action. But at least we will know when to update the Okular docbook.
d) Remove all menu definitions from the source shell.rc. This was an experiment
by mine. It turns out that, despite the <DefineGroup/> tags are missing,
KXmlGui will automatically populate the menus in the intended way, and create
an expanded shell.rc as soon as the toolbar is edited. Because shell.rc is
empty by default, Configure Shortcuts has no other option than generating the
expanded file itself.
Our options are basically:
1) Expand the source shell.rc to include all actions and noMerge.
2) Collapse the source shell.rc to include nothing.
3) Make this an upstream bug and assign it to KXmlGui.
I prefer option 2.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list