[gnome-shell] automountManager: Make sure sessionActive is initialized
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] automountManager: Make sure sessionActive is initialized
- Date: Sun, 29 Jan 2012 23:10:57 +0000 (UTC)
commit 3d0dd380450fa1b987df2684f5f5f00a340b5c54
Author: Florian MÃllner <fmuellner gnome org>
Date: Sun Jan 29 22:38:29 2012 +0100
automountManager: Make sure sessionActive is initialized
Since the port to GDBus, sessionActive is only set on DBus name
owner changes; this means that it may end up not being initialized
at all, and therefore always evaluate to false.
Make sure that the property is always initialized on startup.
https://bugzilla.gnome.org/show_bug.cgi?id=668020
js/ui/automountManager.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js
index ee3e857..9686020 100644
--- a/js/ui/automountManager.js
+++ b/js/ui/automountManager.js
@@ -43,7 +43,7 @@ function ConsoleKitManager() {
g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
- self.connect('notify::g-name-owner', function() {
+ self._updateSessionActive = function() {
if (self.g_name_owner) {
self.GetCurrentSessionRemote(function([session]) {
self._ckSession = new ConsoleKitSessionProxy(Gio.DBus.system, 'org.freedesktop.ConsoleKit', session);
@@ -58,8 +58,11 @@ function ConsoleKitManager() {
} else {
self.sessionActive = true;
}
- });
+ };
+ self.connect('notify::g-name-owner',
+ Lang.bind(self, self._updateSessionActive));
+ self._updateSessionActive();
self.init(null);
return self;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]