[gnome-panel] panel-multiscreen: fix deprecated warnings



commit 9e347a8577a53d9e7a65760540e6099024aeaaa3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jul 9 17:28:40 2014 +0300

    panel-multiscreen: fix deprecated warnings

 gnome-panel/panel-multiscreen.c |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index 89623e9..9512cf3 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -450,7 +450,7 @@ panel_multiscreen_init (void)
                return;
 
        display = gdk_display_get_default ();
-       screens = gdk_display_get_n_screens (display);
+       screens = 1;
 
        panel_multiscreen_init_randr (display);
 
@@ -482,10 +482,8 @@ panel_multiscreen_init (void)
 void
 panel_multiscreen_reinit (void)
 {
-       GdkDisplay *display;
-       GList      *toplevels, *l;
-       int         new_screens;
-       int         i;
+       GdkScreen *screen;
+       GList     *toplevels, *l;
 
        if (monitors)
                g_free (monitors);
@@ -498,19 +496,8 @@ panel_multiscreen_reinit (void)
                g_free (geometries);
        }
 
-       display = gdk_display_get_default ();
-       /* Don't use the screens variable since in the future, we might
-        * want to call this function when a screen appears/disappears. */
-       new_screens = gdk_display_get_n_screens (display);
-
-       for (i = 0; i < new_screens; i++) {
-               GdkScreen *screen;
-
-               screen = gdk_display_get_screen (display, i);
-               g_signal_handlers_disconnect_by_func (screen,
-                                                     panel_multiscreen_queue_reinit,
-                                                     NULL);
-       }
+       screen = gdk_screen_get_default ();
+       g_signal_handlers_disconnect_by_func (screen, panel_multiscreen_queue_reinit, NULL);
 
        initialized = FALSE;
        panel_multiscreen_init ();


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