aboutsummaryrefslogtreecommitdiff
path: root/src/users-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-24 12:13:26 -0500
committerTed Gould <ted@canonical.com>2009-09-24 12:13:26 -0500
commite4398b948762de8e819d9a637c8a186936463724 (patch)
tree47f25da3206a97f30725b0ce20c5f4cf62e940ff /src/users-service.c
parentbfecae8b0c5f3586b21b769d872b339a4cb91690 (diff)
parent56e6098d53797aefa680c49e69560011aa57101a (diff)
downloadayatana-indicator-session-e4398b948762de8e819d9a637c8a186936463724.tar.gz
ayatana-indicator-session-e4398b948762de8e819d9a637c8a186936463724.tar.bz2
ayatana-indicator-session-e4398b948762de8e819d9a637c8a186936463724.zip
Updating to trunk
Diffstat (limited to 'src/users-service.c')
-rw-r--r--src/users-service.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/users-service.c b/src/users-service.c
index c0fc6d2..bc02084 100644
--- a/src/users-service.c
+++ b/src/users-service.c
@@ -297,25 +297,22 @@ rebuild_items (DbusmenuMenuitem *root,
g_signal_connect (G_OBJECT (mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), NULL);
}
- if (count > 1 && count < 7)
+ if (count > MINIMUM_USERS && count < MAXIMUM_USERS)
{
- if (count > MINIMUM_USERS && count < MAXIMUM_USERS)
+ if (users != NULL)
{
- if (users != NULL)
- {
- GList *l = NULL;
-
- for (l = users; l != NULL; l = l->next)
- {
- users = g_list_delete_link (users, l);
- }
+ GList *l = NULL;
- users = NULL;
+ for (l = users; l != NULL; l = l->next)
+ {
+ users = g_list_delete_link (users, l);
}
- users = users_service_dbus_get_user_list (service);
+ users = NULL;
}
+ users = users_service_dbus_get_user_list (service);
+
users = g_list_sort (users, (GCompareFunc)compare_users_by_username);
for (u = users; u != NULL; u = g_list_next (u))