diff options
author | Ted Gould <ted@canonical.com> | 2009-06-30 23:56:13 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-06-30 23:56:13 -0500 |
commit | ee4d58a3a1a25f1264df9c9732a480e1f436790f (patch) | |
tree | be2255ee3ba8528d37a4bbda2d59ef96fdd9f2d0 /src/users-service.c | |
parent | 42644e5fb655c101d553773a29050323d1711a7e (diff) | |
download | ayatana-indicator-session-ee4d58a3a1a25f1264df9c9732a480e1f436790f.tar.gz ayatana-indicator-session-ee4d58a3a1a25f1264df9c9732a480e1f436790f.tar.bz2 ayatana-indicator-session-ee4d58a3a1a25f1264df9c9732a480e1f436790f.zip |
Moving the server to after the items makes things work better, but I'm curious why it's failing. This is more a test for dbusmenu though which'll have better debug.
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); |