diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js index e25276d88..0d3b6c962 100644 --- a/js/ui/automountManager.js +++ b/js/ui/automountManager.js @@ -129,7 +129,7 @@ const AutomountManager = new Lang.Class({ return false; }, - _sessionActive: function() { + isSessionActive: function() { // Return whether the current session is active, using the // right mechanism: either systemd if available or ConsoleKit // as fallback. @@ -143,7 +143,7 @@ const AutomountManager = new Lang.Class({ _onDriveConnected: function() { // if we're not in the current ConsoleKit session, // or screensaver is active, don't play sounds - if (!this._sessionActive()) + if (!this.isSessionActive()) return; if (this._ssProxy.screenSaverActive) @@ -155,7 +155,7 @@ const AutomountManager = new Lang.Class({ _onDriveDisconnected: function() { // if we're not in the current ConsoleKit session, // or screensaver is active, don't play sounds - if (!this._sessionActive()) + if (!this.isSessionActive()) return; if (this._ssProxy.screenSaverActive) @@ -167,7 +167,7 @@ const AutomountManager = new Lang.Class({ _onDriveEjectButton: function(monitor, drive) { // TODO: this code path is not tested, as the GVfs volume monitor // doesn't emit this signal just yet. - if (!this._sessionActive()) + if (!this.isSessionActive()) return; // we force stop/eject in this case, so we don't have to pass a @@ -206,7 +206,7 @@ const AutomountManager = new Lang.Class({ if (params.checkSession) { // if we're not in the current ConsoleKit session, // don't attempt automount - if (!this._sessionActive()) + if (!this.isSessionActive()) return; if (this._ssProxy.screenSaverActive) { diff --git a/js/ui/autorunManager.js b/js/ui/autorunManager.js index 175eecf13..27d89e894 100644 --- a/js/ui/autorunManager.js +++ b/js/ui/autorunManager.js @@ -174,7 +174,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.ckListener.sessionActive) + if (!Main.automountManager.isSessionActive()) return; let discoverer = new ContentTypeDiscoverer(Lang.bind (this,