GNOME Bugzilla – Bug 642641
"High Contrast" won't work when starting with "High Contrast" theme
Last modified: 2011-02-21 17:52:02 UTC
I'm pretty certain that the code at: http://git.gnome.org/browse/gnome-shell/tree/js/ui/status/accessibility.js#n163 will not work correctly when starting the shell with the high-contrast theme already enabled. The state of the toggle will be correct, but disabling it will try to set the theme to an unset value. Instead, when the gtkTheme value is unset, and we're disabling HighContrast it should reset the key to its original value with settings.reset(KEY_ICON_THEME). A similar problem probably applies to the iconTheme (it would never be unset from its HighContrast value).
(In reply to comment #0) <snip> > Instead, when the gtkTheme value is unset, and we're disabling HighContrast it > should reset the key to its original value with settings.reset(KEY_ICON_THEME). Make that settings.reset(KEY_GTK_THEME) (it's late).
Created attachment 181218 [details] [review] 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.
I went with something a bit more complicated in http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=abe86984c61b373a18f2edd12ba84846086b4940 The icon theme is never reset if we had a high-contrast icon theme on startup, but a non-high contrast gtk theme (so the user setting of having a high-contrast icon theme isn't clobbered). Not sure whether it's worth doing the same here.
Actually, my patch does exactly that - it will show the switch as off, and toggling it will have no effect on the icon theme (will be set to HighContrast when setting HC for gtk, then reset to HighContrast when setting the previous value to gtk).
Fine by me then.
Attachment 181218 [details] pushed as a4d3a57a