There is no way to know if the user explicitly preferred the default setting for Menu Bar etc.
When no default value for MenuBar
setting exists, it's not distinguishable if the user explicitly preferred the default setting for Menu Bar ("Enabled" is the default) or just switched the Menu Bar on. In both of these cases, existing MenuBar
setting just wiped out.
Original discussion:
plasma/plasma-desktop!1131 (comment 530237)
Quote:
So it seems we actually have a way, but in my understanding it works only if we have a default value for a key.
I just tried master Ark branch with Hamburger Menu, and it works the following way:
- every toggle of a menu leaves a corresponding entry in the
arkrc
now
(earlier, when no default value has been available, the following code presumably wiped the value withrevertToDefault("MenuBar")
when we switched the menu on:
https://lxr.kde.org/source/frameworks/kxmlgui/src/kmainwindow.cpp#0654- this gives us opportunity to delete the entry manually and thus request the default value explicitly
- it works at least when the default value exists. It's unknown if something similar possible when there is no default value available for the key
Proposal:
just remove cg.revertToDefault("MenuBar");
lines for MenuBar etc.
I personally don't understand the logic behind these lines.
If someone does understand that, please respond.
The fix:
!131 (closed)
Edited by Andrey Butirsky