A11yStatus: fix resetting the GTK and icon themes

If the Shell is started with HighContrast enabled, it will never
see another value for the GSettings keys. In that case, we just
reset to the default.

https://bugzilla.gnome.org/show_bug.cgi?id=642641
This commit is contained in:
Giovanni Campagna 2011-02-18 16:15:35 +01:00
parent 0064ca3582
commit a4d3a57a1c

View File

@ -168,9 +168,12 @@ ATIndicator.prototype = {
if (enabled) { if (enabled) {
settings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME); settings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
settings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME); settings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
} else { } else if(!hasHC) {
settings.set_string(KEY_GTK_THEME, gtkTheme); settings.set_string(KEY_GTK_THEME, gtkTheme);
settings.set_string(KEY_ICON_THEME, iconTheme); settings.set_string(KEY_ICON_THEME, iconTheme);
} else {
settings.reset(KEY_GTK_THEME);
settings.reset(KEY_ICON_THEME);
} }
}); });
settings.connect('changed::' + KEY_GTK_THEME, function() { settings.connect('changed::' + KEY_GTK_THEME, function() {