[gnome-builder] ide-support: remove deprecated GdkScreen API



commit cd3d58342f8f01055da60bb1bcc221be750eb533
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Thu Oct 27 12:54:57 2016 +0200

    ide-support: remove deprecated GdkScreen API
    
    We instead use GdkDisplay and GdkMonitor API

 plugins/support/ide-support.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/plugins/support/ide-support.c b/plugins/support/ide-support.c
index 61f8c9f..1b78c54 100644
--- a/plugins/support/ide-support.c
+++ b/plugins/support/ide-support.c
@@ -54,6 +54,7 @@ ide_get_support_log (void)
   gchar *tmp;
   gchar **env;
   guint i;
+  GdkDisplay *display;
   guint n_monitors;
 
   str = g_string_new (NULL);
@@ -106,17 +107,20 @@ ide_get_support_log (void)
   /*
    * Log display server information.
    */
+  display = gdk_display_get_default ();
+
   g_string_append (str, "[runtime.display]\n");
-  g_string_append_printf (str, "name = \"%s\"\n",
-                          gdk_display_get_name (gdk_display_get_default ()));
-  n_monitors = gdk_screen_get_n_monitors (gdk_screen_get_default ());
+  g_string_append_printf (str, "name = \"%s\"\n", gdk_display_get_name (display));
+
+  n_monitors = gdk_display_get_n_monitors (display);
   g_string_append_printf (str, "n_monitors = %u\n", n_monitors);
   for (i = 0; i < n_monitors; i++)
     {
+      GdkMonitor *monitor;
       GdkRectangle geom;
 
-      gdk_screen_get_monitor_geometry (gdk_screen_get_default (),
-                                       i, &geom);
+      monitor = gdk_display_get_monitor (display, i);
+      gdk_monitor_get_geometry (monitor, &geom);
       g_string_append_printf (str, "geometry[%u] = [%u,%u]\n",
                               i, geom.width, geom.height);
     }


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