aboutsummaryrefslogtreecommitdiff
path: root/src/users-service.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-09-24 16:54:11 -0500
committerTed Gould <ted@canonical.com>2009-09-24 16:54:11 -0500
commit716ae457a5cd360a032c97aee4fd43190840d5d5 (patch)
treea5568d60478131b69637d097841ed8aa082e94cc /src/users-service.c
parentbb052d981e1c77e0501ada0cf8af4cc1c2ca3e47 (diff)
parente34203e970f15486db3ff3549496079b470fbfb4 (diff)
downloadayatana-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.c13
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"));