diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2005-01-18 20:32:16 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2005-01-18 20:32:16 +0800 |
commit | 45cc3ccaf1f5fb509ca510cd2f3dd2e14ae8bc04 (patch) | |
tree | 634de2ad471c2fbb2a831993663fc0528315dc6f /plugins/exchange-account-setup | |
parent | e924cb911ede740f943176d374873a587b152a80 (diff) | |
download | gsoc2013-evolution-45cc3ccaf1f5fb509ca510cd2f3dd2e14ae8bc04.tar.gz gsoc2013-evolution-45cc3ccaf1f5fb509ca510cd2f3dd2e14ae8bc04.tar.zst gsoc2013-evolution-45cc3ccaf1f5fb509ca510cd2f3dd2e14ae8bc04.zip |
Fix for #71384, Making page check work for exchange account, when
hostname is not read.
svn path=/trunk/; revision=28435
Diffstat (limited to 'plugins/exchange-account-setup')
-rw-r--r-- | plugins/exchange-account-setup/ChangeLog | 5 | ||||
-rw-r--r-- | plugins/exchange-account-setup/exchange-ask-password.c | 38 |
2 files changed, 27 insertions, 16 deletions
diff --git a/plugins/exchange-account-setup/ChangeLog b/plugins/exchange-account-setup/ChangeLog index 286e029728..1015f5140c 100644 --- a/plugins/exchange-account-setup/ChangeLog +++ b/plugins/exchange-account-setup/ChangeLog @@ -1,5 +1,10 @@ 2005-01-18 Sushma Rai <rsushma@novell.com> + * exchange-ask-password.c (validate_exchange_user): Filling up + user name so that page check doesn't fail. Fixes #71384 + +2005-01-18 Sushma Rai <rsushma@novell.com> + * exchange-ask-password.c (org_gnome_exchange_read_url): Setting dummy host name, which will be reset to proper hostname once the user is authenticated. diff --git a/plugins/exchange-account-setup/exchange-ask-password.c b/plugins/exchange-account-setup/exchange-ask-password.c index a70b23ddef..212d2a89a6 100644 --- a/plugins/exchange-account-setup/exchange-ask-password.c +++ b/plugins/exchange-account-setup/exchange-ask-password.c @@ -74,6 +74,7 @@ validate_exchange_user (void *data) char *account_url, *url_string; const char *source_url; static int count = 0; + char *id_name, *at, *user; if (count) return valid; @@ -89,8 +90,23 @@ validate_exchange_user (void *data) url = camel_url_new_with_base (NULL, account_url); validate = provider->priv; - if (validate) + if (validate) { + + if (url->user == NULL) { + id_name = e_account_get_string (target_account->account, + E_ACCOUNT_ID_ADDRESS); + if (id_name) { + at = strchr(id_name, '@'); + user = g_alloca(at-id_name+1); + memcpy(user, id_name, at-id_name); + user[at-id_name] = 0; + + camel_url_set_user (url, user); + } + } + validate->validate_user (url, owa_entry_text, NULL); + } else valid = FALSE; /* FIXME: need to check for return value */ @@ -110,7 +126,9 @@ validate_exchange_user (void *data) static void ok_button_clicked (GtkWidget *button, void *data) { - validate_exchange_user (data); // FIXME: return value + gboolean valid = FALSE; + + valid = validate_exchange_user (data); // FIXME: return value } static void @@ -160,14 +178,13 @@ add_owa_entry (GtkWidget *parent, } GtkWidget * -org_gnome_exchange_read_url(EPlugin *epl, EConfigHookItemFactoryData *data) +org_gnome_exchange_read_url (EPlugin *epl, EConfigHookItemFactoryData *data) { EMConfigTargetAccount *target_account; EConfig *config; - char *account_url = NULL, *exchange_url = NULL, *temp_url; + char *account_url = NULL, *exchange_url = NULL; const char *source_url; GtkWidget *owa_entry = NULL, *parent; - CamelURL *url; config = data->config; target_account = (EMConfigTargetAccount *)data->config->target; @@ -181,17 +198,6 @@ org_gnome_exchange_read_url(EPlugin *epl, EConfigHookItemFactoryData *data) if (data->old) return data->old; - /* hack for making page check work when host is not there */ - url = camel_url_new_with_base (NULL, account_url); - if (url->host == NULL) { - camel_url_set_host (url, "localhost"); - temp_url = camel_url_to_string (url, 0); - e_account_set_string (target_account->account, - E_ACCOUNT_SOURCE_URL, temp_url); - g_free (temp_url); - } - camel_url_free (url); - parent = data->parent; owa_entry = add_owa_entry (parent, config, target_account); } |