autorunManager: Fix fallout from port to systemd
https://bugzilla.gnome.org/show_bug.cgi?id=670076
This commit is contained in:
parent
b18cc8de86
commit
c2a9f7fbb2
@ -129,7 +129,7 @@ const AutomountManager = new Lang.Class({
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
_sessionActive: function() {
|
isSessionActive: function() {
|
||||||
// Return whether the current session is active, using the
|
// Return whether the current session is active, using the
|
||||||
// right mechanism: either systemd if available or ConsoleKit
|
// right mechanism: either systemd if available or ConsoleKit
|
||||||
// as fallback.
|
// as fallback.
|
||||||
@ -143,7 +143,7 @@ const AutomountManager = new Lang.Class({
|
|||||||
_onDriveConnected: function() {
|
_onDriveConnected: function() {
|
||||||
// if we're not in the current ConsoleKit session,
|
// if we're not in the current ConsoleKit session,
|
||||||
// or screensaver is active, don't play sounds
|
// or screensaver is active, don't play sounds
|
||||||
if (!this._sessionActive())
|
if (!this.isSessionActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._ssProxy.screenSaverActive)
|
if (this._ssProxy.screenSaverActive)
|
||||||
@ -155,7 +155,7 @@ const AutomountManager = new Lang.Class({
|
|||||||
_onDriveDisconnected: function() {
|
_onDriveDisconnected: function() {
|
||||||
// if we're not in the current ConsoleKit session,
|
// if we're not in the current ConsoleKit session,
|
||||||
// or screensaver is active, don't play sounds
|
// or screensaver is active, don't play sounds
|
||||||
if (!this._sessionActive())
|
if (!this.isSessionActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._ssProxy.screenSaverActive)
|
if (this._ssProxy.screenSaverActive)
|
||||||
@ -167,7 +167,7 @@ const AutomountManager = new Lang.Class({
|
|||||||
_onDriveEjectButton: function(monitor, drive) {
|
_onDriveEjectButton: function(monitor, drive) {
|
||||||
// TODO: this code path is not tested, as the GVfs volume monitor
|
// TODO: this code path is not tested, as the GVfs volume monitor
|
||||||
// doesn't emit this signal just yet.
|
// doesn't emit this signal just yet.
|
||||||
if (!this._sessionActive())
|
if (!this.isSessionActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// we force stop/eject in this case, so we don't have to pass a
|
// 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 (params.checkSession) {
|
||||||
// if we're not in the current ConsoleKit session,
|
// if we're not in the current ConsoleKit session,
|
||||||
// don't attempt automount
|
// don't attempt automount
|
||||||
if (!this._sessionActive())
|
if (!this.isSessionActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._ssProxy.screenSaverActive) {
|
if (this._ssProxy.screenSaverActive) {
|
||||||
|
@ -174,7 +174,7 @@ const AutorunManager = new Lang.Class({
|
|||||||
_onMountAdded: function(monitor, mount) {
|
_onMountAdded: function(monitor, mount) {
|
||||||
// don't do anything if our session is not the currently
|
// don't do anything if our session is not the currently
|
||||||
// active one
|
// active one
|
||||||
if (!Main.automountManager.ckListener.sessionActive)
|
if (!Main.automountManager.isSessionActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
|
let discoverer = new ContentTypeDiscoverer(Lang.bind (this,
|
||||||
|
Loading…
Reference in New Issue
Block a user