Commit Graph

8 Commits

Author SHA1 Message Date
Florian Müllner
9a83662a18 loginManager: Move UnlockDialog.isSupported() here
With fallback mode dropped, we can no longer rely on gnome-screensaver
to be installed, so we'll have cases where we are unable to lock the
screen. The user menu should not show the "Lock" item in this case,
but as UnlockDialog includes UserMenu, we cannot use the existing check
without creating a circular dependency; move the function to a more
generic place to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=693403
2013-03-06 16:22:07 +01:00
Adel Gadllah
b2fb84e361 Don't ask for a password on shutdown
Show a warning and the list of active users instead when
multiple sessions are present.

https://bugzilla.gnome.org/show_bug.cgi?id=693385
2013-02-11 19:39:00 +01:00
Florian Müllner
1bf996c705 loginManager: Fix canSuspend in non-logind path
It is supposed to be a NOP, but commit b91d9c2867 got it wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=693162
2013-02-08 17:29:33 +01:00
Florian Müllner
8747c0c58d loginManager: Add inhibitor API
If screen locking is enabled, the screen shield should drop down
on suspend. Currently this is achieved by either explicitly locking
the screen (when selecting "Suspend" from the user menu) or by
relying on g-s-d delaying the suspension enough time for the shield
to get into place (lid close, power button).
Systemd inhibitors offer a safer way to ensure that the screen is
locked before going to sleep, so add a small abstraction for them
in the loginManager - with inhibitors being a systemd-only feature,
the ConsoleKit path only has a dummy implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=686482
2013-02-06 01:01:52 +01:00
Florian Müllner
b91d9c2867 loginManager: Make suspend() a NOP in the ConsoleKit path
UPower will remove its suspend support eventually, and g-s-d already
depends on logind for power management.

https://bugzilla.gnome.org/show_bug.cgi?id=693162
2013-02-06 01:01:52 +01:00
Florian Müllner
e0c5a61be5 loginManager: Remove sessionActive property
It is unused after switching to GnomeSession:SessionIsActive, so
remove it together with shell_session_is_active_for_systemd().

https://bugzilla.gnome.org/show_bug.cgi?id=693161
2013-02-05 00:01:33 +01:00
Florian Müllner
1f183b8a4e loginManager: Add support for suspend()
Logind provides a Suspend method, which we should use instead of
the UPower API when available. Expose this in loginManager, using
the UPower API for the ConsoleKit implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=686482
2012-10-23 21:14:10 +02:00
Giovanni Campagna
9a7914eee9 Consolidate systemd and consolekit in a common abstract class
Various code around had different paths for ConsoleKit and
logind. Consolidate it by making an abstract class that all
callers can use, which hides the implementation details of the
two daemons.

https://bugzilla.gnome.org/show_bug.cgi?id=682096
2012-08-18 18:09:55 +02:00