[gnome-shell/hotplug: 18/21] automount: move some code around
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/hotplug: 18/21] automount: move some code around
- Date: Mon, 27 Jun 2011 19:53:28 +0000 (UTC)
commit 2171fb6b7511a194a511057ef752d59589fa5582
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jun 23 18:16:01 2011 -0400
automount: move some code around
It's better to check if the session is active before setting the autorun
flags anyway.
js/ui/automountManager.js | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js
index 9b32cc9..ea75ae8 100644
--- a/js/ui/automountManager.js
+++ b/js/ui/automountManager.js
@@ -201,6 +201,18 @@ AutomountManager.prototype = {
},
_checkAndMountVolume: function(volume) {
+ // if we're not in the current ConsoleKit session,
+ // don't attempt automount
+ if (!this.ckListener.sessionActive)
+ return;
+
+ if (this._ssProxy.screenSaverActive) {
+ if (this._volumeQueue.indexOf(volume) == -1)
+ this._volumeQueue.push(volume);
+
+ return;
+ }
+
if (!this._settings.get_boolean(SETTING_ENABLE_AUTOMOUNT) ||
!volume.should_automount() ||
!volume.can_mount()) {
@@ -214,18 +226,6 @@ AutomountManager.prototype = {
return;
}
- // if we're not in the current ConsoleKit session,
- // don't attempt automount
- if (!this.ckListener.sessionActive)
- return;
-
- if (this._ssProxy.screenSaverActive) {
- if (this._volumeQueue.indexOf(volume) == -1)
- this._volumeQueue.push(volume);
-
- return;
- }
-
let operation = new ShellMountOperation.ShellMountOperation(volume);
this._mountVolume(volume, operation.mountOp);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]