eel r2062 - in trunk: . eel



Author: alexl
Date: Mon Feb 18 10:30:38 2008
New Revision: 2062
URL: http://svn.gnome.org/viewvc/eel?rev=2062&view=rev

Log:
2008-02-18  Alexander Larsson  <alexl redhat com>

        * eel/eel-mount-operation.c:
	Handle the save-password flags (#516997)
	Patch from Carlos Garcia Campos




Modified:
   trunk/ChangeLog
   trunk/eel/eel-mount-operation.c

Modified: trunk/eel/eel-mount-operation.c
==============================================================================
--- trunk/eel/eel-mount-operation.c	(original)
+++ trunk/eel/eel-mount-operation.c	Mon Feb 18 10:30:38 2008
@@ -104,6 +104,18 @@
 		anon = gnome_password_dialog_anon_selected (gpd);
 		g_mount_operation_set_anonymous (op, anon);
 
+		switch (gnome_password_dialog_get_remember (gpd)) {
+		case GNOME_PASSWORD_DIALOG_REMEMBER_NOTHING:
+			g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_NEVER);
+			break;
+		case GNOME_PASSWORD_DIALOG_REMEMBER_SESSION:
+			g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_FOR_SESSION);
+			break;
+		case GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER:
+			g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_PERMANENTLY);
+			break;
+		}
+
 		g_mount_operation_reply (op, G_MOUNT_OPERATION_HANDLED);
 	} else {
 		g_mount_operation_reply (op, G_MOUNT_OPERATION_ABORTED);
@@ -138,6 +150,9 @@
 					       flags & G_ASK_PASSWORD_NEED_DOMAIN);
 	gnome_password_dialog_set_show_userpass_buttons	(GNOME_PASSWORD_DIALOG (dialog),
 							 flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED);
+	gnome_password_dialog_set_show_remember (GNOME_PASSWORD_DIALOG (dialog),
+						 flags & G_ASK_PASSWORD_SAVING_SUPPORTED);
+	
 	if (default_domain) {
 		gnome_password_dialog_set_domain (GNOME_PASSWORD_DIALOG (dialog),
 						  default_domain);



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