[gtk+] gtk: Avoid using gdk_screen_get_setting



commit e821c2fc2f409c65f762fc3274c05b56f733ac37
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 30 16:50:41 2017 -0400

    gtk: Avoid using gdk_screen_get_setting
    
    We can get the setting from the display instead.

 gtk/gtkapplication-dbus.c |    2 +-
 gtk/gtkmodules.c          |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c
index be88565..febb76d 100644
--- a/gtk/gtkapplication-dbus.c
+++ b/gtk/gtkapplication-dbus.c
@@ -284,7 +284,7 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
       GValue value = G_VALUE_INIT;
 
       g_value_init (&value, G_TYPE_STRING);
-      gdk_screen_get_setting (gdk_screen_get_default (), "gtk-session-bus-id", &value);
+      gdk_display_get_setting (gdk_display_get_default (), "gtk-session-bus-id", &value);
       id = g_value_get_string (&value);
 
       if (id && id[0])
diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index e05ffd3..a5dd189 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -476,7 +476,6 @@ display_opened_cb (GdkDisplayManager *display_manager,
 {
   GValue value = G_VALUE_INIT;
   GSList *slist;
-  GdkScreen *screen;
   GtkSettings *settings;
 
   for (slist = gtk_modules; slist; slist = slist->next)
@@ -489,13 +488,12 @@ display_opened_cb (GdkDisplayManager *display_manager,
            (* info->display_init_func) (display);
        }
     }
-  
+
   g_value_init (&value, G_TYPE_STRING);
-  screen = gdk_display_get_default_screen (display);
 
-  if (gdk_screen_get_setting (screen, "gtk-modules", &value))
+  if (gdk_display_get_setting (display, "gtk-modules", &value))
     {
-      settings = gtk_settings_get_for_screen (screen);
+      settings = gtk_settings_get_for_display (display);
       _gtk_modules_settings_changed (settings, g_value_get_string (&value));
       g_value_unset (&value);
     }


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