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 405210 - problems with the color theme implementation
problems with the color theme implementation
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] theme-manager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Thomas Wood
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-07 02:34 UTC by Matthias Clasen
Modified: 2007-02-10 23:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for color theme handling (4.20 KB, patch)
2007-02-07 02:34 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2007-02-07 02:34:13 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.
Comment 1 Matthias Clasen 2007-02-07 02:34:56 UTC
Created attachment 82060 [details] [review]
patch for color theme handling
Comment 2 Thomas Wood 2007-02-07 20:11:04 UTC
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 :-)
Comment 3 Thomas Wood 2007-02-08 00:25:38 UTC
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.
Comment 4 Thomas Wood 2007-02-10 23:02:18 UTC
Oops, forgot to close.