[evolution-patches] Exchange, plugin - sets linestatus properly



Hi,

Attached patch sets the linestatus
properly.

Please review it.

Thanks,
Arunprakash.

Index: plugins/exchange-operations/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.47
diff -u -p -r1.47 ChangeLog
--- plugins/exchange-operations/ChangeLog	24 Aug 2005 10:10:10 -0000	1.47
+++ plugins/exchange-operations/ChangeLog	25 Aug 2005 13:04:13 -0000
@@ -1,3 +1,11 @@
+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.
+	* exchange-operations.c (exchange_operations_get_exchange_account) :
+	Updated to return the account in offline mode.
+
 2005-08-24  Shakti Sen <shprasad novell com>
 
 	* exchange-permissions-dialog.c (add_clicked): Getting list of mail-ids
Index: plugins/exchange-operations/exchange-config-listener.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-config-listener.c,v
retrieving revision 1.12
diff -u -p -r1.12 exchange-config-listener.c
--- plugins/exchange-operations/exchange-config-listener.c	22 Aug 2005 13:18:42 -0000	1.12
+++ plugins/exchange-operations/exchange-config-listener.c	25 Aug 2005 13:04:14 -0000
@@ -650,10 +650,14 @@ account_added (EAccountList *account_lis
 /*  	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;
 	}
+
+	exchange_account_set_online (exchange_account);
 
 	result = exchange_config_listener_authenticate (config_listener, exchange_account);
 	if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
Index: plugins/exchange-operations/exchange-operations.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-operations.c,v
retrieving revision 1.11
diff -u -p -r1.11 exchange-operations.c
--- plugins/exchange-operations/exchange-operations.c	22 Aug 2005 13:18:42 -0000	1.11
+++ plugins/exchange-operations/exchange-operations.c	25 Aug 2005 13:04:14 -0000
@@ -186,15 +186,22 @@ exchange_operations_get_exchange_account
 	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 (exchange_account_get_context (account))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]