diff options
author | Ted Gould <ted@gould.cx> | 2010-02-11 10:52:09 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-11 10:52:09 -0600 |
commit | 6f65a111279b53a1300cc166d521c1dacb5d1eb4 (patch) | |
tree | 6f08078e48caa57a033061ef6bc091714a47e751 | |
parent | eb60468d34bdf018214ee5e437da02f6342a8b2c (diff) | |
parent | 4a6f782262c2652585094d00458c83e22c0e147b (diff) | |
download | ayatana-indicator-session-6f65a111279b53a1300cc166d521c1dacb5d1eb4.tar.gz ayatana-indicator-session-6f65a111279b53a1300cc166d521c1dacb5d1eb4.tar.bz2 ayatana-indicator-session-6f65a111279b53a1300cc166d521c1dacb5d1eb4.zip |
* Upstream release 0.2.2
* Fixing and reenabling user switching
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | src/users-service-dbus.c | 66 | ||||
-rw-r--r-- | src/users-service-dbus.h | 2 |
4 files changed, 13 insertions, 64 deletions
diff --git a/configure.ac b/configure.ac index 5ccc43d..1b4ecfa 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.2.1) +AM_INIT_AUTOMAKE(indicator-session, 0.2.2) AM_MAINTAINER_MODE diff --git a/debian/changelog b/debian/changelog index 3dd9fc6..e57c99f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,12 @@ -indicator-session (0.2.1-0ubuntu1~ppa2) lucid; urgency=low +indicator-session (0.2.2-0ubuntu1~ppa1) UNRELEASED; urgency=low - * Upstream Merge + * Upstream release 0.2.2 * Check the user_switching lockdown key to disable user_switching * Only create the screensaver proxy when needed. * Removing unneeded GPM proxy + * Fixing and reenabling user switching - -- Ted Gould <ted@ubuntu.com> Mon, 08 Feb 2010 16:49:20 -0600 + -- Ted Gould <ted@ubuntu.com> Thu, 11 Feb 2010 10:50:36 -0600 indicator-session (0.2.1-0ubuntu1) lucid; urgency=low diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index e05eaf5..d377089 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -443,37 +443,6 @@ get_unix_user (UsersServiceDbus *service, return TRUE; } -static gchar * -get_session_for_user (UsersServiceDbus *service, - UserData *user) -{ - GList *l; - - if (!users_service_dbus_can_activate_session (service)) - { - return NULL; - } - - if (!user->sessions || g_list_length (user->sessions) == 0) - { - return NULL; - } - - for (l = user->sessions; l != NULL; l = l->next) - { - const char *ssid; - - ssid = l->data; - - if (ssid) - { - return g_strdup (ssid); - } - } - - return NULL; -} - static gboolean do_add_session (UsersServiceDbus *service, UserData *user, @@ -1035,17 +1004,6 @@ users_service_dbus_get_user_list (UsersServiceDbus *self) return g_hash_table_get_values (priv->users); } -/* - * XXX - TODO: Right now we switch to a session that another user - * already has open, but if there are no open sessions - * for this user we go to the login screen and the - * user at the seat must select a user and enter a - * password. This kind of defeats the purpose of - * actually selecting a username, since selecting any - * user will do the same thing here. We need to change - * it so you only need to enter a password for the - * specified user. - */ gboolean users_service_dbus_activate_user_session (UsersServiceDbus *self, UserData *user) @@ -1054,32 +1012,20 @@ users_service_dbus_activate_user_session (UsersServiceDbus *self, DBusMessage *message = NULL; DBusMessage *reply = NULL; DBusError error; - gchar *ssid; dbus_error_init (&error); - if (!priv->seat) - priv->seat = get_seat (self); - - ssid = get_session_for_user (self, user); - - if (!ssid) - { - return start_new_user_session (self, user); - } - - if (!(message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit", - priv->seat, - "org.freedesktop.ConsoleKit.Seat", - "ActivateSession"))) + if (!(message = dbus_message_new_method_call ("org.gnome.DisplayManager", + "/org/gnome/DisplayManager/LocalDisplayFactory", + "org.gnome.DisplayManager.LocalDisplayFactory", + "SwitchToUser"))) { g_warning ("failed to create new message"); return FALSE; } if (!dbus_message_append_args (message, - DBUS_TYPE_OBJECT_PATH, - &ssid, + DBUS_TYPE_STRING, &user->user_name, DBUS_TYPE_INVALID)) { g_warning ("failed to append args"); @@ -1110,6 +1056,8 @@ users_service_dbus_activate_user_session (UsersServiceDbus *self, dbus_message_unref (reply); } + dbus_error_free (&error); + return TRUE; } diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h index 9ba05c9..41052f8 100644 --- a/src/users-service-dbus.h +++ b/src/users-service-dbus.h @@ -54,7 +54,7 @@ struct _UserData * got some gdm issues worked out. */ #define MINIMUM_USERS 1 -#define MAXIMUM_USERS 1 +#define MAXIMUM_USERS 7 struct _UsersServiceDbus { GObject parent; |