diff options
| author | Ted Gould <ted@gould.cx> | 2010-08-12 11:21:29 -0500 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-08-12 11:21:29 -0500 |
| commit | ce733747e2897da96f508668f39d4d92c78e5e4c (patch) | |
| tree | f41e7c13faca2812cd85e3d8eed62415ca7f89ce /tools/dbusmenu-dumper.c | |
| parent | 6d4b1a536a005c5ba42e0faadd5e55f34958b84d (diff) | |
| parent | 8985df16ddfd5cae82236b076131b69fb8d12803 (diff) | |
| download | libdbusmenu-ce733747e2897da96f508668f39d4d92c78e5e4c.tar.gz libdbusmenu-ce733747e2897da96f508668f39d4d92c78e5e4c.tar.bz2 libdbusmenu-ce733747e2897da96f508668f39d4d92c78e5e4c.zip | |
Import upstream version 0.3.10
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"); |
