[Xfce4-commits] <xfce4-panel:master> Common: Improve Xfconf property mismatch warning.

Nick Schermer noreply at xfce.org
Thu Dec 29 17:36:01 CET 2011


Updating branch refs/heads/master
         to e835c3b533d7c15e4329d83a767660b6079f147d (commit)
       from 8139a4c5532a50b1f73893bd7842e309e6022ffc (commit)

commit e835c3b533d7c15e4329d83a767660b6079f147d
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 29 12:45:15 2011 +0100

    Common: Improve Xfconf property mismatch warning.

 common/panel-xfconf.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/common/panel-xfconf.c b/common/panel-xfconf.c
index 0aee653..3916014 100644
--- a/common/panel-xfconf.c
+++ b/common/panel-xfconf.c
@@ -49,7 +49,13 @@ panel_properties_store_value (XfconfChannel *channel,
   /* check if the types match */
   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), object_property);
   panel_assert (pspec != NULL);
-  panel_assert (G_PARAM_SPEC_VALUE_TYPE (pspec) == xfconf_property_type);
+  if (G_PARAM_SPEC_VALUE_TYPE (pspec) != xfconf_property_type)
+    {
+      g_critical ("Object and Xfconf properties don't match! %s::%s. %s != %s",
+                  G_OBJECT_TYPE_NAME (object), xfconf_property,
+                  g_type_name (xfconf_property_type),
+                  g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+    }
 #endif
 
   /* write the property to the xfconf channel */


More information about the Xfce4-commits mailing list