[gtk+] Allow empty passwords in GtkMountOperation



commit 84a9e65ca3bf407807dbe60c549169810c631601
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Apr 8 10:02:52 2009 -0400

    Allow empty passwords in GtkMountOperation
    
    Allow empty passwords, since there are situations where the
    backend doesn't need the password.  (#578365)
---
 gtk/gtkmountoperation.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index add46e8..ace58ed 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -316,9 +316,14 @@ pw_dialog_input_is_valid (GtkMountOperation *operation)
   GtkMountOperationPrivate *priv = operation->priv;
   gboolean is_valid = TRUE;
 
+  /* We don't require password to be non-empty here
+   * since there are situations where it is not needed,
+   * see bug 578365.
+   * We may add a way for the backend to specify that it
+   * definitively needs a password.
+   */
   is_valid = entry_has_input (priv->username_entry) &&
-             entry_has_input (priv->domain_entry) &&
-             entry_has_input (priv->password_entry);
+             entry_has_input (priv->domain_entry);
 
   return is_valid;
 }



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