[evolution-mapi/gnome-2-30] Bug #600395 - 'Folder size' option is shown onto each MAPI folder
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi/gnome-2-30] Bug #600395 - 'Folder size' option is shown onto each MAPI folder
- Date: Tue, 13 Apr 2010 13:08:01 +0000 (UTC)
commit e0a8c546c2e52b1ec83e2b909ae18f42603a8a2e
Author: Johnny Jacob <jjohnny gnome org>
Date: Tue Apr 13 15:07:46 2010 +0200
Bug #600395 - 'Folder size' option is shown onto each MAPI folder
.../exchange-mapi-account-settings.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-settings.c b/src/account-setup-eplugin/exchange-mapi-account-settings.c
index b65d42e..a1b996e 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-settings.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-settings.c
@@ -211,6 +211,8 @@ folder_size_actions_update_cb (EShellView *shell_view, GtkActionEntry *entries)
EShellSidebar *shell_sidebar;
EMFolderTree *folder_tree;
const gchar *folder_uri = NULL;
+ CamelURL *url = NULL;
+ gboolean show_menu_entry = FALSE;
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
@@ -227,13 +229,16 @@ folder_size_actions_update_cb (EShellView *shell_view, GtkActionEntry *entries)
folder_size_action = gtk_action_group_get_action (action_group,
"mail-mapi-folder-size");
-
/* Show / Hide action entry */
- if (g_str_has_prefix (folder_uri, "mapi://"))
- gtk_action_set_visible (folder_size_action , TRUE);
- else
- gtk_action_set_visible (folder_size_action , FALSE);
+ if (g_str_has_prefix (folder_uri, "mapi://")) {
+ show_menu_entry = TRUE;
+ url = camel_url_new (folder_uri, NULL);
+ if (url && *url->path && strlen (url->path) > 1)
+ show_menu_entry = FALSE;
+ camel_url_free (url);
+ }
+ gtk_action_set_visible (folder_size_action, show_menu_entry);
}
/* used only in Account Editor */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]