aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-06-28 11:14:28 -0500
committerTed Gould <ted@gould.cx>2010-06-28 11:14:28 -0500
commitb13fe82d9d489e0c77cd4e8a9e09fce934d40865 (patch)
treee58a641ac3c4fad66c86586ec25eae08d3877623 /tools
parente7ef77f7498d95f1f752aaca73f2dfdd935a0f44 (diff)
downloadlibdbusmenu-b13fe82d9d489e0c77cd4e8a9e09fce934d40865.tar.gz
libdbusmenu-b13fe82d9d489e0c77cd4e8a9e09fce934d40865.tar.bz2
libdbusmenu-b13fe82d9d489e0c77cd4e8a9e09fce934d40865.zip
Giving the depth as well so this can look nice.
Diffstat (limited to 'tools')
-rw-r--r--tools/dbusmenu-dumper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c
index 38284b1..5790828 100644
--- a/tools/dbusmenu-dumper.c
+++ b/tools/dbusmenu-dumper.c
@@ -30,7 +30,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
static GMainLoop * mainloop = NULL;
static gchar *
-collection_dumper (const GValue * value)
+collection_dumper (const GValue * value, int depth)
{
return g_strdup("<collection>");
}
@@ -47,7 +47,7 @@ print_menuitem (DbusmenuMenuitem * item, int depth)
const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data);
gchar * str = NULL;
if (dbus_g_type_is_collection(G_VALUE_TYPE(value))) {
- str = collection_dumper(value);
+ str = collection_dumper(value, depth + g_utf8_strlen((gchar *)property->data, -1) + 2);
} else {
str = g_strdup_value_contents(value);
}