aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-28 10:54:48 -0500
committerTed Gould <ted@gould.cx>2010-06-28 10:54:48 -0500
commit62b0fccd725b4e3c7b01e39258fd64dfa1d6064d (patch)
treea17f54bc2c7599ce79c7c32a203fa79a7b69b870 /tools
parentda2663f744d60ab4ffcc0a798448a48266532d3d (diff)
downloadlibdbusmenu-62b0fccd725b4e3c7b01e39258fd64dfa1d6064d.tar.gz
libdbusmenu-62b0fccd725b4e3c7b01e39258fd64dfa1d6064d.tar.bz2
libdbusmenu-62b0fccd725b4e3c7b01e39258fd64dfa1d6064d.zip
Changing from using a transform to getting the contents
Diffstat (limited to 'tools')
-rw-r--r--tools/dbusmenu-dumper.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c
index 55d631e..68a21d9 100644
--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -36,11 +36,10 @@ 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)) {
- 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);
+ const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data);
+ gchar * str = g_strdup_value_contents(value);
+ g_print(",\n%s\"%s\": %s", space, (gchar *)property->data, str);
+ g_free(str);
}
g_list_free(properties);