[Xfce4-commits] [xfce/xfce4-panel] 06/08: panel-plugin-external: fix deprecated GdkScreen and GdkColor

noreply at xfce.org noreply at xfce.org
Fri May 4 00:47:36 CEST 2018


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit 4e20bf33350d04056f1f101d65d03354b4abe3c2
Author: Jason Zaman <jason at perfinion.com>
Date:   Tue Apr 24 11:38:11 2018 +0800

    panel-plugin-external: fix deprecated GdkScreen and GdkColor
    
    port to GdkDisplay and GdkRGBA instead
    
    Signed-off-by: Jason Zaman <jason at perfinion.com>
---
 panel/panel-plugin-external-46.c | 4 ++--
 panel/panel-plugin-external.c    | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/panel/panel-plugin-external-46.c b/panel/panel-plugin-external-46.c
index 9ccf313..faf7a07 100644
--- a/panel/panel-plugin-external-46.c
+++ b/panel/panel-plugin-external-46.c
@@ -257,7 +257,7 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
   GSList                *li;
   XEvent                 event;
   PluginProperty        *property;
-  GdkColor               color = { 0, };
+  GdkRGBA                color;
   GdkWindow             *window;
 
   panel_return_if_fail (PANEL_IS_PLUGIN_EXTERNAL_46 (external));
@@ -296,7 +296,7 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
           break;
 
         case PROVIDER_PROP_TYPE_SET_BACKGROUND_COLOR:
-          if (gdk_color_parse (g_value_get_string (&property->value), &color))
+          if (gdk_rgba_parse (&color, g_value_get_string (&property->value)))
             {
               event.xclient.data.s[1] = color.red;
               event.xclient.data.s[2] = color.green;
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index 2936d2f..4958206 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -496,14 +496,13 @@ static void
 panel_plugin_external_child_spawn_child_setup (gpointer data)
 {
   PanelPluginExternal *external = PANEL_PLUGIN_EXTERNAL (data);
-  GdkScreen           *screen;
-  gchar               *name;
+  GdkDisplay          *display;
+  const gchar         *name;
 
   /* this is what gdk_spawn_on_screen does */
-  screen = gtk_widget_get_screen (GTK_WIDGET (external));
-  name = gdk_screen_make_display_name (screen);
+  display = gtk_widget_get_display (GTK_WIDGET (external));
+  name = gdk_display_get_name (display);
   g_setenv ("DISPLAY", name, TRUE);
-  g_free (name);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list