[nautilus] Use G_PASSWORD_SAVE_FOR_SESSION by default.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Use G_PASSWORD_SAVE_FOR_SESSION by default.
- Date: Sun, 4 Jul 2010 13:21:06 +0000 (UTC)
commit 3094265abbfd3b70b39bb1dbd9625a81faf0fbca
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date: Thu Feb 4 15:05:21 2010 +0100
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
libnautilus-private/nautilus-file-operations.c | 1 +
libnautilus-private/nautilus-mime-actions.c | 2 ++
src/file-manager/fm-directory-view.c | 3 +++
src/nautilus-connect-server-dialog-main.c | 1 +
src/nautilus-window-manage-views.c | 1 +
5 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 1e13778..caee375 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -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);
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index 75d6446..969bbd7 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -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,
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index dd8252e..689530f 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -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);
}
diff --git a/src/nautilus-connect-server-dialog-main.c b/src/nautilus-connect-server-dialog-main.c
index e96e853..24cf138 100644
--- a/src/nautilus-connect-server-dialog-main.c
+++ b/src/nautilus-connect-server-dialog-main.c
@@ -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,
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 941f3ab..40e68e2 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]