After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755008 - API to reset a gtksettings property
API to reset a gtksettings property
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 649358
 
 
Reported: 2015-09-14 19:56 UTC by Christian Persch
Modified: 2015-10-04 02:42 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Add gtk_settings_reset_property (1.78 KB, patch)
2015-09-17 23:15 UTC, Matthias Clasen
committed Details | Review
inspector: Add a reset button for settings (1.99 KB, patch)
2015-09-17 23:15 UTC, Matthias Clasen
committed Details | Review

Description Christian Persch 2015-09-14 19:56:55 UTC
(Continued from bug 507398 comment 4 .)

You can override a gtksetting property value via g_object_set(), but there is no way to reset the override so that the property again tracks the xsettings value.

This is necessary to implement a pref for 'use dark theme' in apps (e.g. gnome-terminal) without running into bug 742040 / bug 707206 (see esp. bug 707206 comment 8).
Comment 1 Matthias Clasen 2015-09-17 23:15:13 UTC
Created attachment 311587 [details] [review]
Add gtk_settings_reset_property

This api undoes an application-specific override and makes the
setting follow the system-wide values again.
Comment 2 Matthias Clasen 2015-09-17 23:15:23 UTC
Created attachment 311588 [details] [review]
inspector: Add a reset button for settings

This is exercising the new gtk_settings_reset_property api.
Comment 3 Christian Persch 2015-09-19 14:33:23 UTC
Thanks, that looks fine to me. With this, we can reintroduce the gnome-terminal use-dark-theme patch upstream (done on wip/dark-theme branch there).
Comment 4 Matthias Clasen 2015-09-19 19:54:32 UTC
I'll land this as soon as we're branching for 3.18
Comment 5 Matthias Clasen 2015-10-04 02:42:31 UTC
Attachment 311587 [details] pushed as 2f0d4b6 - Add gtk_settings_reset_property
Attachment 311588 [details] pushed as 47237dd - inspector: Add a reset button for settings