aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-06-30 23:56:13 -0500
committerTed Gould <ted@canonical.com>2009-06-30 23:56:13 -0500
commitee4d58a3a1a25f1264df9c9732a480e1f436790f (patch)
treebe2255ee3ba8528d37a4bbda2d59ef96fdd9f2d0
parent42644e5fb655c101d553773a29050323d1711a7e (diff)
downloadayatana-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.
-rw-r--r--src/users-service.c13
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);