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 642641 - "High Contrast" won't work when starting with "High Contrast" theme
"High Contrast" won't work when starting with "High Contrast" theme
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-18 03:32 UTC by Bastien Nocera
Modified: 2011-02-21 17:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A11yStatus: fix resetting the GTK and icon themes (1.35 KB, patch)
2011-02-18 15:17 UTC, Giovanni Campagna
committed Details | Review

Description Bastien Nocera 2011-02-18 03:32:52 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).
Comment 1 Bastien Nocera 2011-02-18 03:34:56 UTC
(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).
Comment 2 Giovanni Campagna 2011-02-18 15:17:12 UTC
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.
Comment 3 Bastien Nocera 2011-02-18 15:47:48 UTC
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.
Comment 4 Giovanni Campagna 2011-02-19 13:34:06 UTC
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).
Comment 5 Bastien Nocera 2011-02-19 19:40:18 UTC
Fine by me then.
Comment 6 Giovanni Campagna 2011-02-21 17:51:48 UTC
Attachment 181218 [details] pushed as a4d3a57a