[evolution-mapi] Bug #600395 - 'Folder size' option is shown onto each MAPI folder



commit 073e4471858a749abfbf66914cff4939750f52e3
Author: Johnny Jacob <jjohnny gnome org>
Date:   Tue Apr 13 15:06:53 2010 +0200

    Bug #600395 - 'Folder size' option is shown onto each MAPI folder

 .../exchange-mapi-account-settings.c               |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-settings.c b/src/account-setup-eplugin/exchange-mapi-account-settings.c
index aaf492e..b4b199e 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-settings.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-settings.c
@@ -264,6 +264,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);
@@ -282,11 +284,15 @@ folder_size_actions_update_cb (EShellView *shell_view, GtkActionEntry *entries)
 							  "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]