diff options
author | Ted Gould <ted@gould.cx> | 2010-08-12 11:22:27 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-08-12 11:22:27 -0500 |
commit | 6611a36e55154bbb61742487a2781a21dde11de7 (patch) | |
tree | 8756908729c2e78a69e9b151ce86f98ecfdbb6b7 /tools/dbusmenu-dumper.c | |
parent | 9179d1be6405b5801b8ef50fb131f5ecbdeb4751 (diff) | |
parent | ce733747e2897da96f508668f39d4d92c78e5e4c (diff) | |
download | libdbusmenu-6611a36e55154bbb61742487a2781a21dde11de7.tar.gz libdbusmenu-6611a36e55154bbb61742487a2781a21dde11de7.tar.bz2 libdbusmenu-6611a36e55154bbb61742487a2781a21dde11de7.zip |
* New upstream release.
* Fixes to dbusmenu-dumper
Diffstat (limited to 'tools/dbusmenu-dumper.c')
-rw-r--r-- | tools/dbusmenu-dumper.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/dbusmenu-dumper.c b/tools/dbusmenu-dumper.c index 40ab1e1..3256f7e 100644 --- a/tools/dbusmenu-dumper.c +++ b/tools/dbusmenu-dumper.c @@ -135,13 +135,20 @@ value2string (const GValue * value, int depth) return str; } +static gint +list_str_cmp (gconstpointer a, gconstpointer b) +{ + return g_strcmp0((gchar *)a, (gchar *)b); +} + static void print_menuitem (DbusmenuMenuitem * item, int depth) { gchar * space = g_strnfill(depth, ' '); g_print("%s\"id\": %d", space, dbusmenu_menuitem_get_id(item)); - GList * properties = dbusmenu_menuitem_properties_list(item); + GList * properties_raw = dbusmenu_menuitem_properties_list(item); + GList * properties = g_list_sort(properties_raw, list_str_cmp); GList * property; for (property = properties; property != NULL; property = g_list_next(property)) { const GValue * value = dbusmenu_menuitem_property_get_value(item, (gchar *)property->data); @@ -445,12 +452,10 @@ main (int argc, char ** argv) g_printerr("ERROR: could not get the id for the pointed window\n"); return 1; } - g_debug("window: %u", (unsigned int)window); if (!init_dbus_vars_from_window(window)) { g_printerr("ERROR: could not find a menu for the pointed window\n"); return 1; } - g_debug("dbusname: %s, dbusobject: %s", dbusname, dbusobject); } else { if (dbusname == NULL) { g_printerr("ERROR: dbus-name not specified\n"); |