[Xfce4-commits] [xfce/xfce4-panel] 20/24: Fix RemoteEvent signal on both panel and wrapper side

noreply at xfce.org noreply at xfce.org
Tue Jul 4 00:03:51 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 28fba673319798202a1edaf15b8cdc0f6b8adaa1
Author: Ali Abdallah <ali at xfce.org>
Date:   Thu Jun 29 09:15:53 2017 +0200

    Fix RemoteEvent signal on both panel and wrapper side
---
 panel/panel-plugin-external-wrapper.c | 7 +++----
 wrapper/main.c                        | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/panel/panel-plugin-external-wrapper.c b/panel/panel-plugin-external-wrapper.c
index 6dea564..baf4207 100644
--- a/panel/panel-plugin-external-wrapper.c
+++ b/panel/panel-plugin-external-wrapper.c
@@ -354,12 +354,11 @@ panel_plugin_external_wrapper_remote_event (PanelPluginExternal *external,
 
   if (value == NULL)
     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);
   else
-    variant = panel_plugin_external_wrapper_gvalue_prop_to_gvariant (value);
-
-  if (G_UNLIKELY (variant == NULL))
     {
-      g_warning ("Failed to convert gvalue to gvariant for remote event signal");
+      g_warning ("Unexpected value of type: %s", G_VALUE_TYPE_NAME(value));
       variant = g_variant_new_byte ('\0');
     }
 
diff --git a/wrapper/main.c b/wrapper/main.c
index 1e403d2..593d8ed 100644
--- a/wrapper/main.c
+++ b/wrapper/main.c
@@ -198,7 +198,7 @@ wrapper_gproxy_remote_event (XfcePanelPluginProvider *provider,
 
   if (G_LIKELY (g_variant_is_of_type (parameters, G_VARIANT_TYPE("(svu)"))))
     {
-      g_variant_get (parameters, "&sv&u", &name, &variant, &handle);
+      g_variant_get (parameters, "&svu", &name, &variant, &handle);
       if ( g_variant_is_of_type (variant, G_VARIANT_TYPE_BYTE) &&
            g_variant_get_byte (variant) == '\0')
         {

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


More information about the Xfce4-commits mailing list