GNOME Bugzilla – Bug 405210
problems with the color theme implementation
Last modified: 2007-02-10 23:02:18 UTC
The code that handles color themes does the following in some places: 1) change a gconf value 2) use a gtk setting value that is derived from it to update the display This doesn't work, since the xsetting is updated asynchronously via settings-daemon and X server. Thus the theme-manager ends up using the _old_ value fo the setting for updating the display. I have seen at least 2 symptoms of this: - when resetting the colors, the buttons end up showing the previously set values, not the defaults from the rc file - when changing gtk themes back and forth, the "theme does not support color switching" text gets out of sync. The cleanest fix would be to just ignore xsettings and just update the display based on the gconf value. I can understand why the xsetting is used here, though: to get the color-scheme information out of the rc file in case the gconf key is empty/unset. The patch fixes the problem by listening for changes of the gtk setting.
Created attachment 82060 [details] [review] patch for color theme handling
Thanks Matthias. I was aware of this problem, but just hadn't figured out the best way to solve it yet. Your patch looks good, especially as I hadn't known about the "notify::foo" signals in GtkSettings. I'll try it and probably commit straight away :-)
2007-02-08 Thomas Wood <thos@gnome.org> Patch by: Matthias Clasen <mclasen@redhat.com> * gnome-theme-details.c: (gtk_theme_update_remove_button), (update_color_scheme_tab), (gtk_theme_selection_changed), (color_select), (revert_color_scheme_key), (gnome_theme_details_init), (update_color_buttons_from_string), (gnome_theme_details_update_from_gconf): Listens for changes in the gtk-color-scheme property of GtkSettings. Fixes bug 405210.
Oops, forgot to close.