[gnome-shell/wip/fmuellner/hicontrast-cleanup] a11y: Don't set WM theme



commit 6fc8a7036d5a139503c035b61582c4d43d9e5db0
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jan 30 23:00:35 2019 +0100

    a11y: Don't set WM theme
    
    We've been using GTK to draw server-side decorations according to
    the GTK theme for a long time, so need to configure the HighContrast
    theme for a setting we don't use.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/377

 js/ui/status/accessibility.js | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js
index 7c438cfaa..65d67cb33 100644
--- a/js/ui/status/accessibility.js
+++ b/js/ui/status/accessibility.js
@@ -29,7 +29,6 @@ const KEY_VISUAL_BELL               = 'visual-bell';
 const DESKTOP_INTERFACE_SCHEMA      = 'org.gnome.desktop.interface';
 const KEY_GTK_THEME                 = 'gtk-theme';
 const KEY_ICON_THEME                = 'icon-theme';
-const KEY_WM_THEME                  = 'theme';
 const KEY_TEXT_SCALING_FACTOR       = 'text-scaling-factor';
 
 const HIGH_CONTRAST_THEME           = 'HighContrast';
@@ -132,7 +131,6 @@ class ATIndicator extends PanelMenu.Button {
 
     _buildHCItem() {
         let interfaceSettings = new Gio.Settings({ schema_id: DESKTOP_INTERFACE_SCHEMA });
-        let wmSettings = new Gio.Settings({ schema_id: WM_SCHEMA });
         interfaceSettings.connect('changed::' + KEY_GTK_THEME, () => {
             let value = interfaceSettings.get_string(KEY_GTK_THEME);
             if (value == HIGH_CONTRAST_THEME) {
@@ -149,35 +147,25 @@ class ATIndicator extends PanelMenu.Button {
             if (value != HIGH_CONTRAST_THEME)
                 iconTheme = value;
         });
-        wmSettings.connect('changed::' + KEY_WM_THEME, () => {
-            let value = wmSettings.get_string(KEY_WM_THEME);
-            if (value != HIGH_CONTRAST_THEME)
-                wmTheme = value;
-        });
 
         let gtkTheme = interfaceSettings.get_string(KEY_GTK_THEME);
         let iconTheme = interfaceSettings.get_string(KEY_ICON_THEME);
-        let wmTheme = wmSettings.get_string(KEY_WM_THEME);
         let hasHC = (gtkTheme == HIGH_CONTRAST_THEME);
         let highContrast = this._buildItemExtended(
             _("High Contrast"),
             hasHC,
             interfaceSettings.is_writable(KEY_GTK_THEME) &&
-            interfaceSettings.is_writable(KEY_ICON_THEME) &&
-            wmSettings.is_writable(KEY_WM_THEME),
+            interfaceSettings.is_writable(KEY_ICON_THEME),
             enabled => {
                 if (enabled) {
                     interfaceSettings.set_string(KEY_GTK_THEME, HIGH_CONTRAST_THEME);
                     interfaceSettings.set_string(KEY_ICON_THEME, HIGH_CONTRAST_THEME);
-                    wmSettings.set_string(KEY_WM_THEME, HIGH_CONTRAST_THEME);
                 } else if(!hasHC) {
                     interfaceSettings.set_string(KEY_GTK_THEME, gtkTheme);
                     interfaceSettings.set_string(KEY_ICON_THEME, iconTheme);
-                    wmSettings.set_string(KEY_WM_THEME, wmTheme);
                 } else {
                     interfaceSettings.reset(KEY_GTK_THEME);
                     interfaceSettings.reset(KEY_ICON_THEME);
-                    wmSettings.reset(KEY_WM_THEME);
                 }
             });
         return highContrast;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]