[gnome-shell] AutorunManager: Fix fallout from LoginManager rework
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] AutorunManager: Fix fallout from LoginManager rework
- Date: Wed, 22 Aug 2012 17:16:58 +0000 (UTC)
commit e9a4843eb0f3810284d980c2bba8047c56be0064
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Aug 22 13:54:48 2012 +0200
AutorunManager: Fix fallout from LoginManager rework
AutorunManager relied on AutomountManager to find if the session
was active, and this broke when this stopped exporting a public
method for it. Fix AutorunManager to have its own reference to
the LoginManager.
https://bugzilla.gnome.org/show_bug.cgi?id=682455
js/ui/autorunManager.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js
index df17bf8..f39ada3 100644
--- a/js/ui/autorunManager.js
+++ b/js/ui/autorunManager.js
@@ -4,6 +4,7 @@ const Lang = imports.lang;
const Gio = imports.gi.Gio;
const St = imports.gi.St;
+const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const ShellMountOperation = imports.ui.shellMountOperation;
@@ -142,6 +143,8 @@ const AutorunManager = new Lang.Class({
Name: 'AutorunManager',
_init: function() {
+ this._loginManager = LoginManager.getLoginManager();
+
this._volumeMonitor = Gio.VolumeMonitor.get();
this._volumeMonitor.connect('mount-added',
@@ -176,7 +179,7 @@ const AutorunManager = new Lang.Class({
_onMountAdded: function(monitor, mount) {
// don't do anything if our session is not the currently
// active one
- if (!Main.automountManager.isSessionActive())
+ if (!this._loginManager.sessionActive)
return;
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]