[gnome-shell/hotplug: 12/21] mount-operation: don't implement ask-password



commit c2056b8ed16a73b8dcfe320d5d53270ba2398769
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jun 22 17:39:01 2011 -0400

    mount-operation: don't implement ask-password
    
    We don't want the password to be asked in this context; the only mounts
    that require a password are network mounts though, and we never mount
    them, so it's fine.

 js/ui/shellMountOperation.js |    6 ------
 src/shell-mount-operation.c  |   14 ++------------
 2 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index 623894d..34ade29 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -101,8 +101,6 @@ ShellMountOperation.prototype = {
 
         this.mountOp.connect('ask-question',
                              Lang.bind(this, this._onAskQuestion));
-        this.mountOp.connect('ask-password',
-                             Lang.bind(this, this._onAskPassword));
         this.mountOp.connect('show-processes-2',
                              Lang.bind(this, this._onShowProcesses2));
         this.mountOp.connect('aborted',
@@ -131,10 +129,6 @@ ShellMountOperation.prototype = {
         questionDialog.open(global.get_current_time());
     },
 
-    _onAskPassword: function(op, message, defaultUser, defaultDomain, flags) {
-        // TODO
-    },
-
     _onAborted: function(op) {
         if (!this._dialog)
             return;
diff --git a/src/shell-mount-operation.c b/src/shell-mount-operation.c
index 0d86ef9..4d03f51 100644
--- a/src/shell-mount-operation.c
+++ b/src/shell-mount-operation.c
@@ -26,7 +26,8 @@
  * object from JS but we can't yet; the default GMountOperation impl
  * automatically calls g_mount_operation_reply(UNHANDLED) after an idle,
  * in interactive methods. We want to handle the reply outselves
- * instead, so we just override the default methods with empty ones.
+ * instead, so we just override the default methods with empty ones,
+ * except for ask-password, as we don't want to handle that.
  *
  * Also, we need to workaround the fact that gjs doesn't support type
  * annotations for signals yet (so we can't effectively forward e.g. 
@@ -56,16 +57,6 @@ shell_mount_operation_init (ShellMountOperation *self)
 }
 
 static void
-shell_mount_operation_ask_password (GMountOperation   *op,
-                                    const char        *message,
-                                    const char        *default_user,
-                                    const char        *default_domain,
-                                    GAskPasswordFlags  flags)
-{
-  /* do nothing */
-}
-
-static void
 shell_mount_operation_ask_question (GMountOperation *op,
                                     const char      *message,
                                     const char      *choices[])
@@ -124,7 +115,6 @@ shell_mount_operation_class_init (ShellMountOperationClass *klass)
   mclass = G_MOUNT_OPERATION_CLASS (klass);
   mclass->show_processes = shell_mount_operation_show_processes;
   mclass->ask_question = shell_mount_operation_ask_question;
-  mclass->ask_password = shell_mount_operation_ask_password;
 
   oclass = G_OBJECT_CLASS (klass);
   oclass->finalize = shell_mount_operation_finalize;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]