summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomas Bzatek <[email protected]>2011-04-15 20:51:17 +0200
committerlukefromdc <[email protected]>2018-11-02 00:01:17 -0400
commitae033ba522d6f3f3047e3886b4567464babab3a0 (patch)
tree91deea81acd817648c3a8e2c6b84bb0519ddd8a7 /src
parentbc0b2cbb27478a5c31d6f0db376385e70caaddbb (diff)
downloadcaja-ae033ba522d6f3f3047e3886b4567464babab3a0.tar.bz2
caja-ae033ba522d6f3f3047e3886b4567464babab3a0.tar.xz
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 Adapted from https://gitlab.gnome.org/GNOME/nautilus/commit/571a6ef7
Diffstat (limited to 'src')
-rw-r--r--src/caja-connect-server-dialog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index aa1ff1c1..4cd9f5db 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -1227,6 +1227,12 @@ caja_connect_server_dialog_fill_details_async (CajaConnectServerDialog *self,
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;
}