diff options
author | Cody Russell <crussell@canonical.com> | 2009-09-24 16:54:11 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-24 16:54:11 -0500 |
commit | 716ae457a5cd360a032c97aee4fd43190840d5d5 (patch) | |
tree | a5568d60478131b69637d097841ed8aa082e94cc /src/users-service.c | |
parent | bb052d981e1c77e0501ada0cf8af4cc1c2ca3e47 (diff) | |
parent | e34203e970f15486db3ff3549496079b470fbfb4 (diff) | |
download | ayatana-indicator-session-716ae457a5cd360a032c97aee4fd43190840d5d5.tar.gz ayatana-indicator-session-716ae457a5cd360a032c97aee4fd43190840d5d5.tar.bz2 ayatana-indicator-session-716ae457a5cd360a032c97aee4fd43190840d5d5.zip |
Merging in Cody's branch for fixing some user issues.
Diffstat (limited to 'src/users-service.c')
-rw-r--r-- | src/users-service.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/users-service.c b/src/users-service.c index bc02084..dc11e8d 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -251,14 +251,6 @@ activate_user_session (DbusmenuMenuitem *mi, gpointer user_data) users_service_dbus_activate_user_session (service, user); } -static void -remove_menu_item (DbusmenuMenuitem *root, gpointer user_data) -{ - DbusmenuMenuitem *child = (DbusmenuMenuitem *)user_data; - - dbusmenu_menuitem_child_delete (root, child); -} - static gint compare_users_by_username (const gchar *a, const gchar *b) @@ -277,10 +269,13 @@ rebuild_items (DbusmenuMenuitem *root, GList *u; UserData *user; gboolean can_activate; + GList *children; can_activate = users_service_dbus_can_activate_session (service); - dbusmenu_menuitem_foreach (root, remove_menu_item, NULL); + children = dbusmenu_menuitem_take_children (root); + g_list_foreach (children, (GFunc)g_object_unref, NULL); + g_list_free (children); mi = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen")); |