aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-24 12:40:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-24 12:40:49 +0800
commit174c942e0945a2017f0c479883dce2950e42e786 (patch)
tree0011078b4121d5c6c200825b0ab1bb1c4cefd519 /mail/importers
parentce7537b495a3788d9bda4b6a783a5c3d95309926 (diff)
downloadgsoc2013-evolution-174c942e0945a2017f0c479883dce2950e42e786.tar.gz
gsoc2013-evolution-174c942e0945a2017f0c479883dce2950e42e786.tar.zst
gsoc2013-evolution-174c942e0945a2017f0c479883dce2950e42e786.zip
Split store and local folder management out from shell backend.
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/evolution-mbox-importer.c16
-rw-r--r--mail/importers/mail-importer.c5
2 files changed, 11 insertions, 10 deletions
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 882ce64b25..e44cf57fef 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -40,8 +40,11 @@
#include <camel/camel-exception.h>
+#include "mail/e-mail-local.h"
+#include "mail/e-mail-store.h"
#include "mail/e-mail-shell-backend.h"
#include "mail/em-folder-selection-button.h"
+#include "mail/em-folder-tree-model.h"
#include "mail/mail-mt.h"
#include "mail-importer.h"
@@ -72,21 +75,18 @@ static GtkWidget *
mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *hbox, *w;
- EMFolderTreeModel *model;
- const gchar *local_inbox_folder_uri;
+ const gchar *local_inbox_uri;
- local_inbox_folder_uri = e_mail_shell_backend_get_folder_uri (
- global_mail_shell_backend, E_MAIL_FOLDER_INBOX);
- model = e_mail_shell_backend_get_folder_tree_model (
- global_mail_shell_backend);
+ local_inbox_uri = e_mail_local_get_folder_uri (E_MAIL_FOLDER_INBOX);
hbox = gtk_hbox_new(FALSE, 0);
w = gtk_label_new(_("Destination folder:"));
gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
- w = em_folder_selection_button_new(model, _("Select folder"), _("Select folder to import into"));
- em_folder_selection_button_set_selection((EMFolderSelectionButton *)w, local_inbox_folder_uri);
+ w = em_folder_selection_button_new(
+ _("Select folder"), _("Select folder to import into"));
+ em_folder_selection_button_set_selection((EMFolderSelectionButton *)w, local_inbox_uri);
g_signal_connect(w, "selected", G_CALLBACK(folder_selected), target);
gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index a9e6b59038..1e1f423316 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -48,6 +48,8 @@
#include "mail/mail-mt.h"
#include "mail/mail-tools.h"
+
+#include "mail/e-mail-local.h"
#include "mail/e-mail-shell-backend.h"
#include "mail-importer.h"
@@ -202,8 +204,7 @@ import_mbox_exec (struct _import_mbox_msg *m)
}
if (m->uri == NULL || m->uri[0] == 0)
- folder = e_mail_shell_backend_get_folder (
- global_mail_shell_backend, E_MAIL_FOLDER_INBOX);
+ folder = e_mail_local_get_folder (E_MAIL_FOLDER_INBOX);
else
folder = mail_tool_uri_to_folder(m->uri, CAMEL_STORE_FOLDER_CREATE, &m->base.ex);