diff options
author | Stephan Arts <stephan@xfce.org> | 2009-02-12 09:14:43 +0000 |
---|---|---|
committer | Stephan Arts <stephan@xfce.org> | 2009-02-12 09:14:43 +0000 |
commit | a34fc95a28ea3c5071a6a3db929d285534358888 (patch) | |
tree | 89aba093a198b710de9d739324e3a9c2563ed836 /xfconf-query | |
parent | 812970cdbc79a06f045569294062aac3c250664c (diff) | |
download | xfconf-a34fc95a28ea3c5071a6a3db929d285534358888.tar.gz |
Revert previous change to xfconf-query, but still clean up the
g_critical assertion
(Old svn revision: 29483)
Diffstat (limited to 'xfconf-query')
-rw-r--r-- | xfconf-query/main.c | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/xfconf-query/main.c b/xfconf-query/main.c index bc3970e..e4e0dfa 100644 --- a/xfconf-query/main.c +++ b/xfconf-query/main.c @@ -156,53 +156,23 @@ xfconf_query_list_contents (GSList *sorted_contents, GHashTable *channel_content 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); } |