aboutsummaryrefslogtreecommitdiff
path: root/src/users-service.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-09-23 12:40:16 -0500
committerCody Russell <crussell@canonical.com>2009-09-23 12:40:16 -0500
commita3ca139c3e39765da2a295b1d7261268f94f020b (patch)
tree6bce022f6235d588f796c388d69706c392341ebd /src/users-service.c
parent541259b2cb86b7393232f59e4f61366e52fe5cea (diff)
downloadayatana-indicator-session-a3ca139c3e39765da2a295b1d7261268f94f020b.tar.gz
ayatana-indicator-session-a3ca139c3e39765da2a295b1d7261268f94f020b.tar.bz2
ayatana-indicator-session-a3ca139c3e39765da2a295b1d7261268f94f020b.zip
user activation wip
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);