[gnome-shell] Replace LoginManager:sessionActive with GnomeSession:SessionIsActive
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Replace LoginManager:sessionActive with GnomeSession:SessionIsActive
- Date: Mon, 4 Feb 2013 23:02:33 +0000 (UTC)
commit 526a16298ca8113d0ed9bd625eebd5645eecac66
Author: Florian MÃllner <fmuellner gnome org>
Date: Sun Feb 3 22:24:33 2013 +0100
Replace LoginManager:sessionActive with GnomeSession:SessionIsActive
Gnome session started to track the session's active state a while
ago, so use that instead of our own ConsoleKit/logind abstraction
in LoginManager.
https://bugzilla.gnome.org/show_bug.cgi?id=693161
js/misc/gnomeSession.js | 1 +
js/ui/components/automountManager.js | 10 ++++------
js/ui/components/autorunManager.js | 5 +----
3 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/js/misc/gnomeSession.js b/js/misc/gnomeSession.js
index f8bd58e..a313475 100644
--- a/js/misc/gnomeSession.js
+++ b/js/misc/gnomeSession.js
@@ -58,6 +58,7 @@ const SessionManagerIface = <interface name="org.gnome.SessionManager">
<arg type="u" direction="in" />
<arg type="b" direction="out" />
</method>
+<property name="SessionIsActive" type="b" access="read"/>
<signal name="InhibitorAdded">
<arg type="o" direction="out"/>
</signal>
diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js
index e7c426d..c19fbf6 100644
--- a/js/ui/components/automountManager.js
+++ b/js/ui/components/automountManager.js
@@ -8,7 +8,6 @@ const Params = imports.misc.params;
const Shell = imports.gi.Shell;
const GnomeSession = imports.misc.gnomeSession;
-const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const ShellMountOperation = imports.ui.shellMountOperation;
@@ -33,7 +32,6 @@ const AutomountManager = new Lang.Class({
Lang.bind(this, this._InhibitorsChanged));
this._inhibited = false;
- this._loginManager = LoginManager.getLoginManager();
this._volumeMonitor = Gio.VolumeMonitor.get();
},
@@ -85,7 +83,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._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
global.play_theme_sound(0, 'device-added-media',
@@ -96,7 +94,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._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
global.play_theme_sound(0, 'device-removed-media',
@@ -107,7 +105,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._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
// we force stop/eject in this case, so we don't have to pass a
@@ -147,7 +145,7 @@ const AutomountManager = new Lang.Class({
if (params.checkSession) {
// if we're not in the current ConsoleKit session,
// don't attempt automount
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
}
diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js
index 6119c3a..fc84b3f 100644
--- a/js/ui/components/autorunManager.js
+++ b/js/ui/components/autorunManager.js
@@ -4,7 +4,6 @@ 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;
@@ -162,8 +161,6 @@ const AutorunManager = new Lang.Class({
Name: 'AutorunManager',
_init: function() {
- this._loginManager = LoginManager.getLoginManager();
-
this._volumeMonitor = Gio.VolumeMonitor.get();
this._transDispatcher = new AutorunTransientDispatcher(this);
@@ -215,7 +212,7 @@ const AutorunManager = new Lang.Class({
_onMountAdded: function(monitor, mount) {
// don't do anything if our session is not the currently
// active one
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
this._processMount(mount, true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]