diff options
author | Ted Gould <ted@gould.cx> | 2009-12-15 14:35:08 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2009-12-15 14:35:08 -0600 |
commit | b0478abc4d87214dcc19bfd1c3d101c19b2990e5 (patch) | |
tree | 48123455ef0a5111b88ceedac44464595cfa69ea | |
parent | d3ce0f4a3b2f5b087586429a5f188a494dedc6fe (diff) | |
download | libdbusmenu-b0478abc4d87214dcc19bfd1c3d101c19b2990e5.tar.gz libdbusmenu-b0478abc4d87214dcc19bfd1c3d101c19b2990e5.tar.bz2 libdbusmenu-b0478abc4d87214dcc19bfd1c3d101c19b2990e5.zip |
Transition the dumper to getting values and converting them to strings instead of only using strings.
-rw-r--r-- | tools/dbusmenu-dumper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c index 5704311..55d631e 100644 --- a/tools/dbusmenu-dumper.c +++ b/tools/dbusmenu-dumper.c @@ -36,7 +36,11 @@ print_menuitem (DbusmenuMenuitem * item, int depth) GList * properties = dbusmenu_menuitem_properties_list(item); GList * property; for (property = properties; property != NULL; property = g_list_next(property)) { - g_print(",\n%s\"%s\": \"%s\"", space, (gchar *)property->data, dbusmenu_menuitem_property_get(item, (gchar *)property->data)); + GValue value = {0}; + g_value_init(&value, G_TYPE_STRING); + g_value_transform(dbusmenu_menuitem_property_get_value(item, (gchar *)property->data), &value); + g_print(",\n%s\"%s\": \"%s\"", space, (gchar *)property->data, g_value_get_string(&value)); + g_value_unset(&value); } g_list_free(properties); |