[evolution-groupwise] Adapt to recent EMFolderTree changes



commit 138ea705c72153e6481e909adde80d6b166a7973
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 24 12:00:41 2011 +0200

    Adapt to recent EMFolderTree changes

 src/plugins/install-shared.c      |    4 +---
 src/plugins/share-folder-common.c |   12 +++++-------
 2 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/install-shared.c b/src/plugins/install-shared.c
index e8007c6..d00d210 100644
--- a/src/plugins/install-shared.c
+++ b/src/plugins/install-shared.c
@@ -169,7 +169,6 @@ apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg)
 {
 	EShell *shell;
 	EShellBackend *shell_backend;
-	EMailSession *session;
 	EMFolderTree *folder_tree;
 	GtkWidget *dialog;
 	struct AcceptData *accept_data;
@@ -178,13 +177,12 @@ apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg)
 
 	shell = e_shell_get_default ();
 	shell_backend = e_shell_get_backend_by_name (shell, "mail");
-	session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
 
 	parent = gtk_widget_get_toplevel (GTK_WIDGET (assistant));
 	parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
 
 	accept_data = g_new0 (struct AcceptData, 1);
-	folder_tree = (EMFolderTree *) em_folder_tree_new (session);
+	folder_tree = (EMFolderTree *) em_folder_tree_new (E_MAIL_BACKEND (shell_backend));
 
 	dialog = em_folder_selector_create_new (parent, folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
 	uri = em_folder_tree_get_selected_uri (folder_tree);
diff --git a/src/plugins/share-folder-common.c b/src/plugins/share-folder-common.c
index 5eb1642..69b585c 100644
--- a/src/plugins/share-folder-common.c
+++ b/src/plugins/share-folder-common.c
@@ -246,7 +246,7 @@ users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
 	struct _EMFolderTreeModelStoreInfo *si;
 	EMFolderSelector *emfs = ssi->emfs;
 	const gchar *uri, *path;
-	EMailSession *session;
+	EMailBackend *mail_backend;
 	CamelService *service = NULL;
 	CamelURL *url;
 
@@ -258,14 +258,14 @@ users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
 
 	uri = em_folder_selector_get_selected_uri (emfs);
 	path = em_folder_selector_get_selected_path (emfs);
-	session = em_folder_tree_get_session (emfs->emft);
+	mail_backend = em_folder_tree_get_backend (emfs->emft);
 
 	d(printf ("Creating new folder: %s (%s)\n", path, uri));
 
 	url = camel_url_new (uri, NULL);
 	if (url != NULL) {
 		service = camel_session_get_service_by_url (
-			CAMEL_SESSION (session), url, CAMEL_PROVIDER_STORE);
+			CAMEL_SESSION (e_mail_backend_get_session (mail_backend)), url, CAMEL_PROVIDER_STORE);
 		camel_url_free (url);
 	}
 
@@ -282,7 +282,7 @@ users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
 	if (CAMEL_IS_VEE_STORE (service)) {
 		EFilterRule *rule;
 
-		rule = em_vfolder_rule_new (session);
+		rule = em_vfolder_rule_new (mail_backend);
 		e_filter_rule_set_name (rule, path);
 		vfolder_gui_add_rule (EM_VFOLDER_RULE (rule));
 		gtk_widget_destroy ((GtkWidget *) emfs);
@@ -348,16 +348,14 @@ gw_new_shared_folder_cb (GtkAction *action, EShellView *shell_view)
 {
 	EMFolderTree *folder_tree;
 	EShellBackend *shell_backend;
-	EMailSession *session;
 	GtkWidget *dialog;
 	gchar *uri;
 	gpointer parent;
 
 	parent = e_shell_view_get_shell_window (shell_view);
 	shell_backend = e_shell_view_get_shell_backend (shell_view);
-	session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
 
-	folder_tree = (EMFolderTree *) em_folder_tree_new (session);
+	folder_tree = (EMFolderTree *) em_folder_tree_new (E_MAIL_BACKEND (shell_backend));
 	emu_restore_folder_tree_state (folder_tree);
 
 	dialog = em_folder_selector_create_new (parent, folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));



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