[nautilus] connect-server-dialog: Respect password save setting



commit 571a6ef755a6190d442739589b686401d75ff40b
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Fri Apr 15 20:51:17 2011 +0200

    connect-server-dialog: Respect password save setting
    
    The "Remember this password" checkbox was not respected
    when password was specified and connection succeeded
    for the first time.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=641376

 src/nautilus-connect-server-dialog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index 0292c0c..bf3c8d1 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -1243,6 +1243,12 @@ nautilus_connect_server_dialog_fill_details_async (NautilusConnectServerDialog *
 			g_mount_operation_set_password (G_MOUNT_OPERATION (operation),
 							str);
 			set_flags ^= G_ASK_PASSWORD_NEED_PASSWORD;
+			
+			if (flags & G_ASK_PASSWORD_SAVING_SUPPORTED &&
+			    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->details->remember_checkbox))) {
+				g_mount_operation_set_password_save (G_MOUNT_OPERATION (operation),
+								     G_PASSWORD_SAVE_PERMANENTLY);
+			}
 
 			self->details->last_password_set = TRUE;
 		}



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