aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/exchange-operations/ChangeLog9
-rw-r--r--plugins/exchange-operations/exchange-config-listener.c7
-rw-r--r--plugins/exchange-operations/exchange-operations.c15
3 files changed, 25 insertions, 6 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 27305dcda3..42939e4aec 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,12 @@
+2005-08-25 Arunprakash <arunp@novell.com>
+
+ * exchange-config-listener.c (account_added) : Need to set the
+ account's linestatus to online as there is no way to get the
+ linestatus in plugin. Also moved the authentication code to
+ exchange_operations_get_exchange_account as it is not needed here.
+ * exchange-operations.c (exchange_operations_get_exchange_account) :
+ Updated to return the account in offline mode.
+
2005-08-25 Shakti Sen <shprasad@novell.com>
* exchange-folder.c (exchange_refresh_folder_tree, exchange_get_folder,
diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c
index 6d234a6e8b..2165bd7899 100644
--- a/plugins/exchange-operations/exchange-config-listener.c
+++ b/plugins/exchange-operations/exchange-config-listener.c
@@ -611,7 +611,6 @@ account_added (EAccountList *account_list, EAccount *account)
{
ExchangeConfigListener *config_listener;
ExchangeAccount *exchange_account;
- ExchangeAccountResult result;
gint is_offline;
if (!is_active_exchange_account (account))
@@ -652,14 +651,14 @@ account_added (EAccountList *account_list, EAccount *account)
/* add_sources (exchange_account); */
exchange_config_listener_get_offline_status (config_listener, &is_offline);
+
if (is_offline == OFFLINE_MODE) {
remove_selected_non_offline_esources (exchange_account, CONF_KEY_CAL);
remove_selected_non_offline_esources (exchange_account, CONF_KEY_TASKS);
+ return;
}
- result = exchange_config_listener_authenticate (config_listener, exchange_account);
- if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
- exchange_operations_report_error (exchange_account, result);
+ exchange_account_set_online (exchange_account);
}
struct account_update_data {
diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c
index 64d3d8da09..b804c47102 100644
--- a/plugins/exchange-operations/exchange-operations.c
+++ b/plugins/exchange-operations/exchange-operations.c
@@ -186,17 +186,28 @@ exchange_operations_get_exchange_account (void)
ExchangeAccount *account = NULL;
ExchangeAccountResult result;
GSList *acclist;
+ gint mode;
acclist = exchange_config_listener_get_accounts (exchange_global_config_listener);
/* FIXME: Need to be changed for handling multiple accounts */
if (acclist) {
account = acclist->data;
- if (exchange_account_get_context (account))
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ &mode);
+
+ if (mode == OFFLINE_MODE) {
+ return account;
+ }
+ else if (exchange_account_get_context (account)) {
return account;
- else {
+ } else {
/* Try authenticating */
result = exchange_config_listener_authenticate(exchange_global_config_listener, account);
+ if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS) {
+ exchange_operations_report_error (account, result);
+ return NULL;
+ }
if (exchange_account_get_context (account))
return account;
}