Skip to content

fix MenuBar setting default value

Andrey Butirsky requested to merge work/bam/fix_default_value into master

The setting is only writes now if the actual Menu Bar status is differ from the user's config setting or default value. The entry written once is no more wiped ever.

This gives us possibility to know if the user has changed the setting once. It also allows to revert to default setting explicitly.

Fixes #5

So what this actually fixes:
Suppose we have some app with Menu Bar, by default it's set to ON (if no setting exists).
If the user changed the setting to OFF and then to ON again, we consider he changed the setting explicitly and probably want it should be preserved on the app upgrades.
What happens now:
As ON is default value, it will be wiped from the config, effectively resetting the setting to default.
Now if we upgrade the app with new default setting (adding OFF to /etc/xdg/<app>rc file) - the user's setting won't be preserved, and will be set to OFF unconditionally.

How severe the problem is - I don't know, but it definitely exists.
If we want to fix it, here is patch.
If we don't - let's close this.

@aacid @nicolasfella

Edited by Andrey Butirsky

Merge request reports