Fixes #1363.
Similar to #1750, this disables pref widgets that are overridden by an open project. (It doesn't disable the frame label). Instead of editing a translatable label, this adds an info image next to the frame/widget label. A tooltip is set to show when the mouse is over the label or the image. This doesn't try to change the tooltip for disabled widgets, I didn't find a way to implement that easily and cleanly.
![image](https://user-images.githubusercontent.com/1107820/65428866-103ec100-de0d-11e...)
This approach can also be used to indicate which prefs are overridden by document-specific settings.
ATM this only affects the 'Saving files' prefs, but I can add the others.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2316
-- Commit Summary --
* Prefs dialog: Disable overridden pref widgets when project is open
-- File Changes --
M data/geany.glade (32) M src/prefs.c (9)
-- Patch Links --
https://github.com/geany/geany/pull/2316.patch https://github.com/geany/geany/pull/2316.diff
Looks like a nice solution to me. Should you hint more directly in the tooltip that the user should look at Project>Properties? e.g. "These preferences can be overridden by project properties"
Is it possible to still allow editing the preferences, but to put a "warning" icon next to the preference to tell the user that the setting _is_ overridden? Like "Warning: this setting is overridden in the project preferences and will not have effect" or such.
If you actually want to change the normal preference, it would be annoying to have to close the project, tick the checkbox, and then re-open the project, IMO.
Looks a good idea.
Whilst @codebrainz has a point, that minor inconvenience seems acceptable given that even if the user could edit a "normal" preference it will have no effect until the project is closed anyway.
What about something like this?
![geany_project_override](https://user-images.githubusercontent.com/181177/65471423-e218ab80-de23-11e9...)
@ntrel pushed 1 commit.
509f716955a59b8bcc87e27207f8c98f07be9b15 Tweak tooltip text & allow clicking icon to enable overridden widgets
@codebrainz I think it's best not to add a 2-line label for every pref overridden. As a project setting might override a single pref widget, not just groups of pref dialog widgets, this could get messy.
I've implemented clicking the info icon to enable all overridden pref widgets until the dialog is closed. (It requires packing the GtkImage in an event box, but I expect we can just copy & paste in Glade). The tooltip stays the same whether a project is open or not, to save updating tooltips and adding another translation message. Screenshot:
![image](https://user-images.githubusercontent.com/1107820/65522480-b8728980-dee2-11e...)
Seems OK yeah. Probably before this PR is merged the docs should be updated to explain these icons/behaviours and why they exist.
----
I guess it's outside the scope of the PR, but in the long run I think it would be better to come up with a better designed, more holistic approach to settings that doesn't confuse users or require adding all these little icons/labels/special cases everywhere.
+1 for Dirk Gently's holistic settings system [with apologies to Douglas Adams].
@ntrel pushed 1 commit.
32f99badc0db3a99285ad359d341aa86b98a22c9 Add info icons for other overridden project prefs
@ntrel pushed 1 commit.
48e24553bea346e4f717a6c0eddcd71c94bf5482 [docs] Describe info icons for Preferences
I've now done the same for all preferences overridden by a project.
the docs should be updated to explain these icons/behaviours and why they exist.
Now done.
I'm not a huge fan of using an icon and tooltip as the UI since it's not very obvious or keyboard friendly, but still it's better than the current no UI.
@codebrainz
it's not very obvious or keyboard friendly, but it's still better than the current no UI.
I think hovering over the info icon is intuitive. I agree clicking the icon is unusual and has no keyboard option. I also wondered about having an 'Advanced' checkbox as the action widget of the prefs notebook, which enables/disables editing for overridden project prefs, and also enables/disables the Various prefs tab.
github-comments@lists.geany.org