[Goodies-commits] r6803 - in gigolo/trunk: . src
Enrico Troeger
enrico at xfce.org
Sat Feb 28 11:45:08 CET 2009
Author: enrico
Date: 2009-02-28 10:45:08 +0000 (Sat, 28 Feb 2009)
New Revision: 6803
Modified:
gigolo/trunk/ChangeLog
gigolo/trunk/src/backendgvfs.c
Log:
Cache the domain string when it is passed to the password dialog.
Modified: gigolo/trunk/ChangeLog
===================================================================
--- gigolo/trunk/ChangeLog 2009-02-27 22:49:18 UTC (rev 6802)
+++ gigolo/trunk/ChangeLog 2009-02-28 10:45:08 UTC (rev 6803)
@@ -1,3 +1,9 @@
+2009-02-28 Enrico Tröger <enrico(at)xfce(dot)org>
+
+ * src/backendgvfs.c:
+ Cache the domain string when it is passed to the password dialog.
+
+
2009-02-22 Enrico Tröger <enrico(at)xfce(dot)org>
* New release: Gigolo 0.2.1.
Modified: gigolo/trunk/src/backendgvfs.c
===================================================================
--- gigolo/trunk/src/backendgvfs.c 2009-02-27 22:49:18 UTC (rev 6802)
+++ gigolo/trunk/src/backendgvfs.c 2009-02-28 10:45:08 UTC (rev 6803)
@@ -52,6 +52,7 @@
{
GigoloBackendGVFS *self;
GtkWidget *dialog;
+ gchar *domain;
} MountInfo;
struct _GigoloBackendGVFSPrivate
@@ -457,18 +458,19 @@
gtk_widget_destroy(mi->dialog);
g_free(uri);
+ g_free(mi->domain);
g_free(mi);
}
static void set_password_cb(GMountOperation *op, G_GNUC_UNUSED gchar *message, gchar *default_user,
- gchar *default_domain, GAskPasswordFlags flags, const gchar *domain)
+ gchar *default_domain, GAskPasswordFlags flags, MountInfo *mi)
{
GMountOperationResult result;
GtkWidget *dialog;
dialog = gigolo_password_dialog_new(flags, default_user,
- (domain != NULL) ? domain : default_domain);
+ (mi->domain != NULL) ? mi->domain : default_domain);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
{
@@ -486,8 +488,8 @@
gigolo_password_dialog_get_password(GIGOLO_PASSWORD_DIALOG(dialog)));
/* TODO make this configurable? */
/* g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_FOR_SESGIGOLO); */
- /* g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER); */
- g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_PERMANENTLY);
+ g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_NEVER);
+ /*g_mount_operation_set_password_save(op, G_PASSWORD_SAVE_PERMANENTLY);*/
}
}
else
@@ -516,8 +518,9 @@
mi = g_new0(MountInfo, 1);
mi->self = backend;
mi->dialog = dialog;
+ mi->domain = g_strdup(domain);
- g_signal_connect(op, "ask-password", G_CALLBACK(set_password_cb), (gchar*) domain);
+ g_signal_connect(op, "ask-password", G_CALLBACK(set_password_cb), mi);
g_file_mount_enclosing_volume(file, G_MOUNT_MOUNT_NONE, op, NULL,
(GAsyncReadyCallback) mount_ready_cb, mi);
More information about the Goodies-commits
mailing list