aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/users-service-dbus.c8
-rw-r--r--src/users-service.c13
2 files changed, 8 insertions, 13 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 018469c..640dfd7 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -46,10 +46,10 @@ static gchar *get_seat (UsersServiceDbus *servic
static void users_loaded (DBusGProxy *proxy,
gpointer user_data);
static void user_added (DBusGProxy *proxy,
- guint uid,
+ gint64 uid,
gpointer user_data);
static void user_removed (DBusGProxy *proxy,
- guint uid,
+ gint64 uid,
gpointer user_data);
static void user_updated (DBusGProxy *proxy,
guint uid,
@@ -916,7 +916,7 @@ start_new_user_session (UsersServiceDbus *self,
static void
user_added (DBusGProxy *proxy,
- guint uid,
+ gint64 uid,
gpointer user_data)
{
UsersServiceDbus *service = (UsersServiceDbus *)user_data;
@@ -972,7 +972,7 @@ compare_users_by_uid (gpointer key,
static void
user_removed (DBusGProxy *proxy,
- guint uid,
+ gint64 uid,
gpointer user_data)
{
UsersServiceDbus *service = (UsersServiceDbus *)user_data;
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"));