[evolution-groupwise] Bug #351025 - Make the order of the mail accounts configurable



commit cdd0da408f28e2f13bddf23b23e3fdf19a121682
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 26 11:46:49 2011 +0200

    Bug #351025 - Make the order of the mail accounts configurable

 src/plugins/install-shared.c      |    2 +-
 src/plugins/share-folder-common.c |   11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/install-shared.c b/src/plugins/install-shared.c
index de3db40..c527284 100644
--- a/src/plugins/install-shared.c
+++ b/src/plugins/install-shared.c
@@ -181,7 +181,7 @@ apply_clicked (GtkAssistant *assistant,
 	accept_data = g_new0 (struct AcceptData, 1);
 
 	dialog = em_folder_selector_create_new (
-		parent, E_MAIL_BACKEND (shell_backend), em_folder_tree_model_get_default (), 0,
+		parent, E_MAIL_BACKEND (shell_backend), em_folder_tree_model_get_default (E_MAIL_BACKEND (shell_backend)), 0,
 		_("Create folder"), _("Specify where to create the folder:"));
 
 	selector = EM_FOLDER_SELECTOR (dialog);
diff --git a/src/plugins/share-folder-common.c b/src/plugins/share-folder-common.c
index 9344922..23ab3ef 100644
--- a/src/plugins/share-folder-common.c
+++ b/src/plugins/share-folder-common.c
@@ -44,6 +44,7 @@
 #include <filter/e-filter-rule.h>
 #include <e-gw-container.h>
 #include <e-gw-connection.h>
+#include <shell/e-shell.h>
 #include <shell/e-shell-sidebar.h>
 #include "share-folder.h"
 #include "gw-ui.h"
@@ -89,7 +90,13 @@ shared_folder_commit (EPlugin *ep,
 {
 	EMConfigTargetFolder *target =  (EMConfigTargetFolder *) tget->config->target;
 	CamelStore *parent_store;
-	EMFolderTreeModel *model = em_folder_tree_model_new (); /*mail_component_peek_tree_model (mail_component_peek ());*/
+	EMFolderTreeModel *model;
+	EShell *shell;
+	EMailBackend *mail_backend;
+
+	shell = e_shell_get_default ();
+	mail_backend = E_MAIL_BACKEND (e_shell_get_backend_by_name (shell, "mail"));
+	model = em_folder_tree_model_new (mail_backend);
 
 	parent_store = camel_folder_get_parent_store (target->folder);
 
@@ -353,7 +360,7 @@ gw_new_shared_folder_cb (GtkAction *action,
 	shell_backend = e_shell_view_get_shell_backend (shell_view);
 
 	dialog = em_folder_selector_create_new (
-		parent, E_MAIL_BACKEND (shell_backend), em_folder_tree_model_get_default (), 0,
+		parent, E_MAIL_BACKEND (shell_backend), em_folder_tree_model_get_default (E_MAIL_BACKEND (shell_backend)), 0,
 		_("Create folder"), _("Specify where to create the folder:"));
 
 	selector = EM_FOLDER_SELECTOR (dialog);



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