~elementary-pantheon/elementaryos/os-patch-indicator-session-precise-legacy

« back to all changes in this revision

Viewing changes to src/user-menu-mgr.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Ken VanDine
  • Date: 2012-02-14 18:49:02 UTC
  • mfrom: (1.1.46)
  • Revision ID: package-import@ubuntu.com-20120214184902-uf9zw55ys3x2v7za
Tags: 0.3.91-0ubuntu1

* Backport "Don't lock the session when switching to another one"
  work from Robert Ancell, the screen locking is already done by 
  consolekit and enforcing it there is problematic to i.e use the 
  lightdm greeter as a lock screen (lp: #878836)
* debian/control:
  - recommends python-aptdaemon.pkcompat so packagekit doesn't get installed
* debian/source/format:
  - use v1, v3 doesn't play nicely with vcs backports

[ Ken VanDine ]
* New upstream release. (lp: #903756)
* debian/control
  - added new build depends on libpackagekit-glib2-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
        return TRUE;
286
286
}
287
287
 
288
 
/* Check to see if the lockdown key is protecting from
289
 
   locking the screen.  If not, lock it. */
290
 
static void
291
 
lock_if_possible (void) {
292
 
        ensure_settings_client ();
293
 
 
294
 
        if (!g_settings_get_boolean (settings, LOCKDOWN_KEY_SCREENSAVER)) {
295
 
                lock_screen(NULL, 0, NULL);
296
 
        }
297
 
 
298
 
        return;
299
 
}
300
 
 
301
 
 
302
288
/* Starts a new generic session */
303
289
static void
304
290
activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
305
291
{
306
 
        lock_if_possible();
307
 
 
308
 
  users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data));
309
 
 
310
 
        return;
 
292
        users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data));
311
293
}
312
294
 
313
295
/* Activates a session for a particular user. */
317
299
  UserData *user = (UserData *)user_data;
318
300
  UsersServiceDbus *service = user->service;
319
301
 
320
 
  lock_if_possible();
321
 
 
322
302
  users_service_dbus_activate_user_session (service, user);
323
303
}
324
304
 
406
386
  UserMenuMgr* user_mgr = USER_MENU_MGR(user_data);  
407
387
  UsersServiceDbus *service = user_mgr->users_dbus_interface;
408
388
 
409
 
        lock_if_possible();
410
 
  
411
 
  if (users_service_dbus_activate_guest_session(service)) {
412
 
    return;
413
 
  }
 
389
  users_service_dbus_activate_guest_session(service);
414
390
}
415
391
 
416
392