From d2262a0eb12ca7baf1c3428db515f411c25b793e Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Wed, 19 Jan 2005 10:37:41 +0000 Subject: Setting save password flag if user has selected remember password option. svn path=/trunk/; revision=28447 --- plugins/exchange-account-setup/ChangeLog | 5 +++++ plugins/exchange-account-setup/exchange-ask-password.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/exchange-account-setup/ChangeLog b/plugins/exchange-account-setup/ChangeLog index 5d64bf49dc..f2eaaac492 100644 --- a/plugins/exchange-account-setup/ChangeLog +++ b/plugins/exchange-account-setup/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Sushma Rai + + * exchange-ask-password.c (validate_exchange_user): Fix for remembering + password if user has selected that option, while creating the account. + 2005-01-18 Sushma Rai * exchange-ask-password.c (validate_exchange_user): Reading the return diff --git a/plugins/exchange-account-setup/exchange-ask-password.c b/plugins/exchange-account-setup/exchange-ask-password.c index 46fe489258..01054e17fd 100644 --- a/plugins/exchange-account-setup/exchange-ask-password.c +++ b/plugins/exchange-account-setup/exchange-ask-password.c @@ -43,7 +43,7 @@ GtkWidget *org_gnome_exchange_read_url(EPlugin *epl, EConfigHookItemFactoryData char *owa_entry_text = NULL; -typedef gboolean (CamelProviderValidateUserFunc) (CamelURL *camel_url, char *url, CamelException *ex); +typedef gboolean (CamelProviderValidateUserFunc) (CamelURL *camel_url, char *url, gboolean *remember_password, CamelException *ex); typedef struct { CamelProviderValidateUserFunc *validate_user; @@ -70,13 +70,13 @@ validate_exchange_user (void *data) CamelProviderValidate *validate; CamelURL *url=NULL; CamelProvider *provider = NULL; - gboolean valid = FALSE; + gboolean valid = FALSE, *remember_password; char *account_url, *url_string; const char *source_url; static int count = 0; char *id_name, *at, *user; - if (count) + if (count) return valid; source_url = e_account_get_string (target_account->account, @@ -86,9 +86,7 @@ validate_exchange_user (void *data) if (!provider) { return FALSE; /* This should never happen */ } - url = camel_url_new_with_base (NULL, account_url); - validate = provider->priv; if (validate) { @@ -104,8 +102,7 @@ validate_exchange_user (void *data) camel_url_set_user (url, user); } } - - valid = validate->validate_user (url, owa_entry_text, NULL); + valid = validate->validate_user (url, owa_entry_text, remember_password, NULL); } /* FIXME: need to check for return value */ @@ -116,6 +113,7 @@ validate_exchange_user (void *data) E_ACCOUNT_SOURCE_URL, url_string); e_account_set_string (target_account->account, E_ACCOUNT_TRANSPORT_URL, url_string); + target_account->account->source->save_passwd = *remember_password; } camel_url_free (url); -- cgit