[gnome-shell/hotplug: 9/14] mount-operation: use ShellMountOperation when automounting a device



commit acde41904b85db9e6d6fdeb6d60b9638daab2b98
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jun 22 17:48:36 2011 -0400

    mount-operation: use ShellMountOperation when automounting a device
    
    https://bugzilla.gnome.org/show_bug.cgi?id=653520

 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 337eb9d..bdc33b6 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 623894d..f82f3c4 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() {
@@ -109,8 +109,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]