autorunManager: Fix fallout from port to systemd

https://bugzilla.gnome.org/show_bug.cgi?id=670076
This commit is contained in:
Jasper St. Pierre 2012-02-14 13:52:29 -05:00
parent b18cc8de86
commit c2a9f7fbb2
2 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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,