evolution/bnc-339266-evo-folder-size-offline.diff

30 lines
1.0 KiB
Diff

=== modified file 'plugins/exchange-operations/exchange-account-setup.c'
--- plugins/exchange-operations/exchange-account-setup.c 2007-12-18 20:23:31 +0000
+++ plugins/exchange-operations/exchange-account-setup.c 2007-12-18 20:41:16 +0000
@@ -939,6 +939,7 @@
GtkVBox *vbx;
GtkHBox *hbx_size;
char *folder_name, *folder_size;
+ int mode;
service = CAMEL_SERVICE (camel_folder_get_parent_store (cml_folder));
if (!service)
@@ -951,10 +952,15 @@
if (g_ascii_strcasecmp (provider->protocol, "exchange"))
return NULL;
+ account = exchange_operations_get_exchange_account ();
+ exchange_account_is_offline (account, &mode);
+ if (mode == OFFLINE_MODE)
+ return NULL;
+
folder_name = (char*) camel_folder_get_name (cml_folder);
if (!folder_name)
folder_name = g_strdup ("name");
- account = exchange_operations_get_exchange_account ();
+
model = exchange_account_folder_size_get_model (account);
if (model)
folder_size = g_strdup_printf (_("%s KB"), exchange_folder_size_get_val (model, folder_name));