[gnome-shell/hotplug: 13/21] mount-operation: use ShellMountOperation when automounting a device
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/hotplug: 13/21] mount-operation: use ShellMountOperation when automounting a device
- Date: Mon, 27 Jun 2011 19:53:03 +0000 (UTC)
commit 79369ac652d226c51ae869c631ea9fc9240139e9
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jun 22 17:48:36 2011 -0400
mount-operation: use ShellMountOperation when automounting a device
js/ui/automountManager.js | 5 +++--
js/ui/shellMountOperation.js | 12 ++++++------
2 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/automountManager.js b/js/ui/automountManager.js
index 0f31aff..d475a8c 100644
--- a/js/ui/automountManager.js
+++ b/js/ui/automountManager.js
@@ -6,6 +6,7 @@ const Mainloop = imports.mainloop;
const Gio = imports.gi.Gio;
const Main = imports.ui.main;
+const ShellMountOperation = imports.ui.shellMountOperation;
// GSettings keys
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
@@ -225,8 +226,8 @@ AutomountManager.prototype = {
return;
}
- // TODO: mount op
- this._mountVolume(volume, null);
+ let operation = new ShellMountOperation.ShellMountOperation(volume)
+ this._mountVolume(volume, operation.mountOp);
},
_mountVolume: function(volume, operation) {
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index 34ade29..2185bb0 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -86,14 +86,14 @@ ListItem.prototype = {
};
Signals.addSignalMethods(ListItem.prototype);
-function ShellMountOperation(mount) {
- this._init(mount);
+function ShellMountOperation(source) {
+ this._init(source);
}
ShellMountOperation.prototype = {
- _init: function(mount) {
+ _init: function(source) {
this._initMountOp();
- this._initIcon(mount);
+ this._initIcon(source);
},
_initMountOp: function() {
@@ -107,8 +107,8 @@ ShellMountOperation.prototype = {
Lang.bind(this, this._onAborted));
},
- _initIcon: function(mount) {
- this._icon = new St.Icon({ gicon: mount.get_icon(),
+ _initIcon: function(source) {
+ this._icon = new St.Icon({ gicon: source.get_icon(),
style_class: 'shell-mount-operation-icon' });
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]