Commit 3094265a authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Cosimo Cecchi

Use G_PASSWORD_SAVE_FOR_SESSION by default.

When mounting volumes that require a password, present by default the
option G_PASSWORD_SAVE_FOR_SESSION.

https://bugzilla.gnome.org/show_bug.cgi?id=587909
parent cfc72ae3
......@@ -2353,6 +2353,7 @@ nautilus_file_operations_mount_volume_full (GtkWindow *parent_window,
GMountOperation *mount_op;
mount_op = gtk_mount_operation_new (parent_window);
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
g_object_set_data (G_OBJECT (mount_op),
"mount-callback",
mount_callback);
......
......@@ -1923,6 +1923,7 @@ activation_mount_not_mounted (ActivateParameters *parameters)
if (parameters->not_mounted != NULL) {
file = parameters->not_mounted->data;
mount_op = gtk_mount_operation_new (parameters->parent_window);
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
g_signal_connect (mount_op, "notify::is-showing",
G_CALLBACK (activate_mount_op_active), parameters);
location = nautilus_file_get_location (file);
......@@ -2183,6 +2184,7 @@ activation_mount_mountables (ActivateParameters *parameters)
if (parameters->mountables != NULL) {
file = parameters->mountables->data;
mount_op = gtk_mount_operation_new (parameters->parent_window);
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
g_signal_connect (mount_op, "notify::is-showing",
G_CALLBACK (activate_mount_op_active), parameters);
nautilus_file_mount (file,
......
......@@ -6232,6 +6232,7 @@ action_mount_volume_callback (GtkAction *action,
if (nautilus_file_can_mount (file)) {
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
nautilus_file_mount (file, mount_op, NULL,
file_mount_callback, NULL);
g_object_unref (mount_op);
......@@ -6418,6 +6419,7 @@ action_self_mount_volume_callback (GtkAction *action,
}
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
nautilus_file_mount (file, mount_op, NULL, file_mount_callback, NULL);
g_object_unref (mount_op);
}
......@@ -6559,6 +6561,7 @@ action_location_mount_volume_callback (GtkAction *action,
}
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
nautilus_file_mount (file, mount_op, NULL, file_mount_callback, NULL);
g_object_unref (mount_op);
}
......
......@@ -150,6 +150,7 @@ nautilus_connect_server_dialog_present_uri (NautilusApplication *application,
GMountOperation *op;
op = gtk_mount_operation_new (GTK_WINDOW (widget));
g_mount_operation_set_password_save (op, G_PASSWORD_SAVE_FOR_SESSION);
g_file_mount_enclosing_volume (location,
0, op,
NULL,
......
......@@ -1062,6 +1062,7 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
slot->tried_mount = TRUE;
mount_op = gtk_mount_operation_new (GTK_WINDOW (window));
g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION);
location = nautilus_file_get_location (file);
data = g_new0 (MountNotMountedData, 1);
data->cancellable = g_cancellable_new ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment