From ff350e0cc76767df61dd7d60143abf260f822dfb Mon Sep 17 00:00:00 2001 From: Sarfraaz Ahmed Date: Mon, 22 Aug 2005 13:18:42 +0000 Subject: Use exchange_operations_get_exchange_account. Fetch the password and 2005-08-22 Sarfraaz Ahmed * exchange-account-setup.c (btn_fsize_clicked) (set_oof_info) : Use exchange_operations_get_exchange_account. * exchange-config-listener.c (exchange_config_listener_authenticate) : Fetch the password and connect. Added new * exchange-config-listener.h : Similar. * exchange-operations.c (exchange_operations_get_exchange_account) : Try authenticating if account is not found. svn path=/trunk/; revision=30199 --- plugins/exchange-operations/exchange-operations.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'plugins/exchange-operations/exchange-operations.c') diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c index 23794a079b..b7b8b436e5 100644 --- a/plugins/exchange-operations/exchange-operations.c +++ b/plugins/exchange-operations/exchange-operations.c @@ -184,14 +184,25 @@ ExchangeAccount * exchange_operations_get_exchange_account (void) { ExchangeAccount *account = NULL; + ExchangeAccountResult result; GSList *acclist; acclist = exchange_config_listener_get_accounts (exchange_global_config_listener); /* FIXME: Need to be changed for handling multiple accounts */ - if (acclist) + if (acclist) { account = acclist->data; - return account; + if (exchange_account_get_context (account)) + return account; + else { + /* Try authenticating */ + result = exchange_config_listener_authenticate(exchange_global_config_listener, account); + if (exchange_account_get_context (account)) + return account; + } + } + + return NULL; } void -- cgit v1.2.3