aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-01-23 16:04:21 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-01-23 16:04:21 +0800
commit305832a728c3a14a1bd0a9d2008209b41cba0953 (patch)
tree6e37ac617aae32d451ff660f4c01afe090fade3f
parentc54437a87bfcdb8bffedc0186b5fdaca53dc59b0 (diff)
downloadgsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar.gz
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar.bz2
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar.lz
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar.xz
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.tar.zst
gsoc2013-evolution-305832a728c3a14a1bd0a9d2008209b41cba0953.zip
Reading the auth type from ExchangeAccount and setting it in URL if the url
doesn't contain the auth mechanism value. Fixes #327284. svn path=/trunk/; revision=31270
-rw-r--r--plugins/exchange-operations/ChangeLog10
-rw-r--r--plugins/exchange-operations/exchange-account-setup.c24
2 files changed, 30 insertions, 4 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 4d4cd6dedb..475f37f6af 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-23 Sushma Rai <rsushma@novell.com>
+
+ * exchange-account-setup.c (camel_exchange_ntlm): Setting the authproto
+ value to NTLM, which is used later.
+ (org_gnome_exchange_auth_section): Reading the auth type from
+ ExchangeAccount and setting it in URL if the url doesn't contain the
+ auth mechanism value. Since the auth mechanism is not set using the
+ authentication type tab in druid during account setup, when the editor
+ is invoked, it doesn't get set in the account URI. Fixes #327284.
+
2006-01-19 Andre Klapper <a9016009@gmx.de>
* org-gnome-exchange-operations.error.xml:
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c
index 0aeb7b0cfe..c61174fd42 100644
--- a/plugins/exchange-operations/exchange-account-setup.c
+++ b/plugins/exchange-operations/exchange-account-setup.c
@@ -66,7 +66,7 @@ CamelServiceAuthType camel_exchange_ntlm_authtype = {
N_("This option will connect to the Exchange server using "
"secure password (NTLM) authentication."),
- "",
+ "NTLM",
TRUE
};
@@ -802,7 +802,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
const char *source_url;
- char *label_text;
+ char *label_text, *exchange_account_authtype = NULL;
CamelURL *url;
GtkWidget *hbox, *button, *auth_label, *vbox, *label_hide;
GtkComboBox *dropdown;
@@ -810,7 +810,8 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
GtkListStore *store;
int i, active=0, auth_changed_id = 0;
GList *authtypes, *l, *ll;
-
+ ExchangeAccount *account;
+
target_account = (EMConfigTargetAccount *)data->config->target;
source_url = e_account_get_string (target_account->account,
E_ACCOUNT_SOURCE_URL);
@@ -828,6 +829,10 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
return data->old;
}
+ account = exchange_operations_get_exchange_account ();
+ if (account)
+ exchange_account_authtype = exchange_account_get_authtype (account);
+
vbox = gtk_vbox_new (FALSE, 6);
label_text = g_strdup_printf("<b>%s</b>", _("Authentication Type"));
@@ -865,8 +870,18 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_list_store_set (store, &iter, 0, authtype->name, 1,
authtype, 2, !avail, -1);
- if (url && url->authmech && !strcmp(url->authmech, authtype->authproto))
+ if (url && url->authmech && !strcmp(url->authmech, authtype->authproto)) {
active = i;
+ }
+ else if (url && exchange_account_authtype &&
+ !strcmp (exchange_account_authtype, authtype->authproto)) {
+ /* if the url doesn't contain authmech, read the value from
+ * exchange account and set the tab selection and
+ * also set the authmech back to url
+ */
+ camel_url_set_authmech (url, exchange_account_authtype);
+ active = i;
+ }
}
gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store);
@@ -904,6 +919,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
if (url)
camel_url_free(url);
g_list_free (authtypes);
+ g_free (exchange_account_authtype);
return vbox;
}