[gtk+/wip/otte/gtk4: 8/118] inspector: Use display name instead of screen name



commit 69e1646b05945135f2da7d052eeb632cb982f95b
Author: Benjamin Otte <otte redhat com>
Date:   Wed Sep 28 02:51:09 2016 +0200

    inspector: Use display name instead of screen name
    
    This is for future compatibility as they are guaranteed to be identical.

 gtk/inspector/general.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 31dd6aa..25d45a6 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -340,7 +340,6 @@ translate_subpixel_layout (GdkSubpixelLayout subpixel)
 static void
 populate_display (GdkScreen *screen, GtkInspectorGeneral *gen)
 {
-  gchar *name;
   gint i;
   GList *children, *l;
   GtkWidget *child;
@@ -362,9 +361,9 @@ populate_display (GdkScreen *screen, GtkInspectorGeneral *gen)
     }
   g_list_free (children);
 
-  name = gdk_screen_make_display_name (screen);
-  gtk_label_set_label (GTK_LABEL (gen->priv->display_name), name);
-  g_free (name);
+  display = gdk_screen_get_display (screen);
+
+  gtk_label_set_label (GTK_LABEL (gen->priv->display_name), gdk_display_get_name (display));
 
   if (gdk_screen_get_rgba_visual (screen) != NULL)
     gtk_widget_show (gen->priv->display_rgba);
@@ -372,7 +371,6 @@ populate_display (GdkScreen *screen, GtkInspectorGeneral *gen)
   if (gdk_screen_is_composited (screen))
     gtk_widget_show (gen->priv->display_composited);
 
-  display = gdk_screen_get_display (screen);
   n_monitors = gdk_display_get_n_monitors (display);
   for (i = 0; i < n_monitors; i++)
     {


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