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
This commit is contained in:
parent
c50132b29f
commit
e9a4843eb0
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user