aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-calendar.c
diff options
context:
space:
mode:
authorSarfraaz Ahmed <asarfraaz@novell.com>2005-07-25 16:40:00 +0800
committerAhmed Sarfraaz <sarfraaz@src.gnome.org>2005-07-25 16:40:00 +0800
commit88f3cfaa05579162f1e7a7b3d06954a16f2e7acd (patch)
tree8dbffd34cda2b3fed9e94464b3565fa036c07f47 /plugins/exchange-operations/exchange-calendar.c
parentabee01230b62448ce5e021d4af98f92a9681eaa2 (diff)
downloadgsoc2013-evolution-88f3cfaa05579162f1e7a7b3d06954a16f2e7acd.tar.gz
gsoc2013-evolution-88f3cfaa05579162f1e7a7b3d06954a16f2e7acd.tar.zst
gsoc2013-evolution-88f3cfaa05579162f1e7a7b3d06954a16f2e7acd.zip
Add the size label only if the calendar exists. Add the size label only if
2005-07-25 Sarfraaz Ahmed <asarfraaz@novell.com> * exchange-calendar.c (e_exchange_calendar_pcalendar) : Add the size label only if the calendar exists. * exchange-contacts.c (e_exchange_contacts_pcontacts) : Add the size label only if the addressbook exists. svn path=/trunk/; revision=29884
Diffstat (limited to 'plugins/exchange-operations/exchange-calendar.c')
-rw-r--r--plugins/exchange-operations/exchange-calendar.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c
index 8c9efa8af2..2562eea667 100644
--- a/plugins/exchange-operations/exchange-calendar.c
+++ b/plugins/exchange-operations/exchange-calendar.c
@@ -189,23 +189,26 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
/* REVIEW: Should this handle be freed? - Attn: surf */
account = exchange_operations_get_exchange_account ();
account_name = account->account_name;
- cal_name = e_source_peek_name (source);
- model = exchange_account_folder_size_get_model (account);
- if (model)
- folder_size = g_strdup_printf ("%s KB", exchange_folder_size_get_val (model, cal_name));
- else
- folder_size = g_strdup ("0 KB");
-
- /* FIXME: Take care of i18n */
- lbl_size = gtk_label_new_with_mnemonic (_("Size:"));
- lbl_size_val = gtk_label_new_with_mnemonic (_(folder_size));
- gtk_widget_show (lbl_size);
- gtk_widget_show (lbl_size_val);
- gtk_misc_set_alignment (GTK_MISC (lbl_size), 0.0, 0.5);
- gtk_misc_set_alignment (GTK_MISC (lbl_size_val), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent), lbl_size, 0, 2, row, row+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (parent), lbl_size_val, 1, 3, row, row+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
+ if (calendar_src_exists) {
+ cal_name = e_source_peek_name (source);
+ model = exchange_account_folder_size_get_model (account);
+ if (model)
+ folder_size = g_strdup_printf ("%s KB", exchange_folder_size_get_val (model, cal_name));
+ else
+ folder_size = g_strdup ("0 KB");
+
+ /* FIXME: Take care of i18n */
+ lbl_size = gtk_label_new_with_mnemonic (_("Size:"));
+ lbl_size_val = gtk_label_new_with_mnemonic (_(folder_size));
+ gtk_widget_show (lbl_size);
+ gtk_widget_show (lbl_size_val);
+ gtk_misc_set_alignment (GTK_MISC (lbl_size), 0.0, 0.5);
+ gtk_misc_set_alignment (GTK_MISC (lbl_size_val), 0.0, 0.5);
+ gtk_table_attach (GTK_TABLE (parent), lbl_size, 0, 2, row, row+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), lbl_size_val, 1, 3, row, row+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
+ g_free (folder_size);
+ }
lbl_pcalendar = gtk_label_new_with_mnemonic (_("_Location:"));
gtk_widget_show (lbl_pcalendar);
gtk_misc_set_alignment (GTK_MISC (lbl_pcalendar), 0.0, 0.5);
@@ -263,7 +266,6 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
}
g_ptr_array_free (callist, TRUE);
- g_free (folder_size);
return tv_pcalendar;
}