This PR aims to fix issue https://github.com/geany/geany/issues/1363 by disabling overridden settings in the preferences dialog if a project is open.
It also sets the section-tooltip to an informative message when the section is disabled.
It only covers the saving-files section for now but if you like it then it can be extended to the other sections You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1750
-- Commit Summary --
* Disable Prefs/Files/Saving-files if project open
-- File Changes --
M src/prefs.c (7)
-- Patch Links --
https://github.com/geany/geany/pull/1750.patch https://github.com/geany/geany/pull/1750.diff
Ahh, the tooltip, good idea, does the tooltip appear over the whole area of the frame instead of the individual tooltips when the four checkboxes are insensitive?
Unfortunately it doesn't.
I'm not very experienced with GTK, do you know if it's possible to make it do that?
Unfortunately it doesn't.
Sad
I'm not very experienced with GTK, do you know if it's possible to make it do that?
Don't know either (other than brute force of changing all the tooltips to the same thing), lets see what the experts say.
The individual setting tooltips are set in the glade file so if I change them in the c code then I don't know if they can be reset to the default
The individual setting tooltips are set in the glade file
so if I change them in the c code then I don't know if they can be reset to the default
They can be [read](https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-toolti...), so they could be saved to be restored later
I like the approach to tell the user that some global settings will be overridden by projects to reduce confusion.
When changing tooltips, it might be easier to change the original tooltips in the Glade file by simply appending a note like "this setting might be overridden by open projects" or something like this. I guess users know when they have a project opened.
Another solution could be to show some sort of symbol, like warning sign or the like, next to those settings which can be overridden by projects in the preferences dialog. Those symbols could then have a generic tooltip.
Changing tooltips of all settings which can be overridden is probably a tedious work and might make the code less readable for little effect.
Just my 2cents.
appending a note like "this setting might be overridden by open projects" or something like this.
I guess users know when they have a project opened.
Yeah, thats easier, but the tooltip doesn't show unless the user hovers for a period, so the insensitive is important too.
Another solution could be to show some sort of symbol, like warning sign or the like,
Trouble is no symbol is an obvious "this is overridden" especially that new users will understand automatically, and its new users who need the warning the most. Thats why setting insensitive is useful, it makes the user stop and think for a moment :)
@shiftee pushed 1 commit.
dfd5dea Modify frame label to explain why it is disabled
I've pushed a change which updates the frame-label instead of the tooltip. I'm not very experienced with Glade so it may not be done the best way.
Thoughts?
![disabled](https://user-images.githubusercontent.com/1383407/36343749-190792f6-1408-11e...)
Small reminder about this
Any news on this? I think @shiftee changes would be really a helpful enhancement! :)
@shiftee not sure what your last change did looking at the image? And if you need a Glade-spurt to comment, thats not me, anybody else?
The last change adds the text **(using project settings)** after the **Saving Files** title if a project is open.
In my opinion it makes it much more obvious why the settings are disabled
The last change adds the text (using project settings) after the Saving Files title if a project is open.
In my opinion it makes it much more obvious why the settings are disabled
So obvious I missed it :wink:
Trouble is no symbol is an obvious "this is overridden" especially that new users will understand automatically,
I've started working on a pull that puts an info icon next to the frame label with a tooltip, as well as disabling overridden pref widgets.
github-comments@lists.geany.org