[Xfce4-commits] r29483 - xfconf/trunk/xfconf-query
Stephan Arts
stephan at xfce.org
Thu Feb 12 10:14:43 CET 2009
Author: stephan
Date: 2009-02-12 09:14:43 +0000 (Thu, 12 Feb 2009)
New Revision: 29483
Modified:
xfconf/trunk/xfconf-query/main.c
Log:
Revert previous change to xfconf-query, but still clean up the
g_critical assertion
Modified: xfconf/trunk/xfconf-query/main.c
===================================================================
--- xfconf/trunk/xfconf-query/main.c 2009-02-11 13:29:23 UTC (rev 29482)
+++ xfconf/trunk/xfconf-query/main.c 2009-02-12 09:14:43 UTC (rev 29483)
@@ -156,53 +156,23 @@
GSList *li;
gchar *format = verbose ? g_strdup_printf ("%%-%ds%%s\n", size + 2) : NULL;
GValue *property_value;
- gchar *string, *_string = NULL;
- gchar *str_val;
+ gchar *string;
for (li = sorted_contents; li != NULL; li = li->next)
{
if (verbose)
{
property_value = g_hash_table_lookup (channel_contents, li->data);
- if(XFCONF_TYPE_G_VALUE_ARRAY != G_VALUE_TYPE(property_value))
+
+ if (XFCONF_TYPE_G_VALUE_ARRAY != G_VALUE_TYPE (property_value))
{
string = _xfconf_string_from_gvalue (property_value);
}
else
{
- GPtrArray *arr = g_value_get_boxed(property_value);
- guint i;
- string = g_strdup ("{");
-
- for(i = 0; i < arr->len; ++i)
- {
- GValue *item_value = g_ptr_array_index(arr, i);
-
- if(item_value)
- {
- if(XFCONF_TYPE_G_VALUE_ARRAY != G_VALUE_TYPE(item_value))
- {
- str_val = _xfconf_string_from_gvalue(item_value);
- }
- else
- {
- str_val = g_strdup ("<ARRAY>");
- }
- if (i > 0)
- _string = g_strconcat (string, ",", str_val, NULL);
- else
- _string = g_strconcat (string, str_val, NULL);
-
- g_free (string);
- g_free(str_val);
- string = _string;
- }
- }
- _string = g_strconcat (string, "}", NULL);
- g_free (string);
- string = _string;
-
+ string = g_strdup ("<<UNSUPPORTED>>");
}
+
g_print (format, (gchar *) li->data, string);
g_free (string);
}
More information about the Xfce4-commits
mailing list