diff options
Diffstat (limited to 'src/users-service.c')
-rw-r--r-- | src/users-service.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/users-service.c b/src/users-service.c index c3c842f..409a1d0 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -14,13 +14,18 @@ gchar * dummies[] = { "Bob", "Jim", "Alvin", "Mary", NULL }; -void dummy_users (void) { +static void +dummy_users (DbusmenuMenuitem * root) { int count; for (count = 0; dummies[count] != NULL; count++) { DbusmenuMenuitem * mi = dbusmenu_menuitem_new(); + g_debug("Creating item: %d %s", dbusmenu_menuitem_get_id(mi), dummies[count]); + g_debug("\tRoot ID: %d", dbusmenu_menuitem_get_id(root)); dbusmenu_menuitem_property_set(mi, "label", dummies[count]); - dbusmenu_menuitem_child_append(root_menuitem, mi); + dbusmenu_menuitem_child_add_position(root, mi, count); } + + return; } int @@ -44,6 +49,10 @@ main (int argc, char ** argv) } root_menuitem = dbusmenu_menuitem_new(); + g_debug("Root ID: %d", dbusmenu_menuitem_get_id(root_menuitem)); + + dummy_users(root_menuitem); + DbusmenuServer * server = dbusmenu_server_new(INDICATOR_USERS_DBUS_OBJECT); dbusmenu_server_set_root(server, root_menuitem); |