Merge lp:~robert-ancell/indicator-session/dont-lock-on-switch into lp:indicator-session/0.4

Proposed by Robert Ancell
Status: Merged
Approved by: Ted Gould
Approved revision: 239
Merged at revision: 239
Proposed branch: lp:~robert-ancell/indicator-session/dont-lock-on-switch
Merge into: lp:indicator-session/0.4
Diff against target: 54 lines (+2/-26)
1 file modified
src/user-menu-mgr.c (+2/-26)
To merge this branch: bzr merge lp:~robert-ancell/indicator-session/dont-lock-on-switch
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Ted Gould (community) Approve
Review via email: mp+92420@code.launchpad.net

Description of the change

Don't lock the session when switching to another one - something else (ConsoleKit?) already does this and locks it regardless of if the setting has been configured.
By explicitly doing the lock it means we can't override it inside GNOME screensaver to switch to the greeter instead, so this patch removes the code.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Sweet!

  review approve
  status approved

review: Approve
Revision history for this message
Conor Curran (cjcurran) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/user-menu-mgr.c'
2--- src/user-menu-mgr.c 2012-02-02 13:38:35 +0000
3+++ src/user-menu-mgr.c 2012-02-10 07:39:19 +0000
4@@ -285,29 +285,11 @@
5 return TRUE;
6 }
7
8-/* Check to see if the lockdown key is protecting from
9- locking the screen. If not, lock it. */
10-static void
11-lock_if_possible (void) {
12- ensure_settings_client ();
13-
14- if (!g_settings_get_boolean (settings, LOCKDOWN_KEY_SCREENSAVER)) {
15- lock_screen(NULL, 0, NULL);
16- }
17-
18- return;
19-}
20-
21-
22 /* Starts a new generic session */
23 static void
24 activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
25 {
26- lock_if_possible();
27-
28- users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data));
29-
30- return;
31+ users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data));
32 }
33
34 /* Activates a session for a particular user. */
35@@ -317,8 +299,6 @@
36 UserData *user = (UserData *)user_data;
37 UsersServiceDbus *service = user->service;
38
39- lock_if_possible();
40-
41 users_service_dbus_activate_user_session (service, user);
42 }
43
44@@ -406,11 +386,7 @@
45 UserMenuMgr* user_mgr = USER_MENU_MGR(user_data);
46 UsersServiceDbus *service = user_mgr->users_dbus_interface;
47
48- lock_if_possible();
49-
50- if (users_service_dbus_activate_guest_session(service)) {
51- return;
52- }
53+ users_service_dbus_activate_guest_session(service);
54 }
55
56

Subscribers

People subscribed via source and target branches