]> Pileus Git - ~andy/gtk/commitdiff
Allow empty passwords in GtkMountOperation
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Apr 2009 14:02:52 +0000 (10:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 8 Apr 2009 16:59:10 +0000 (12:59 -0400)
Allow empty passwords, since there are situations where the
backend doesn't need the password.  (#578365)

gtk/gtkmountoperation.c

index add46e85bd6e7834ad0e2f4c2db7a1239a4a9dbb..ace58ed90a1e5e44c3c6fa1f14f72b314ebd49e3 100644 (file)
@@ -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;
 }