From e7ef77f7498d95f1f752aaca73f2dfdd935a0f44 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 11:07:31 -0500 Subject: Splitting out the collection printing. --- tools/dbusmenu-dumper.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c index 68a21d9..38284b1 100644 --- a/tools/dbusmenu-dumper.c +++ b/tools/dbusmenu-dumper.c @@ -25,8 +25,16 @@ with this program. If not, see . #include #include +#include + static GMainLoop * mainloop = NULL; +static gchar * +collection_dumper (const GValue * value) +{ + return g_strdup(""); +} + static void print_menuitem (DbusmenuMenuitem * item, int depth) { @@ -37,7 +45,12 @@ print_menuitem (DbusmenuMenuitem * item, int depth) GList * property; for (property = properties; property != NULL; property = g_list_next(property)) { const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data); - gchar * str = g_strdup_value_contents(value); + gchar * str = NULL; + if (dbus_g_type_is_collection(G_VALUE_TYPE(value))) { + str = collection_dumper(value); + } else { + str = g_strdup_value_contents(value); + } g_print(",\n%s\"%s\": %s", space, (gchar *)property->data, str); g_free(str); } -- cgit v1.2.3