[Xfce4-commits] [xfce/xfce4-panel] 22/24: Fix GVariant handling in the external wrapper

noreply at xfce.org noreply at xfce.org
Tue Jul 4 00:03:53 CEST 2017


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 6b9b5325a2db36648573e4ad92a9294ab300c558
Author: Ali Abdallah <ali at xfce.org>
Date:   Thu Jun 29 22:02:16 2017 +0200

    Fix GVariant handling in the external wrapper
    
    The GValue in wrapper_remote might already hold a GVariant,
    so use it for the signal params. Also correctly send the guint handler.
---
 panel/panel-plugin-external-wrapper.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/panel/panel-plugin-external-wrapper.c b/panel/panel-plugin-external-wrapper.c
index baf4207..0ba9292 100644
--- a/panel/panel-plugin-external-wrapper.c
+++ b/panel/panel-plugin-external-wrapper.c
@@ -353,13 +353,13 @@ panel_plugin_external_wrapper_remote_event (PanelPluginExternal *external,
   *handle = ++handle_counter;
 
   if (value == NULL)
-    variant = g_variant_new_byte ('\0');
+    variant = g_variant_new_variant (g_variant_new_byte ('\0'));
   else if (G_VALUE_TYPE(value) == G_TYPE_VARIANT)
-    variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE_VARIANT);
+    variant = g_variant_get_variant(g_value_get_variant (value));
   else
     {
       g_warning ("Unexpected value of type: %s", G_VALUE_TYPE_NAME(value));
-      variant = g_variant_new_byte ('\0');
+      variant = g_variant_new_variant (g_variant_new_byte ('\0'));
     }
 
   g_dbus_connection_emit_signal (wrapper->connection,
@@ -369,8 +369,7 @@ panel_plugin_external_wrapper_remote_event (PanelPluginExternal *external,
                                  "RemoteEvent",
                                  g_variant_new ("(svu)",
                                                 name,
-                                                g_variant_new_variant (variant),
-                                                g_variant_new_byte('\0'),
+                                                variant,
                                                 *handle),
                                  NULL);
 

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


More information about the Xfce4-commits mailing list