[gnome-shell] loginManager: Make suspend() a NOP in the ConsoleKit path



commit b91d9c2867952520e685d689f75bc019befcaaf3
Author: Florian MÃllner <fmuellner gnome org>
Date:   Sun Feb 3 21:53:33 2013 +0100

    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

 js/misc/loginManager.js |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js
index d1c7bd9..fd10c68 100644
--- a/js/misc/loginManager.js
+++ b/js/misc/loginManager.js
@@ -5,7 +5,6 @@ const Gio = imports.gi.Gio;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Shell = imports.gi.Shell;
-const UPowerGlib = imports.gi.UPowerGlib;
 
 const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'>
 <method name='PowerOff'>
@@ -150,7 +149,6 @@ const LoginManagerConsoleKit = new Lang.Class({
         this._proxy = new ConsoleKitManager(Gio.DBus.system,
                                             'org.freedesktop.ConsoleKit',
                                             '/org/freedesktop/ConsoleKit/Manager');
-        this._upClient = new UPowerGlib.Client();
     },
 
     // Having this function is a bit of a hack since the Systemd and ConsoleKit
@@ -186,10 +184,7 @@ const LoginManagerConsoleKit = new Lang.Class({
     },
 
     canSuspend: function(asyncCallback) {
-        Mainloop.idle_add(Lang.bind(this, function() {
-            asyncCallback(this._upClient.get_can_suspend());
-            return false;
-        }));
+        return false;
     },
 
     powerOff: function() {
@@ -201,6 +196,5 @@ const LoginManagerConsoleKit = new Lang.Class({
     },
 
     suspend: function() {
-        this._upClient.suspend_sync(null);
     }
 });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]