aboutsummaryrefslogtreecommitdiff
path: root/src/users-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/users-service.c')
-rw-r--r--src/users-service.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/users-service.c b/src/users-service.c
index 7c8ab01..4d1b367 100644
--- a/src/users-service.c
+++ b/src/users-service.c
@@ -38,6 +38,13 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define MINIMUM_USERS 1
#define MAXIMUM_USERS 7
+typedef struct _ActivateData ActivateData;
+struct _ActivateData
+{
+ UsersServiceDbus *service;
+ UserData *user;
+};
+
static DBusGConnection *session_bus = NULL;
static DBusGConnection *system_bus = NULL;
static DBusGProxy *bus_proxy = NULL;
@@ -118,6 +125,12 @@ activate_new_session (DbusmenuMenuitem * mi, gpointer user_data)
static void
activate_user_session (DbusmenuMenuitem *mi, gpointer user_data)
{
+ UserData *user = (UserData *)user_data;
+ UsersServiceDbus *service = user->service;
+
+ g_print ("activating user session for %s\n", user->user_name);
+
+ users_service_dbus_activate_user_session (service, user);
}
static void
@@ -151,6 +164,8 @@ rebuild_items (DbusmenuMenuitem *root,
{
user = u->data;
+ user->service = service;
+
mi = dbusmenu_menuitem_new ();
dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_LABEL, user->real_name);
dbusmenu_menuitem_child_append (root, mi);