[gtk/wip/fmuellner/deco-setting-3] wayland: Remove GNOME Classic-specific workaround



commit e72a34bf23a060073ba69aa429da40479f26e80e
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Nov 2 16:28:59 2018 +0100

    wayland: Remove GNOME Classic-specific workaround
    
    As GSettings now supports session-specific defaults, GNOME Classic
    no longer uses a separate schema and the decoration layout is always
    determined by the regular schema.
    
    This reverts commit add67b516cb6cb.
    
    https://gitlab.gnome.org/GNOME/gtk/merge_requests/400

 gdk/wayland/gdkscreen-wayland.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index 957976f137..e18f63c9ae 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -400,9 +400,6 @@ update_xft_settings (GdkScreen *screen)
     }
 }
 
-#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
-#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
-
 typedef struct _TranslationEntry TranslationEntry;
 struct _TranslationEntry {
   gboolean valid;
@@ -436,8 +433,7 @@ static TranslationEntry translations[] = {
   { FALSE, "org.gnome.desktop.sound", "input-feedback-sounds", "gtk-enable-input-feedback-sounds", 
G_TYPE_BOOLEAN, { . b = FALSE } },
   { FALSE, "org.gnome.desktop.privacy", "recent-files-max-age", "gtk-recent-files-max-age", G_TYPE_INT, { .i 
= 30 } },
   { FALSE, "org.gnome.desktop.privacy", "remember-recent-files",    "gtk-recent-files-enabled", 
G_TYPE_BOOLEAN, { .b = TRUE } },
-  { FALSE, WM_SETTINGS_SCHEMA, "button-layout",    "gtk-decoration-layout", G_TYPE_STRING, { .s = 
"menu:close" } },
-  { FALSE, CLASSIC_WM_SETTINGS_SCHEMA, "button-layout",   "gtk-decoration-layout", G_TYPE_STRING, { .s = 
"menu:close" } },
+  { FALSE, "org.gnome.desktop.wm.preferences", "button-layout",    "gtk-decoration-layout", G_TYPE_STRING, { 
.s = "menu:close" } },
   { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, 
{ .i = 0 } },
   { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 
0 } },
   { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i 
= 0 } },
@@ -632,19 +628,9 @@ set_decoration_layout_from_entry (GdkScreen        *screen,
                                   GValue           *value)
 {
   GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
-  GSettings *settings = NULL;
-  const char *session;
-
-  /* Hack: until we get session-dependent defaults in GSettings,
-   *       swap out the usual schema for the "classic" one when
-   *       running in classic mode
-   */
-  session = g_getenv ("XDG_CURRENT_DESKTOP");
-  if (session && strstr (session, "GNOME-Classic"))
-    settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, CLASSIC_WM_SETTINGS_SCHEMA);
-
-  if (settings == NULL)
-    settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, WM_SETTINGS_SCHEMA);
+  GSettings *settings;
+
+  settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, entry->schema);
 
   if (settings)
     {


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