aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-16 21:52:29 -0500
committerTed Gould <ted@gould.cx>2010-03-16 21:52:29 -0500
commit8dddf3fd91765a2811732e1c5dc4a533e55bc5cb (patch)
tree1c46010872c10477559409f5bb217fa34cea5e2e
parent6b1354f942d4482e85c1f15b3d3649cb7c20ea63 (diff)
downloadayatana-indicator-session-8dddf3fd91765a2811732e1c5dc4a533e55bc5cb.tar.gz
ayatana-indicator-session-8dddf3fd91765a2811732e1c5dc4a533e55bc5cb.tar.bz2
ayatana-indicator-session-8dddf3fd91765a2811732e1c5dc4a533e55bc5cb.zip
When a session is added or removed we need to change the state of that user item.
-rw-r--r--src/users-service-dbus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index d0b52a9..f3952ed 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -498,6 +498,10 @@ do_add_session (UsersServiceDbus *service,
g_debug ("Adding session %s", ssid);
user->sessions = g_list_prepend (user->sessions, g_strdup (ssid));
+
+ if (user->menuitem != NULL) {
+ dbusmenu_menuitem_property_set_bool(user->menuitem, USER_ITEM_PROP_LOGGED_IN, TRUE);
+ }
}
else
{
@@ -599,6 +603,9 @@ seat_proxy_session_removed (DBusGProxy *seat_proxy,
g_free (l->data);
user->sessions = g_list_delete_link (user->sessions, l);
+ if (user->menuitem != NULL && user->sessions == NULL) {
+ dbusmenu_menuitem_property_set_bool(user->menuitem, USER_ITEM_PROP_LOGGED_IN, FALSE);
+ }
}
else
{