[evolution/email-factory-3-4] Port Evolution to EDS's new mail library.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/email-factory-3-4] Port Evolution to EDS's new mail library.
- Date: Thu, 13 Oct 2011 07:31:44 +0000 (UTC)
commit 16184c0072fefbbe4bc822dd340148da5f8411db
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Thu Oct 13 12:54:04 2011 +0530
Port Evolution to EDS's new mail library.
addressbook/gui/widgets/e-addressbook-model.c | 2 +-
calendar/gui/dialogs/comp-editor.c | 2 +-
calendar/gui/dialogs/event-page.c | 2 +-
calendar/gui/dialogs/memo-page.c | 2 +-
calendar/gui/dialogs/task-page.c | 2 +-
calendar/gui/e-cal-model.c | 2 +-
calendar/gui/e-meeting-store.c | 2 +-
calendar/gui/itip-utils.c | 2 +-
capplet/anjal-settings-main.c | 2 +-
capplet/settings/anjal-mail-view.c | 2 +-
capplet/settings/mail-capplet-shell.c | 8 +-
capplet/settings/mail-settings-view.c | 2 +-
capplet/settings/mail-view.c | 2 +-
composer/e-composer-header-table.c | 2 +-
composer/e-composer-header-table.h | 4 +-
composer/e-composer-private.h | 4 +-
composer/e-msg-composer.c | 4 +-
configure.ac | 15 +
e-util/Makefile.am | 24 +-
e-util/e-account-utils.c | 4 +-
e-util/e-signature-list.c | 2 +-
e-util/e-signature-list.h | 2 +-
e-util/e-signature-utils.c | 2 +-
e-util/e-signature-utils.h | 4 +-
e-util/e-signature.c | 2 +-
e-util/e-util.h | 2 +-
e-util/gconf-bridge.c | 2 +-
mail/Makefile.am | 16 +-
mail/e-mail-attachment-bar.c | 2 +-
mail/e-mail-backend.c | 167 +++-
mail/e-mail-backend.h | 2 +-
mail/e-mail-browser.c | 2 +-
mail/e-mail-folder-pane.c | 5 +-
mail/e-mail-folder-utils.c | 4 +-
mail/e-mail-junk-filter.c | 4 +-
mail/e-mail-junk-options.c | 2 +-
mail/e-mail-junk-options.h | 2 +-
mail/e-mail-label-list-store.c | 2 +-
mail/e-mail-local.c | 4 +-
mail/e-mail-local.h | 2 +-
mail/e-mail-message-pane.c | 2 +-
mail/e-mail-migrate.c | 24 +-
mail/e-mail-notebook-view.c | 2 +-
mail/e-mail-paned-view.c | 9 +-
mail/e-mail-reader-utils.c | 9 +-
mail/e-mail-reader.c | 9 +-
mail/e-mail-session-utils.c | 10 +-
mail/e-mail-session-utils.h | 2 +-
mail/e-mail-session.c | 20 +-
mail/e-mail-session.h | 2 +-
mail/e-mail-sidebar.c | 2 +-
mail/e-mail-store-utils.c | 2 +-
mail/e-mail-store.c | 12 +-
mail/e-mail.h | 12 +-
mail/em-account-editor.c | 20 +-
mail/em-composer-utils.c | 17 +-
mail/em-filter-editor.c | 2 +-
mail/em-filter-source-element.c | 2 +-
mail/em-folder-properties.c | 8 +-
mail/em-folder-selection-button.c | 2 +-
mail/em-folder-selector.c | 2 +-
mail/em-folder-tree-model.c | 21 +-
mail/em-folder-tree-model.h | 2 +-
mail/em-folder-tree.c | 20 +-
mail/em-folder-utils.c | 19 +-
mail/em-format-html-print.c | 4 +-
mail/em-format-html.c | 5 +-
mail/em-subscription-editor.c | 10 +-
mail/em-sync-stream.c | 2 +-
mail/em-utils.c | 1068 +-------------------
mail/em-utils.h | 26 +-
mail/em-vfolder-editor.c | 2 +-
mail/em-vfolder-rule.c | 4 +-
mail/importers/elm-importer.c | 2 +-
mail/importers/evolution-mbox-importer.c | 6 +-
mail/importers/mail-importer.c | 12 +-
mail/importers/mail-importer.h | 2 +-
mail/importers/pine-importer.c | 2 +-
mail/mail-autofilter.c | 4 +-
mail/mail-config.c | 12 +-
mail/mail-config.h | 2 +-
mail/mail-folder-cache.c | 18 +-
mail/mail-mt.c | 2 +-
mail/mail-ops.c | 14 +-
mail/mail-ops.h | 2 +-
mail/mail-send-recv.c | 27 +-
mail/mail-tools.c | 6 +-
mail/mail-vfolder.c | 21 +-
mail/message-list.c | 13 +-
modules/addressbook/e-book-shell-content.c | 2 +-
modules/addressbook/e-book-shell-view-private.h | 2 +-
modules/bogofilter/evolution-bogofilter.c | 4 +-
modules/calendar/e-cal-shell-content.c | 2 +-
modules/calendar/e-cal-shell-sidebar.c | 2 +-
modules/calendar/e-cal-shell-view-private.h | 2 +-
modules/calendar/e-memo-shell-content.c | 2 +-
modules/calendar/e-memo-shell-migrate.c | 2 +-
modules/calendar/e-memo-shell-view-private.h | 2 +-
modules/calendar/e-task-shell-content.c | 2 +-
modules/calendar/e-task-shell-view-private.h | 2 +-
modules/mail/Makefile.am | 4 +
modules/mail/e-mail-shell-backend.c | 20 +-
modules/mail/e-mail-shell-content.c | 4 +-
modules/mail/e-mail-shell-view-actions.c | 8 +-
modules/mail/e-mail-shell-view-private.h | 22 +-
modules/mail/em-account-prefs.c | 22 +-
modules/mail/em-composer-prefs.c | 4 +-
modules/online-accounts/e-online-accounts-google.c | 2 +-
.../online-accounts/evolution-online-accounts.c | 2 +-
modules/spamassassin/evolution-spamassassin.c | 4 +-
modules/startup-wizard/evolution-startup-wizard.c | 4 +-
plugins/caldav/caldav-browse-server.c | 2 +-
plugins/dbx-import/dbx-importer.c | 8 +-
plugins/imap-features/imap-headers.c | 2 +-
plugins/itip-formatter/itip-formatter.c | 8 +-
plugins/mail-notification/mail-notification.c | 4 +-
plugins/mail-to-task/mail-to-task.c | 2 +-
.../mailing-list-actions/mailing-list-actions.c | 6 +-
plugins/mark-all-read/mark-all-read.c | 2 +-
plugins/pst-import/pst-importer.c | 6 +-
plugins/templates/templates.c | 8 +-
shell/Makefile.am | 4 +
shell/e-shell-settings.c | 2 +-
shell/e-shell-window-private.h | 2 +-
widgets/misc/e-attachment-paned.c | 2 +-
widgets/misc/e-attachment-store.c | 2 +-
widgets/misc/e-contact-map.c | 2 +-
widgets/misc/e-signature-combo-box.h | 4 +-
widgets/misc/e-signature-editor.c | 2 +-
widgets/misc/e-signature-editor.h | 2 +-
widgets/misc/e-signature-manager.h | 2 +-
widgets/misc/e-signature-preview.c | 2 +-
widgets/misc/e-signature-preview.h | 2 +-
widgets/misc/e-signature-tree-view.h | 4 +-
134 files changed, 567 insertions(+), 1450 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index fa61c4e..f8456d0 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <glib/gi18n.h>
#include "e-addressbook-model.h"
-#include <e-util/e-marshal.h>
+#include <libemail-utils/e-marshal.h>
#include <e-util/e-util.h>
#include "eab-gui-util.h"
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 9c463c6..694129b 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -40,7 +40,7 @@
#include <e-util/e-alert-sink.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
-#include <e-util/gconf-bridge.h>
+#include <libemail-utils/gconf-bridge.h>
#include <shell/e-shell.h>
#include <libedataserver/e-data-server-util.h>
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index b418898..e0a0a3c 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -44,7 +44,7 @@
#include "../e-timezone-entry.h"
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-dialog-widgets.h"
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index cf1e879..b0f0c4a 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -43,7 +43,7 @@
#include "misc/e-buffer-tagger.h"
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-dialog-widgets.h"
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index a533505..923bcda 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -46,7 +46,7 @@
#include "task-page.h"
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-util-private.h"
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 4428d31..eef89a1 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -38,7 +38,7 @@
#include "itip-utils.h"
#include "misc.h"
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-util-enumtypes.h"
typedef struct {
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 833c6a8..c35d451 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -35,7 +35,7 @@
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-proxy.h>
#include <libedataserverui/e-passwords.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-util-enumtypes.h>
#include "itip-utils.h"
#include "e-meeting-utils.h"
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index c2fa19b..2209e8d 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -28,7 +28,7 @@
#include <libedataserver/e-time-utils.h>
#include <gtk/gtk.h>
#include <libical/ical.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-dialog-utils.h>
#include <libecal/e-cal-time-util.h>
#include <libecal/e-cal-util.h>
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index 2bc3268..571eb2f 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -36,7 +36,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libedataserverui/e-passwords.h>
-#include <mail/mail-mt.h>
+#include <libemail-utils/mail-mt.h>
#include "settings/mail-capplet-shell.h"
#include <gconf/gconf-client.h>
#include <libedataserver/e-categories.h>
diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c
index c092653..232b8ff 100644
--- a/capplet/settings/anjal-mail-view.c
+++ b/capplet/settings/anjal-mail-view.c
@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include "mail/em-utils.h"
#include "mail/mail-send-recv.h"
-#include "mail/mail-ops.h"
+#include "libemail-engine/mail-ops.h"
#include "mail/em-folder-tree.h"
struct _AnjalMailViewPrivate {
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index 91a82b6..89f6616 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -39,9 +39,9 @@
#include <mail/em-utils.h>
#include <mail/em-composer-utils.h>
-#include <mail/mail-config.h>
-#include <mail/mail-mt.h>
-#include <mail/e-mail-store.h>
+#include <libemail-engine/mail-config.h>
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/e-mail-store.h>
#include <shell/e-shell.h>
@@ -279,7 +279,7 @@ mail_capplet_shell_construct (MailCappletShell *shell,
mail_config_init (session);
mail_msg_init ();
custom_dir = g_build_filename (e_get_user_data_dir (), "mail", NULL);
- e_mail_store_init (shell->priv->backend, custom_dir);
+ e_mail_store_init (session, custom_dir);
g_free (custom_dir);
if (just_druid) {
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index a699dca..80e8a6a 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -28,7 +28,7 @@
#include "mail-settings-view.h"
#include <libedataserver/e-account-list.h>
#include "mail-view.h"
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
struct _MailSettingsViewPrivate {
GtkWidget *tab_str;
diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c
index 53daf3f..4477be5 100644
--- a/capplet/settings/mail-view.c
+++ b/capplet/settings/mail-view.c
@@ -27,7 +27,7 @@
#include <glib/gi18n.h>
#include "mail/em-utils.h"
#include "mail/mail-send-recv.h"
-#include "mail/mail-ops.h"
+#include "libemail-engine/mail-ops.h"
#include "mail-view.h"
#ifndef ANJAL_SETTINGS
#include "mail-folder-view.h"
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 2dd94eb..9150ab7 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -25,7 +25,7 @@
#include <libedataserverui/e-name-selector.h>
#include <shell/e-shell.h>
-#include <e-util/gconf-bridge.h>
+#include <libemail-utils/gconf-bridge.h>
#include <misc/e-signature-combo-box.h>
#include "e-msg-composer.h"
diff --git a/composer/e-composer-header-table.h b/composer/e-composer-header-table.h
index f7edec0..f29fcf5 100644
--- a/composer/e-composer-header-table.h
+++ b/composer/e-composer-header-table.h
@@ -23,8 +23,8 @@
#include <libebook/e-destination.h>
#include <shell/e-shell.h>
-#include <e-util/e-signature.h>
-#include <e-util/e-signature-list.h>
+#include <libemail-utils/e-signature.h>
+#include <libemail-utils/e-signature-list.h>
#include <composer/e-composer-header.h>
/* Standard GObject macros */
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 35eb266..02c3add 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -40,12 +40,12 @@
#include "e-composer-header-table.h"
#include "e-util/e-alert-sink.h"
#include "e-util/e-charset.h"
-#include "e-util/e-marshal.h"
+#include "libemail-utils/e-marshal.h"
#include "e-util/e-mktemp.h"
#include "e-util/e-plugin-ui.h"
#include "e-util/e-selection.h"
#include "e-util/e-util.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "widgets/misc/e-activity-bar.h"
#include "widgets/misc/e-alert-bar.h"
#include "widgets/misc/e-attachment.h"
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index ba7a7a4..d02f905 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -37,10 +37,10 @@
#include <ctype.h>
#include <fcntl.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-dialog-utils.h"
-#include "e-util/e-signature-utils.h"
+#include "libemail-utils/e-signature-utils.h"
#include "e-util/e-util-private.h"
#include "em-format/em-format.h"
#include "em-format/em-format-quote.h"
diff --git a/configure.ac b/configure.ac
index 5d079c1..435be9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1234,6 +1234,21 @@ AC_SUBST(E_UTIL_LIBS)
E_UTIL_LIBS="$E_UTIL_LIBS $MATH_LIB"
+dnl ************
+dnl EMAILS_UTILS Flags
+dnl ************
+EVO_SET_COMPILE_FLAGS(EMAIL_UTILS, libemail-utils)
+AC_SUBST(EMAIL_UTILS_CFLAGS)
+AC_SUBST(EMAIL_UTILS_LIBS)
+
+dnl ************
+dnl EMAIL_ENGINE Flags
+dnl ************
+EVO_SET_COMPILE_FLAGS(EMAIL_ENGINE, libemail-engine)
+AC_SUBST(EMAIL_ENGINE_CFLAGS)
+AC_SUBST(EMAIL_ENGINE_LIBS)
+
+
dnl **************
dnl TZDIALOG Flags
dnl **************
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 42fda2d..aa79242 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -9,7 +9,6 @@ glib_enum_define=E
glib_enum_prefix=e
ENUM_GENERATED = e-util-enumtypes.h e-util-enumtypes.c
-MARSHAL_GENERATED = e-marshal.c e-marshal.h
if OS_WIN32
PLATFORM_SOURCES = e-win32-reloc.c e-win32-defaults.c e-win32-defaults.h
@@ -18,7 +17,6 @@ endif
privsolib_LTLIBRARIES = libeutil.la
eutilinclude_HEADERS = \
- e-account-utils.h \
e-activity.h \
e-alert.h \
e-alert-dialog.h \
@@ -35,7 +33,6 @@ eutilinclude_HEADERS = \
e-html-utils.h \
e-icon-factory.h \
e-import.h \
- e-marshal.h \
e-mktemp.h \
e-poolv.h \
e-print.h \
@@ -43,9 +40,6 @@ eutilinclude_HEADERS = \
e-plugin-ui.h \
e-plugin-util.h \
e-selection.h \
- e-signature.h \
- e-signature-list.h \
- e-signature-utils.h \
e-sorter.h \
e-sorter-array.h \
e-text-event-processor-emacs-like.h \
@@ -56,8 +50,7 @@ eutilinclude_HEADERS = \
e-util-enums.h \
e-util-enumtypes.h \
e-unicode.h \
- e-xml-utils.h \
- gconf-bridge.h
+ e-xml-utils.h
libeutil_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -86,11 +79,11 @@ libeutil_la_CPPFLAGS = \
-DEVOLUTION_RULEDIR=\"$(ruledir)\" \
-DG_LOG_DOMAIN=\"e-utils\" \
$(GNOME_PLATFORM_CFLAGS) \
- $(E_UTIL_CFLAGS)
+ $(E_UTIL_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS)
libeutil_la_SOURCES = \
$(eutilinclude_HEADERS) \
- e-account-utils.c \
e-activity.c \
e-alert.c \
e-alert-dialog.c \
@@ -107,7 +100,6 @@ libeutil_la_SOURCES = \
e-html-utils.c \
e-icon-factory.c \
e-import.c \
- e-marshal.c \
e-mktemp.c \
e-poolv.c \
e-plugin.c \
@@ -115,9 +107,6 @@ libeutil_la_SOURCES = \
e-plugin-util.c \
e-print.c \
e-selection.c \
- e-signature.c \
- e-signature-list.c \
- e-signature-utils.c \
e-sorter.c \
e-sorter-array.c \
e-text-event-processor-emacs-like.c \
@@ -128,7 +117,6 @@ libeutil_la_SOURCES = \
e-util-enumtypes.c \
e-util-private.h \
e-xml-utils.c \
- gconf-bridge.c \
$(PLATFORM_SOURCES)
libeutil_la_LDFLAGS = $(NO_UNDEFINED)
@@ -136,6 +124,7 @@ libeutil_la_LDFLAGS = $(NO_UNDEFINED)
libeutil_la_LIBADD = \
$(ICONV_LIBS) \
$(E_UTIL_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(INTLLIBS)
@@ -144,10 +133,9 @@ errordir = $(privdatadir)/errors
@EVO_PLUGIN_RULE@
EXTRA_DIST = \
- e-system.error.xml \
- e-marshal.list
+ e-system.error.xml
-BUILT_SOURCES = $(ENUM_GENERATED) $(MARSHAL_GENERATED) $(error_DATA)
+BUILT_SOURCES = $(ENUM_GENERATED) $(error_DATA)
CLEANFILES = $(BUILT_SOURCES)
dist-hook:
diff --git a/e-util/e-account-utils.c b/e-util/e-account-utils.c
index 6e64d45..93af394 100644
--- a/e-util/e-account-utils.c
+++ b/e-util/e-account-utils.c
@@ -17,14 +17,14 @@
/**
* SECTION: e-account-utils
- * @include: e-util/e-account-utils.h
+ * @include: libemail-utils/e-account-utils.h
**/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include "e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include <string.h>
#include <gconf/gconf-client.h>
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index 1f03cd3..7d7c4c4 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -25,7 +25,7 @@
#include <config.h>
#endif
-#include "e-signature-list.h"
+#include "libemail-utils/e-signature-list.h"
#include <string.h>
diff --git a/e-util/e-signature-list.h b/e-util/e-signature-list.h
index f2c9df7..8a529b3 100644
--- a/e-util/e-signature-list.h
+++ b/e-util/e-signature-list.h
@@ -25,7 +25,7 @@
#define E_SIGNATURE_LIST_H
#include <libedataserver/e-list.h>
-#include <e-util/e-signature.h>
+#include <libemail-utils/e-signature.h>
#include <gconf/gconf-client.h>
diff --git a/e-util/e-signature-utils.c b/e-util/e-signature-utils.c
index fca51d3..4098dab 100644
--- a/e-util/e-signature-utils.c
+++ b/e-util/e-signature-utils.c
@@ -21,7 +21,7 @@
#include <config.h>
#endif
-#include "e-signature-utils.h"
+#include "libemail-utils/e-signature-utils.h"
#include <errno.h>
#include <camel/camel.h>
diff --git a/e-util/e-signature-utils.h b/e-util/e-signature-utils.h
index 56f8564..a642a13 100644
--- a/e-util/e-signature-utils.h
+++ b/e-util/e-signature-utils.h
@@ -21,8 +21,8 @@
#define E_SIGNATURE_UTILS_H
#include <gtk/gtk.h>
-#include <e-util/e-signature.h>
-#include <e-util/e-signature-list.h>
+#include <libemail-utils/e-signature.h>
+#include <libemail-utils/e-signature-list.h>
G_BEGIN_DECLS
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 185378d..2d6af66 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -34,7 +34,7 @@
#include <libedataserver/e-uid.h>
#include <libedataserver/e-data-server-util.h>
-#include "e-signature.h"
+#include "libemail-utils/e-signature.h"
struct _ESignaturePrivate {
gchar *filename;
diff --git a/e-util/e-util.h b/e-util/e-util.h
index cb88a90..3798964 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -28,7 +28,7 @@
#include <limits.h>
#include <gconf/gconf-client.h>
-#include <e-util/e-marshal.h>
+#include <libemail-utils/e-marshal.h>
#include <e-util/e-util-enums.h>
#include <libedataserver/e-source-list.h>
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index 3de48b6..e3d5593 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <stdlib.h>
-#include "gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
struct _GConfBridge {
GConfClient *client;
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 97a2fe3..8cf8b7c 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -30,6 +30,8 @@ libevolution_mail_la_CPPFLAGS = \
$(CERT_UI_CFLAGS) \
$(CANBERRA_CFLAGS) \
$(CLUTTER_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS) \
+ $(EMAIL_ENGINE_CFLAGS) \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
@@ -129,23 +131,16 @@ libevolution_mail_la_SOURCES = \
e-mail-browser.c \
e-mail-display.c \
e-mail-enumtypes.c \
- e-mail-folder-utils.c \
- e-mail-junk-filter.c \
e-mail-junk-options.c \
e-mail-label-action.c \
e-mail-label-dialog.c \
e-mail-label-list-store.c \
e-mail-label-manager.c \
e-mail-label-tree-view.c \
- e-mail-local.c \
e-mail-migrate.c \
e-mail-reader.c \
e-mail-reader-utils.c \
- e-mail-session.c \
- e-mail-session-utils.c \
e-mail-sidebar.c \
- e-mail-store.c \
- e-mail-store-utils.c \
e-mail-tag-editor.c \
em-account-editor.c \
em-composer-utils.c \
@@ -175,12 +170,7 @@ libevolution_mail_la_SOURCES = \
em-vfolder-editor.c \
em-vfolder-rule.c \
mail-autofilter.c \
- mail-config.c \
- mail-folder-cache.c \
- mail-mt.c \
- mail-ops.c \
mail-send-recv.c \
- mail-tools.c \
mail-vfolder.c \
message-list.c
@@ -210,6 +200,8 @@ libevolution_mail_la_LIBADD = \
$(top_builddir)/em-format/libemformat.la \
$(top_builddir)/filter/libfilter.la \
$(EVOLUTION_MAIL_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
+ $(EMAIL_ENGINE_LIBS) \
$(CERT_UI_LIBS) \
$(CANBERRA_LIBS) \
$(CLUTTER_LIBS) \
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 17a7ae1..4561868 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -27,7 +27,7 @@
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5768934..278287c 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -32,7 +32,7 @@
#include <glib/gstdio.h>
#include <libedataserver/e-data-server-util.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-alert-sink.h"
@@ -40,20 +40,22 @@
#include "shell/e-shell.h"
-#include "mail/e-mail-folder-utils.h"
-#include "mail/e-mail-local.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
#include "mail/e-mail-migrate.h"
-#include "mail/e-mail-session.h"
-#include "mail/e-mail-store.h"
-#include "mail/e-mail-store-utils.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store.h"
+#include "libemail-engine/e-mail-store-utils.h"
+#include "libemail-engine/e-mail-utils.h"
#include "mail/em-event.h"
#include "mail/em-folder-tree-model.h"
#include "mail/em-utils.h"
#include "mail/mail-autofilter.h"
-#include "mail/mail-config.h"
-#include "mail/mail-folder-cache.h"
-#include "mail/mail-ops.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-engine/mail-ops.h"
#include "mail/mail-vfolder.h"
+#include "mail/mail-send-recv.h"
#define E_MAIL_BACKEND_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -171,7 +173,7 @@ mail_backend_prepare_for_offline_cb (EShell *shell,
}
e_mail_store_foreach (
- backend, (GFunc) mail_store_prepare_for_offline_cb, activity);
+ session, (GFunc) mail_store_prepare_for_offline_cb, activity);
}
/* Helper for mail_backend_prepare_for_online_cb() */
@@ -197,7 +199,7 @@ mail_backend_prepare_for_online_cb (EShell *shell,
camel_session_set_online (CAMEL_SESSION (session), TRUE);
e_mail_store_foreach (
- backend, (GFunc) mail_store_prepare_for_online_cb, activity);
+ session, (GFunc) mail_store_prepare_for_online_cb, activity);
}
/* Helper for mail_backend_prepare_for_quit_cb() */
@@ -274,12 +276,14 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
EAccountList *account_list;
gboolean delete_junk;
gboolean empty_trash;
+ EMailSession *session;
struct {
EActivity *activity;
gboolean empty_trash;
} sync_data;
+ session = e_mail_backend_get_session (backend);
delete_junk = e_mail_backend_delete_junk_policy_decision (backend);
empty_trash = e_mail_backend_empty_trash_policy_decision (backend);
@@ -295,13 +299,13 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
if (delete_junk)
e_mail_store_foreach (
- backend, (GFunc) mail_backend_delete_junk, backend);
+ session, (GFunc) mail_backend_delete_junk, backend);
sync_data.activity = activity;
sync_data.empty_trash = empty_trash;
e_mail_store_foreach (
- backend, (GFunc) mail_backend_final_sync, &sync_data);
+ session, (GFunc) mail_backend_final_sync, &sync_data);
/* Now we poll until all activities are actually cancelled or finished.
* Reffing the activity delays quitting; the reference count
@@ -730,6 +734,125 @@ mail_backend_finalize (GObject *object)
}
static void
+mail_backend_add_store (EMailSession *session,
+ CamelStore *store,
+ EMailBackend *backend)
+{
+ EMFolderTreeModel *model;
+
+ model = em_folder_tree_model_get_default ();
+ em_folder_tree_model_add_store (model, store);
+}
+
+static void
+mail_backend_remove_store (EMailSession *session,
+ CamelStore *store,
+ EMailBackend *backend)
+{
+ EMFolderTreeModel *model;
+
+ model = em_folder_tree_model_get_default ();
+ em_folder_tree_model_remove_store (model, store);
+}
+
+#define SET_ACITIVITY(cancellable,activity) g_object_set_data ((GObject *)cancellable, "e-activity", activity)
+#define GET_ACITIVITY(cancellable) g_object_get_data ((GObject *)cancellable, "e-activity")
+
+static void
+mail_mt_create_activity (GCancellable *cancellable)
+{
+ EActivity *activity;
+
+ activity = e_activity_new ();
+ e_activity_set_percent (activity, 0.0);
+ e_activity_set_cancellable (activity, cancellable);
+ SET_ACITIVITY (cancellable, activity);
+}
+static void
+mail_mt_submit_activity (GCancellable *cancellable)
+{
+ EShell *shell;
+ EShellBackend *shell_backend;
+ EActivity *activity;
+
+ shell = e_shell_get_default ();
+ shell_backend = e_shell_get_backend_by_name (
+ shell, "mail");
+
+ activity = GET_ACITIVITY (cancellable);
+ if (activity)
+ e_shell_backend_add_activity (shell_backend, activity);
+
+}
+
+static void
+mail_mt_free_activity (GCancellable *cancellable)
+{
+ EActivity *activity = GET_ACITIVITY (cancellable);
+
+ if (activity)
+ g_object_unref (activity);
+}
+
+static void
+mail_mt_complete_acitivity (GCancellable *cancellable)
+{
+ EActivity *activity = GET_ACITIVITY (cancellable);
+
+ if (activity)
+ e_activity_set_state (activity, E_ACTIVITY_COMPLETED);
+}
+
+static void
+mail_mt_cancel_activity (GCancellable *cancellable)
+{
+ EActivity *activity = GET_ACITIVITY (cancellable);
+
+ if (activity)
+ e_activity_set_state (activity, E_ACTIVITY_CANCELLED);
+}
+
+static void
+mail_mt_alert_error (const char *what, const char *message)
+{
+ EShell *shell;
+ EShellView *shell_view;
+ EShellWindow *shell_window = NULL;
+ EShellContent *shell_content;
+ GList *list, *iter;
+
+ shell = e_shell_get_default ();
+
+ /* Find the most recently used EShellWindow. */
+ list = e_shell_get_watched_windows (shell);
+ for (iter = list; iter != NULL; iter = g_list_next (iter)) {
+ if (E_IS_SHELL_WINDOW (iter->data)) {
+ shell_window = E_SHELL_WINDOW (iter->data);
+ break;
+ }
+ }
+
+ /* If we can't find an EShellWindow then... well, screw it. */
+ if (shell_window == NULL)
+ return;
+
+ shell_view = e_shell_window_get_shell_view (
+ shell_window, "mail");
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ if (what) {
+ e_alert_submit (
+ E_ALERT_SINK (shell_content),
+ "mail:async-error", what,
+ message, NULL);
+ } else
+ e_alert_submit (
+ E_ALERT_SINK (shell_content),
+ "mail:async-error-nodescribe",
+ message, NULL);
+}
+
+static void
mail_backend_constructed (GObject *object)
{
EMailBackendPrivate *priv;
@@ -749,6 +872,7 @@ mail_backend_constructed (GObject *object)
camel_provider_init ();
priv->session = e_mail_session_new ();
+ g_signal_connect (priv->session, "flush-outbox", G_CALLBACK(mail_send), priv->session);
folder_cache = e_mail_session_get_folder_cache (priv->session);
g_object_bind_property (
@@ -779,6 +903,16 @@ mail_backend_constructed (GObject *object)
folder_tree_model, E_MAIL_BACKEND (object));
g_signal_connect (
+ priv->session, "store-added",
+ G_CALLBACK (mail_backend_add_store),
+ shell_backend);
+
+ g_signal_connect (
+ priv->session, "store-removed",
+ G_CALLBACK (mail_backend_remove_store),
+ shell_backend);
+
+ g_signal_connect (
shell, "prepare-for-offline",
G_CALLBACK (mail_backend_prepare_for_offline_cb),
shell_backend);
@@ -814,7 +948,12 @@ mail_backend_constructed (GObject *object)
mail_config_init (priv->session);
mail_msg_init ();
-
+ mail_msg_register_activities (mail_mt_create_activity,
+ mail_mt_submit_activity,
+ mail_mt_free_activity,
+ mail_mt_complete_acitivity,
+ mail_mt_cancel_activity,
+ mail_mt_alert_error);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_mail_backend_parent_class)->constructed (object);
}
diff --git a/mail/e-mail-backend.h b/mail/e-mail-backend.h
index 4d3cc10..197df74 100644
--- a/mail/e-mail-backend.h
+++ b/mail/e-mail-backend.h
@@ -26,7 +26,7 @@
#ifndef E_MAIL_BACKEND_H
#define E_MAIL_BACKEND_H
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
#include <shell/e-shell-backend.h>
/* Standard GObject macros */
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 95084c6..1391b7d 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -31,7 +31,7 @@
#include "e-util/e-util.h"
#include "e-util/e-plugin-ui.h"
#include "e-util/e-alert-dialog.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell.h"
#include "shell/e-shell-utils.h"
#include "shell/e-shell-settings.h"
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c
index e9aa029..522234a 100644
--- a/mail/e-mail-folder-pane.c
+++ b/mail/e-mail-folder-pane.c
@@ -30,7 +30,7 @@
#include "e-util/e-util.h"
#include "e-util/e-plugin-ui.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-popup-action.h"
@@ -42,7 +42,8 @@
#include "mail/em-format-html-display.h"
#include "mail/em-composer-utils.h"
#include "mail/em-utils.h"
-#include "mail/mail-tools.h"
+#include "libemail-engine/mail-tools.h"
+#include "libemail-engine/e-mail-utils.h"
#include "mail/message-list.h"
struct _EMailFolderPanePrivate {
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c
index 77a9708..cf99526 100644
--- a/mail/e-mail-folder-utils.c
+++ b/mail/e-mail-folder-utils.c
@@ -20,11 +20,11 @@
#include <config.h>
#endif
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include <glib/gi18n-lib.h>
-#include "mail/mail-tools.h"
+#include "libemail-engine/mail-tools.h"
/* X-Mailer header value */
#define X_MAILER ("Evolution " VERSION SUB_VERSION " " VERSION_COMMENT)
diff --git a/mail/e-mail-junk-filter.c b/mail/e-mail-junk-filter.c
index 7112801..dd2f159 100644
--- a/mail/e-mail-junk-filter.c
+++ b/mail/e-mail-junk-filter.c
@@ -16,9 +16,9 @@
*
*/
-#include "e-mail-junk-filter.h"
+#include "libemail-engine/e-mail-junk-filter.h"
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
G_DEFINE_ABSTRACT_TYPE (
EMailJunkFilter,
diff --git a/mail/e-mail-junk-options.c b/mail/e-mail-junk-options.c
index d57e1d6..e2c670c 100644
--- a/mail/e-mail-junk-options.c
+++ b/mail/e-mail-junk-options.c
@@ -21,7 +21,7 @@
#include <config.h>
#include <glib/gi18n-lib.h>
-#include <mail/e-mail-junk-filter.h>
+#include <libemail-engine/e-mail-junk-filter.h>
#define E_MAIL_JUNK_OPTIONS_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/mail/e-mail-junk-options.h b/mail/e-mail-junk-options.h
index 5e2c99f..7e9108e 100644
--- a/mail/e-mail-junk-options.h
+++ b/mail/e-mail-junk-options.h
@@ -20,7 +20,7 @@
#define E_MAIL_JUNK_OPTIONS_H
#include <gtk/gtk.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_JUNK_OPTIONS \
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index f604893..8f00ee3 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -27,7 +27,7 @@
#include <glib/gi18n.h>
#include <camel/camel.h>
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
struct _EMailLabelListStorePrivate {
GHashTable *tag_index;
diff --git a/mail/e-mail-local.c b/mail/e-mail-local.c
index 1f33c08..ddf1a20 100644
--- a/mail/e-mail-local.c
+++ b/mail/e-mail-local.c
@@ -23,11 +23,11 @@
#include <config.h>
#endif
-#include "e-mail-local.h"
+#include "libemail-engine/e-mail-local.h"
#include <glib/gi18n.h>
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#define CHECK_LOCAL_FOLDER_TYPE(type) \
((type) < G_N_ELEMENTS (default_local_folders))
diff --git a/mail/e-mail-local.h b/mail/e-mail-local.h
index 282a0fe..f80bcbb 100644
--- a/mail/e-mail-local.h
+++ b/mail/e-mail-local.h
@@ -24,7 +24,7 @@
#include <camel/camel.h>
#include <mail/e-mail-enums.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
G_BEGIN_DECLS
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c
index e77974b..65a3932 100644
--- a/mail/e-mail-message-pane.c
+++ b/mail/e-mail-message-pane.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "mail/e-mail-reader.h"
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 10afa58..6f1c1aa 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -53,19 +53,19 @@
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-xml-utils.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-util-private.h"
#include "e-util/e-plugin.h"
-#include "e-util/e-signature-utils.h"
+#include "libemail-utils/e-signature-utils.h"
#include "shell/e-shell.h"
#include "shell/e-shell-migrate.h"
#include "e-mail-backend.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#include "em-utils.h"
#define d(x) x
@@ -707,15 +707,17 @@ migrate_to_db (EShellBackend *shell_backend)
CamelFolderInfo *info;
CamelURL *url;
const gchar *data_dir;
-
+ EMailSession *msession;
+
if (!(accounts = e_get_account_list ()))
return;
mail_backend = E_MAIL_BACKEND (shell_backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
+ msession = e_mail_backend_get_session (mail_backend);
/* Initialize the mail stores early so we can add a new one. */
- e_mail_store_init (mail_backend, data_dir);
+ e_mail_store_init (msession, data_dir);
iter = e_list_get_iterator ((EList *) accounts);
len = e_list_length ((EList *) accounts);
@@ -770,7 +772,7 @@ migrate_to_db (EShellBackend *shell_backend)
&& strncmp (service->url, "mbox:", 5) != 0) {
store = e_mail_store_add_by_account (
- mail_backend, account);
+ msession, account);
info = camel_store_get_folder_info_sync (
store, NULL,
@@ -1024,12 +1026,14 @@ create_mbox_account (EShellBackend *shell_backend,
EAccount *account;
const gchar *data_dir;
gchar *name, *id, *temp, *uri, *folder_uri;
+ EMailSession *msession;
mail_backend = E_MAIL_BACKEND (shell_backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
+ msession = e_mail_backend_get_session (mail_backend);
/* Initialize the mail stores early so we can add a new one. */
- e_mail_store_init (mail_backend, data_dir);
+ e_mail_store_init (msession, data_dir);
account = e_account_new ();
account->enabled = TRUE;
@@ -1063,7 +1067,7 @@ create_mbox_account (EShellBackend *shell_backend,
}
e_account_list_add (accounts, account);
- store = e_mail_store_add_by_account (mail_backend, account);
+ store = e_mail_store_add_by_account (msession, account);
folder_uri = e_mail_folder_uri_build (store, "Sent");
e_account_set_string (
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index e737b88..5ad393c 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -31,7 +31,7 @@
#include "mail/em-folder-tree.h"
#include "e-mail-notebook-view.h"
#include "e-mail-folder-pane.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include "e-mail-message-pane.h"
#include <shell/e-shell-window-actions.h>
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index c9ebb8a..50a7979 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -30,7 +30,7 @@
#include <libedataserver/e-data-server-util.h>
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/menus/gal-view-instance.h"
#include "widgets/misc/e-paned.h"
@@ -40,10 +40,11 @@
#include <shell/e-shell-window-actions.h>
#include "em-utils.h"
-#include "mail-config.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-engine/mail-ops.h"
#include "message-list.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
#include "e-mail-reader-utils.h"
#define E_SHELL_WINDOW_ACTION_GROUP_MAIL(window) \
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 725a0c6..0f6a6e3 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -39,14 +39,15 @@
#include "mail/e-mail-backend.h"
#include "mail/e-mail-browser.h"
-#include "mail/e-mail-folder-utils.h"
-#include "mail/e-mail-local.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/e-mail-local.h"
#include "mail/em-composer-utils.h"
#include "mail/em-format-html-print.h"
#include "mail/em-utils.h"
#include "mail/mail-autofilter.h"
-#include "mail/mail-ops.h"
-#include "mail/mail-tools.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "mail/mail-vfolder.h"
#include "mail/message-list.h"
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 9209942..ee4eeaa 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -32,11 +32,11 @@
#include <X11/XF86keysym.h>
#endif
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-charset.h"
#include "e-util/e-util.h"
#include "e-util/e-alert-dialog.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-popup-action.h"
#include "widgets/misc/e-menu-tool-action.h"
@@ -52,8 +52,9 @@
#include "mail/em-folder-tree.h"
#include "mail/em-utils.h"
#include "mail/mail-autofilter.h"
-#include "mail/mail-ops.h"
-#include "mail/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-utils/mail-mt.h"
#include "mail/mail-vfolder.h"
#include "mail/message-list.h"
diff --git a/mail/e-mail-session-utils.c b/mail/e-mail-session-utils.c
index 217e7e2..ece1d2f 100644
--- a/mail/e-mail-session-utils.c
+++ b/mail/e-mail-session-utils.c
@@ -20,16 +20,16 @@
#include <config.h>
#endif
-#include "e-mail-session-utils.h"
+#include "libemail-engine/e-mail-session-utils.h"
#include "em-utils.h"
#include <glib/gi18n-lib.h>
-#include <mail/mail-tools.h>
-#include <mail/e-mail-local.h>
-#include <mail/e-mail-folder-utils.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-engine/mail-tools.h>
+#include <libemail-engine/e-mail-local.h>
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <filter/e-filter-rule.h>
/* X-Mailer header value */
diff --git a/mail/e-mail-session-utils.h b/mail/e-mail-session-utils.h
index b398be5..2c92216 100644
--- a/mail/e-mail-session-utils.h
+++ b/mail/e-mail-session-utils.h
@@ -21,7 +21,7 @@
/* High-level operations with Evolution-specific policies. */
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
#define E_MAIL_ERROR (e_mail_error_quark ())
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 45c8e02..70fc061 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -50,24 +50,24 @@
#include <libedataserverui/e-passwords.h>
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-junk-filter.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-junk-filter.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
#include "em-composer-utils.h"
#include "em-filter-context.h"
#include "em-filter-rule.h"
#include "em-utils.h"
-#include "mail-config.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
#include "mail-send-recv.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-tools.h"
#define E_MAIL_SESSION_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/mail/e-mail-session.h b/mail/e-mail-session.h
index 165b335..b82c6e9 100644
--- a/mail/e-mail-session.h
+++ b/mail/e-mail-session.h
@@ -26,7 +26,7 @@
#define E_MAIL_SESSION_H
#include <camel/camel.h>
-#include <mail/mail-folder-cache.h>
+#include <libemail-engine/mail-folder-cache.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_SESSION \
diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c
index 35048f8..4cd1649 100644
--- a/mail/e-mail-sidebar.c
+++ b/mail/e-mail-sidebar.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <camel/camel.h>
-#include "mail/e-mail-local.h"
+#include "libemail-engine/e-mail-local.h"
#include "mail/em-utils.h"
#define E_MAIL_SIDEBAR_GET_PRIVATE(obj) \
diff --git a/mail/e-mail-store-utils.c b/mail/e-mail-store-utils.c
index 0bf70ae..487d16d 100644
--- a/mail/e-mail-store-utils.c
+++ b/mail/e-mail-store-utils.c
@@ -22,7 +22,7 @@
#include "em-utils.h"
-#include "e-mail-store-utils.h"
+#include "libemail-engine/e-mail-store-utils.h"
#include <glib/gi18n-lib.h>
diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c
index e59e7b2..e34e820 100644
--- a/mail/e-mail-store.c
+++ b/mail/e-mail-store.c
@@ -23,21 +23,21 @@
#include <config.h>
#endif
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-store.h"
#include <glib/gi18n.h>
#include <camel/camel.h>
#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
-#include "mail/e-mail-local.h"
+#include "libemail-engine/e-mail-local.h"
#include "mail/em-folder-tree-model.h"
#include "mail/em-utils.h"
-#include "mail/mail-folder-cache.h"
-#include "mail/mail-mt.h"
-#include "mail/mail-ops.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
#include "shell/e-shell.h"
#include "shell/e-shell-settings.h"
diff --git a/mail/e-mail.h b/mail/e-mail.h
index 7c40b20..0b9b6e5 100644
--- a/mail/e-mail.h
+++ b/mail/e-mail.h
@@ -26,24 +26,24 @@
#include <mail/e-mail-enums.h>
#include <mail/e-mail-enumtypes.h>
#include <mail/e-mail-folder-pane.h>
-#include <mail/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-folder-utils.h>
#include <mail/e-mail-label-action.h>
#include <mail/e-mail-label-dialog.h>
#include <mail/e-mail-label-list-store.h>
#include <mail/e-mail-label-manager.h>
#include <mail/e-mail-label-tree-view.h>
-#include <mail/e-mail-local.h>
+#include <libemail-engine/e-mail-local.h>
#include <mail/e-mail-message-pane.h>
#include <mail/e-mail-migrate.h>
#include <mail/e-mail-notebook-view.h>
#include <mail/e-mail-paned-view.h>
#include <mail/e-mail-reader.h>
#include <mail/e-mail-reader-utils.h>
-#include <mail/e-mail-session.h>
-#include <mail/e-mail-session-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/e-mail-session-utils.h>
#include <mail/e-mail-sidebar.h>
-#include <mail/e-mail-store.h>
-#include <mail/e-mail-store-utils.h>
+#include <libemail-engine/e-mail-store.h>
+#include <libemail-engine/e-mail-store-utils.h>
#include <mail/e-mail-tag-editor.h>
#include <mail/e-mail-view.h>
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 8ec881b..a3c7bf4 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -49,26 +49,26 @@
#include "shell/e-shell.h"
#include "e-util/e-util.h"
#include "e-util/e-alert-dialog.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-dialog-utils.h"
-#include "e-util/e-signature-list.h"
-#include "e-util/e-signature-utils.h"
+#include "libemail-utils/e-signature-list.h"
+#include "libemail-utils/e-signature-utils.h"
#include "e-util/e-util-private.h"
#include "widgets/misc/e-signature-editor.h"
#include "widgets/misc/e-port-entry.h"
#include "e-mail-backend.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include "e-mail-junk-options.h"
-#include "e-mail-local.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#include "em-config.h"
#include "em-folder-selection-button.h"
#include "em-account-editor.h"
#include "mail-send-recv.h"
#include "em-utils.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-utils/mail-mt.h"
#if defined (HAVE_NSS) && defined (ENABLE_SMIME)
#include "smime/gui/e-cert-selector.h"
@@ -4108,9 +4108,11 @@ emae_commit (EConfig *ec,
&& emae->priv->source.provider
&& (emae->priv->source.provider->flags & CAMEL_PROVIDER_IS_STORAGE)) {
EMailBackend *backend;
+ EMailSession *session;
backend = em_account_editor_get_backend (emae);
- e_mail_store_add_by_account (backend, account);
+ session = e_mail_backend_get_session (backend);
+ e_mail_store_add_by_account (session, account);
}
}
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 837cc31..a2c4897 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -32,22 +32,23 @@
#include <libedataserver/e-data-server-util.h>
#include <glib/gi18n.h>
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "mail-send-recv.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "e-util/e-alert-sink.h"
#include "e-util/e-util.h"
#include "shell/e-shell.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
-#include "e-mail-session-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-session-utils.h"
#include "em-utils.h"
#include "em-composer-utils.h"
#include "composer/e-msg-composer.h"
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index b92e202..ced04fa 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -30,7 +30,7 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "em-filter-editor.h"
#include "em-filter-rule.h"
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index b95c140..90daa03 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -34,7 +34,7 @@
#include <libedataserver/e-sexp.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <filter/e-filter-part.h>
#define EM_FILTER_SOURCE_ELEMENT_GET_PRIVATE(obj) \
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index a89abcd..6d8891e 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -35,10 +35,10 @@
#include "em-config.h"
#include "e-mail-backend.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-utils/mail-mt.h"
#include "mail-vfolder.h"
typedef struct _AsyncContext AsyncContext;
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 9aa198f..583c992 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include <e-util/e-util.h>
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include "em-folder-tree.h"
#include "em-folder-selector.h"
#include "em-utils.h"
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 94f83c2..8608a2e 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -29,7 +29,7 @@
#include <glib/gi18n.h>
#include <e-util/e-util.h>
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-session.h"
#include "em-folder-tree.h"
#include "em-folder-selector.h"
#include "em-folder-utils.h"
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 1e78407..2f654d8 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -37,22 +37,23 @@
#include <glib/gi18n.h>
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
-#include "mail-tools.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
/* sigh, these 2 only needed for outbox total count checking - a mess */
-#include "mail-folder-cache.h"
+#include "libemail-engine/mail-folder-cache.h"
#include "em-utils.h"
#include "em-folder-utils.h"
#include "em-event.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#include "shell/e-shell.h"
#define EM_FOLDER_TREE_MODEL_GET_PRIVATE(obj) \
@@ -288,10 +289,12 @@ account_added_cb (EAccountList *accounts,
EMFolderTreeModel *model)
{
EMailBackend *backend;
+ EMailSession *session;
backend = em_folder_tree_model_get_backend (model);
- e_mail_store_add_by_account (backend, account);
+ session = e_mail_backend_get_session (backend);
+ e_mail_store_add_by_account (session, account);
}
static void
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 0ed007a..9478732 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -27,7 +27,7 @@
#include <camel/camel.h>
#include <mail/e-mail-backend.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
/* Standard GObject macros */
#define EM_TYPE_FOLDER_TREE_MODEL \
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 1d831cc..329461e 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -48,9 +48,9 @@
#include "em-vfolder-rule.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "mail-send-recv.h"
#include "mail-vfolder.h"
@@ -61,10 +61,10 @@
#include "em-folder-properties.h"
#include "em-event.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store.h"
#define d(x)
@@ -1781,6 +1781,7 @@ em_folder_tree_new_with_model (EMailBackend *backend,
EMFolderTreeModel *model)
{
const gchar *data_dir;
+ EMailSession *session;
g_return_val_if_fail (E_IS_MAIL_BACKEND (backend), NULL);
g_return_val_if_fail (E_IS_ALERT_SINK (alert_sink), NULL);
@@ -1788,7 +1789,8 @@ em_folder_tree_new_with_model (EMailBackend *backend,
data_dir = e_shell_backend_get_data_dir (E_SHELL_BACKEND (backend));
- e_mail_store_init (backend, data_dir);
+ session = e_mail_backend_get_session (backend);
+ e_mail_store_init (session, data_dir);
return g_object_new (
EM_TYPE_FOLDER_TREE,
@@ -2028,7 +2030,7 @@ folder_tree_drop_folder (struct _DragDataReceivedAsync *m)
d(printf(" * Drop folder '%s' onto '%s'\n", data, m->full_name));
- cancellable = e_activity_get_cancellable (m->base.activity);
+ cancellable = m->base.cancellable;
folder = e_mail_session_uri_to_folder_sync (
m->session, (gchar *) data, 0,
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index e72b801..6be8564 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -45,11 +45,11 @@
#include "em-vfolder-rule.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "mail-vfolder.h"
-#include "mail-folder-cache.h"
+#include "libemail-engine/mail-folder-cache.h"
#include "em-utils.h"
#include "em-folder-tree.h"
@@ -58,11 +58,12 @@
#include "em-folder-selector.h"
#include "em-folder-properties.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
-#include "e-mail-store.h"
-#include "e-mail-store-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store.h"
+#include "libemail-engine/e-mail-store-utils.h"
+#include "libemail-engine/e-mail-utils.h"
#define d(x)
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index dbfe011..3f45146 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -30,8 +30,8 @@
#include <gtk/gtk.h>
#include <gtkhtml/gtkhtml.h>
-#include "mail-ops.h"
-#include "mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-utils/mail-mt.h"
#include "em-format-html-print.h"
#include <e-util/e-print.h>
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index f3209b8..1404936 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -61,8 +61,9 @@
#include "em-format-html.h"
#include "em-html-stream.h"
#include "em-utils.h"
-#include "mail-config.h"
-#include "mail-mt.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/e-mail-utils.h"
#define d(x)
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 09b74bc..ebc3400 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -25,14 +25,14 @@
#include <string.h>
#include <glib/gi18n-lib.h>
-#include "mail-tools.h"
-#include "mail-ops.h"
-#include "mail-mt.h"
+#include "libemail-engine/mail-tools.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-utils/mail-mt.h"
#include <e-util/e-util.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-util-private.h>
-#include <e-util/gconf-bridge.h>
+#include <libemail-utils/gconf-bridge.h>
#include "em-folder-utils.h"
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 06f96ec..4f7d4a3 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -32,7 +32,7 @@
#include <glib/gi18n-lib.h>
#include <libedataserver/e-flag.h>
-#include "mail-mt.h"
+#include "libemail-utils/mail-mt.h"
enum _write_msg_t {
EMSS_WRITE,
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 6797888..eda77fc 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -50,9 +50,10 @@
#include <gio/gio.h>
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/mail-tools.h"
#include "e-mail-tag-editor.h"
#include <libedataserver/e-data-server-util.h>
@@ -61,7 +62,7 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
#include "e-util/e-mktemp.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-alert-dialog.h"
#include "shell/e-shell.h"
@@ -70,9 +71,9 @@
#include "em-utils.h"
#include "em-composer-utils.h"
#include "em-format-quote.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
/* XXX This is a dirty hack on a dirty hack. We really need
* to rework or get rid of the functions that use this. */
@@ -203,23 +204,6 @@ em_utils_uids_copy (GPtrArray *uids)
}
/**
- * em_utils_uids_free:
- * @uids: array of uids
- *
- * Frees the array of uids pointed to by @uids back to the system.
- **/
-void
-em_utils_uids_free (GPtrArray *uids)
-{
- gint i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
-
- g_ptr_array_free (uids, TRUE);
-}
-
-/**
* em_utils_check_user_can_send_mail:
*
* Returns %TRUE if the user has an account configured (to send mail)
@@ -1003,193 +987,6 @@ em_utils_selection_get_urilist (GtkSelectionData *selection_data,
g_strfreev (uris);
}
-/**
- * em_utils_folder_is_templates:
- * @folder: a #CamelFolder
- *
- * Decides if @folder is a Templates folder.
- *
- * Returns %TRUE if this is a Templates folder or %FALSE otherwise.
- **/
-
-gboolean
-em_utils_folder_is_templates (CamelFolder *folder)
-{
- CamelFolder *local_templates_folder;
- CamelSession *session;
- CamelStore *store;
- EAccountList *account_list;
- EIterator *iterator;
- gchar *folder_uri;
- gboolean is_templates = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- local_templates_folder =
- e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_TEMPLATES);
-
- if (folder == local_templates_folder)
- return TRUE;
-
- folder_uri = e_mail_folder_uri_from_folder (folder);
-
- store = camel_folder_get_parent_store (folder);
- session = camel_service_get_session (CAMEL_SERVICE (store));
-
- account_list = e_get_account_list ();
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (!is_templates && e_iterator_is_valid (iterator)) {
- EAccount *account;
-
- /* XXX EIterator misuses const. */
- account = (EAccount *) e_iterator_get (iterator);
-
- if (account->templates_folder_uri != NULL)
- is_templates = e_mail_folder_uri_equal (
- session, folder_uri,
- account->templates_folder_uri);
-
- e_iterator_next (iterator);
- }
-
- g_object_unref (iterator);
- g_free (folder_uri);
-
- return is_templates;
-}
-
-/**
- * em_utils_folder_is_drafts:
- * @folder: a #CamelFolder
- *
- * Decides if @folder is a Drafts folder.
- *
- * Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_drafts (CamelFolder *folder)
-{
- CamelFolder *local_drafts_folder;
- CamelSession *session;
- CamelStore *store;
- EAccountList *account_list;
- EIterator *iterator;
- gchar *folder_uri;
- gboolean is_drafts = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- local_drafts_folder =
- e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_DRAFTS);
-
- if (folder == local_drafts_folder)
- return TRUE;
-
- folder_uri = e_mail_folder_uri_from_folder (folder);
-
- store = camel_folder_get_parent_store (folder);
- session = camel_service_get_session (CAMEL_SERVICE (store));
-
- account_list = e_get_account_list ();
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (!is_drafts && e_iterator_is_valid (iterator)) {
- EAccount *account;
-
- /* XXX EIterator misuses const. */
- account = (EAccount *) e_iterator_get (iterator);
-
- if (account->drafts_folder_uri != NULL)
- is_drafts = e_mail_folder_uri_equal (
- session, folder_uri,
- account->drafts_folder_uri);
-
- e_iterator_next (iterator);
- }
-
- g_object_unref (iterator);
- g_free (folder_uri);
-
- return is_drafts;
-}
-
-/**
- * em_utils_folder_is_sent:
- * @folder: a #CamelFolder
- *
- * Decides if @folder is a Sent folder.
- *
- * Returns %TRUE if this is a Sent folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_sent (CamelFolder *folder)
-{
- CamelFolder *local_sent_folder;
- CamelSession *session;
- CamelStore *store;
- EAccountList *account_list;
- EIterator *iterator;
- gchar *folder_uri;
- gboolean is_sent = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- local_sent_folder =
- e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_SENT);
-
- if (folder == local_sent_folder)
- return TRUE;
-
- folder_uri = e_mail_folder_uri_from_folder (folder);
-
- store = camel_folder_get_parent_store (folder);
- session = camel_service_get_session (CAMEL_SERVICE (store));
-
- account_list = e_get_account_list ();
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (!is_sent && e_iterator_is_valid (iterator)) {
- EAccount *account;
-
- /* XXX EIterator misuses const. */
- account = (EAccount *) e_iterator_get (iterator);
-
- if (account->sent_folder_uri != NULL)
- is_sent = e_mail_folder_uri_equal (
- session, folder_uri,
- account->sent_folder_uri);
-
- e_iterator_next (iterator);
- }
-
- g_object_unref (iterator);
- g_free (folder_uri);
-
- return is_sent;
-}
-
-/**
- * em_utils_folder_is_outbox:
- * @folder: a #CamelFolder
- *
- * Decides if @folder is an Outbox folder.
- *
- * Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
- **/
-gboolean
-em_utils_folder_is_outbox (CamelFolder *folder)
-{
- CamelFolder *local_outbox_folder;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- local_outbox_folder =
- e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_OUTBOX);
-
- return (folder == local_outbox_folder);
-}
-
/* ********************************************************************** */
static EProxy *emu_proxy = NULL;
static GStaticMutex emu_proxy_lock = G_STATIC_MUTEX_INIT;
@@ -1301,6 +1098,7 @@ em_utils_expunge_folder (GtkWidget *parent,
CamelFolder *folder)
{
const gchar *description;
+ EMailSession *session;
description = camel_folder_get_description (folder);
@@ -1310,7 +1108,8 @@ em_utils_expunge_folder (GtkWidget *parent,
"mail:ask-expunge", description, NULL))
return;
- mail_expunge_folder (backend, folder);
+ session = e_mail_backend_get_session (backend);
+ mail_expunge_folder (session, folder);
}
/**
@@ -1362,586 +1161,15 @@ em_utils_empty_trash (GtkWidget *parent,
continue;
}
- mail_empty_trash (backend, CAMEL_STORE (service));
+ mail_empty_trash (session, CAMEL_STORE (service));
}
g_list_free (list);
}
-/* ********************************************************************** */
-
-/* runs sync, in main thread */
-static gpointer
-emu_addr_setup (gpointer user_data)
-{
- GError *err = NULL;
- ESourceList **psource_list = user_data;
-
- if (!e_book_client_get_sources (psource_list, &err))
- g_error_free (err);
-
- return NULL;
-}
-
-static void
-emu_addr_cancel_stop (gpointer data)
-{
- gboolean *stop = data;
-
- g_return_if_fail (stop != NULL);
-
- *stop = TRUE;
-}
-
-static void
-emu_addr_cancel_cancellable (gpointer data)
-{
- GCancellable *cancellable = data;
-
- g_return_if_fail (cancellable != NULL);
-
- g_cancellable_cancel (cancellable);
-}
-
-struct TryOpenEBookStruct {
- GError **error;
- EFlag *flag;
- gboolean result;
-};
-
-static void
-try_open_book_client_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer closure)
-{
- EBookClient *book_client = E_BOOK_CLIENT (source_object);
- struct TryOpenEBookStruct *data = (struct TryOpenEBookStruct *) closure;
- GError *error = NULL;
-
- if (!data)
- return;
-
- e_client_open_finish (E_CLIENT (book_client), result, &error);
-
- data->result = error == NULL;
-
- if (!data->result) {
- g_clear_error (data->error);
- g_propagate_error (data->error, error);
- }
-
- e_flag_set (data->flag);
-}
-
-/*
- * try_open_book_client:
- * Tries to open address book asynchronously, but acts as synchronous.
- * The advantage is it checks periodically whether the camel_operation
- * has been canceled or not, and if so, then stops immediately, with
- * result FALSE. Otherwise returns same as e_client_open()
- */
-static gboolean
-try_open_book_client (EBookClient *book_client,
- gboolean only_if_exists,
- GCancellable *cancellable,
- GError **error)
-{
- struct TryOpenEBookStruct data;
- gboolean canceled = FALSE;
- EFlag *flag = e_flag_new ();
-
- data.error = error;
- data.flag = flag;
- data.result = FALSE;
-
- e_client_open (
- E_CLIENT (book_client), only_if_exists,
- cancellable, try_open_book_client_cb, &data);
-
- while (canceled = camel_operation_cancel_check (NULL),
- !canceled && !e_flag_is_set (flag)) {
- GTimeVal wait;
-
- g_get_current_time (&wait);
- g_time_val_add (&wait, 250000); /* waits 250ms */
-
- e_flag_timed_wait (flag, &wait);
- }
-
- if (canceled) {
- g_cancellable_cancel (cancellable);
-
- g_clear_error (error);
- g_propagate_error (
- error, e_client_error_create (
- E_CLIENT_ERROR_CANCELLED, NULL));
- }
-
- e_flag_wait (flag);
- e_flag_free (flag);
-
- return data.result && (!error || !*error);
-}
-
-#define NOT_FOUND_BOOK (GINT_TO_POINTER (1))
-
-G_LOCK_DEFINE_STATIC (contact_cache);
-
-/* key is lowercased contact email; value is EBook pointer
- * (just for comparison) where it comes from */
-static GHashTable *contact_cache = NULL;
-
-/* key is source ID; value is pointer to EBook */
-static GHashTable *emu_books_hash = NULL;
-
-/* key is source ID; value is same pointer as key; this is hash of
- * broken books, which failed to open for some reason */
-static GHashTable *emu_broken_books_hash = NULL;
-
-static ESourceList *emu_books_source_list = NULL;
-
-static gboolean
-search_address_in_addressbooks (const gchar *address,
- gboolean local_only,
- gboolean (*check_contact) (EContact *contact,
- gpointer user_data),
- gpointer user_data)
-{
- gboolean found = FALSE, stop = FALSE, found_any = FALSE;
- gchar *lowercase_addr;
- gpointer ptr;
- EBookQuery *book_query;
- gchar *query;
- GSList *s, *g, *addr_sources = NULL;
- GHook *hook_cancellable;
- GCancellable *cancellable;
-
- if (!address || !*address)
- return FALSE;
-
- G_LOCK (contact_cache);
-
- if (!emu_books_source_list) {
- mail_call_main (
- MAIL_CALL_p_p, (MailMainFunc)
- emu_addr_setup, &emu_books_source_list);
- emu_books_hash = g_hash_table_new_full (
- g_str_hash, g_str_equal, g_free, g_object_unref);
- emu_broken_books_hash = g_hash_table_new_full (
- g_str_hash, g_str_equal, g_free, NULL);
- contact_cache = g_hash_table_new_full (
- g_str_hash, g_str_equal, g_free, NULL);
- }
-
- if (!emu_books_source_list) {
- G_UNLOCK (contact_cache);
- return FALSE;
- }
-
- lowercase_addr = g_utf8_strdown (address, -1);
- ptr = g_hash_table_lookup (contact_cache, lowercase_addr);
- if (ptr != NULL && (check_contact == NULL || ptr == NOT_FOUND_BOOK)) {
- g_free (lowercase_addr);
- G_UNLOCK (contact_cache);
- return ptr != NOT_FOUND_BOOK;
- }
-
- book_query = e_book_query_field_test (E_CONTACT_EMAIL, E_BOOK_QUERY_IS, address);
- query = e_book_query_to_string (book_query);
- e_book_query_unref (book_query);
-
- for (g = e_source_list_peek_groups (emu_books_source_list);
- g; g = g_slist_next (g)) {
- ESourceGroup *group = g->data;
-
- if (!group)
- continue;
-
- if (local_only && !(e_source_group_peek_base_uri (group) &&
- g_str_has_prefix (
- e_source_group_peek_base_uri (group), "local:")))
- continue;
-
- for (s = e_source_group_peek_sources (group); s; s = g_slist_next (s)) {
- ESource *source = s->data;
- const gchar *completion = e_source_get_property (source, "completion");
-
- if (completion && g_ascii_strcasecmp (completion, "true") == 0) {
- addr_sources = g_slist_prepend (addr_sources, g_object_ref (source));
- }
- }
- }
-
- cancellable = g_cancellable_new ();
- hook_cancellable = mail_cancel_hook_add (emu_addr_cancel_cancellable, cancellable);
-
- for (s = addr_sources; !stop && !found && s; s = g_slist_next (s)) {
- ESource *source = s->data;
- GSList *contacts;
- EBookClient *book_client = NULL;
- GHook *hook_stop;
- gboolean cached_book = FALSE;
- GError *err = NULL;
-
- /* failed to load this book last time, skip it now */
- if (g_hash_table_lookup (emu_broken_books_hash,
- e_source_peek_uid (source)) != NULL) {
- d(printf ("%s: skipping broken book '%s'\n",
- G_STRFUNC, e_source_peek_name (source)));
- continue;
- }
-
- d(printf(" checking '%s'\n", e_source_get_uri(source)));
-
- hook_stop = mail_cancel_hook_add (emu_addr_cancel_stop, &stop);
-
- book_client = g_hash_table_lookup (emu_books_hash, e_source_peek_uid (source));
- if (!book_client) {
- book_client = e_book_client_new (source, &err);
-
- if (book_client == NULL) {
- if (err && (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
- g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED))) {
- stop = TRUE;
- } else if (err) {
- gchar *source_uid;
-
- source_uid = g_strdup (
- e_source_peek_uid (source));
-
- g_hash_table_insert (
- emu_broken_books_hash,
- source_uid, source_uid);
-
- g_warning (
- "%s: Unable to create addressbook '%s': %s",
- G_STRFUNC,
- e_source_peek_name (source),
- err->message);
- }
- g_clear_error (&err);
- } else if (!stop && !try_open_book_client (book_client, TRUE, cancellable, &err)) {
- g_object_unref (book_client);
- book_client = NULL;
-
- if (err && (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
- g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED))) {
- stop = TRUE;
- } else if (err) {
- gchar *source_uid;
-
- source_uid = g_strdup (
- e_source_peek_uid (source));
-
- g_hash_table_insert (
- emu_broken_books_hash,
- source_uid, source_uid);
-
- g_warning (
- "%s: Unable to open addressbook '%s': %s",
- G_STRFUNC,
- e_source_peek_name (source),
- err->message);
- }
- g_clear_error (&err);
- }
- } else {
- cached_book = TRUE;
- }
-
- if (book_client && !stop && e_book_client_get_contacts_sync (book_client, query, &contacts, cancellable, &err)) {
- if (contacts != NULL) {
- if (!found_any) {
- g_hash_table_insert (contact_cache, g_strdup (lowercase_addr), book_client);
- }
- found_any = TRUE;
-
- if (check_contact) {
- GSList *l;
-
- for (l = contacts; l && !found; l = l->next) {
- EContact *contact = l->data;
-
- found = check_contact (contact, user_data);
- }
- } else {
- found = TRUE;
- }
-
- g_slist_foreach (contacts, (GFunc) g_object_unref, NULL);
- g_slist_free (contacts);
- }
- } else if (book_client) {
- stop = stop || (err &&
- (g_error_matches (err, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
- g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)));
- if (err && !stop) {
- gchar *source_uid = g_strdup (e_source_peek_uid (source));
-
- g_hash_table_insert (emu_broken_books_hash, source_uid, source_uid);
-
- g_warning (
- "%s: Can't get contacts from '%s': %s",
- G_STRFUNC, e_source_peek_name (source),
- err->message);
- }
- g_clear_error (&err);
- }
-
- mail_cancel_hook_remove (hook_stop);
-
- stop = stop || camel_operation_cancel_check (NULL);
-
- if (stop && !cached_book && book_client) {
- g_object_unref (book_client);
- } else if (!stop && book_client && !cached_book) {
- g_hash_table_insert (
- emu_books_hash, g_strdup (
- e_source_peek_uid (source)), book_client);
- }
- }
-
- mail_cancel_hook_remove (hook_cancellable);
- g_object_unref (cancellable);
-
- g_slist_foreach (addr_sources, (GFunc) g_object_unref, NULL);
- g_slist_free (addr_sources);
-
- g_free (query);
-
- if (!found_any) {
- g_hash_table_insert (contact_cache, lowercase_addr, NOT_FOUND_BOOK);
- lowercase_addr = NULL;
- }
-
- G_UNLOCK (contact_cache);
-
- g_free (lowercase_addr);
-
- return found_any;
-}
-
-gboolean
-em_utils_in_addressbook (CamelInternetAddress *iaddr,
- gboolean local_only)
-{
- const gchar *addr;
-
- /* TODO: check all addresses? */
- if (iaddr == NULL || !camel_internet_address_get (iaddr, 0, NULL, &addr))
- return FALSE;
-
- return search_address_in_addressbooks (addr, local_only, NULL, NULL);
-}
-
-static gboolean
-extract_photo_data (EContact *contact,
- gpointer user_data)
-{
- EContactPhoto **photo = user_data;
-
- g_return_val_if_fail (contact != NULL, FALSE);
- g_return_val_if_fail (user_data != NULL, FALSE);
-
- *photo = e_contact_get (contact, E_CONTACT_PHOTO);
- if (!*photo)
- *photo = e_contact_get (contact, E_CONTACT_LOGO);
-
- return *photo != NULL;
-}
-
-typedef struct _PhotoInfo {
- gchar *address;
- EContactPhoto *photo;
-} PhotoInfo;
-
-static void
-emu_free_photo_info (PhotoInfo *pi)
-{
- if (!pi)
- return;
-
- if (pi->address)
- g_free (pi->address);
- if (pi->photo)
- e_contact_photo_free (pi->photo);
- g_free (pi);
-}
-
-G_LOCK_DEFINE_STATIC (photos_cache);
-static GSList *photos_cache = NULL; /* list of PhotoInfo-s */
-
-CamelMimePart *
-em_utils_contact_photo (CamelInternetAddress *cia,
- gboolean local_only)
-{
- const gchar *addr = NULL;
- CamelMimePart *part = NULL;
- EContactPhoto *photo = NULL;
- GSList *p, *first_not_null = NULL;
- gint count_not_null = 0;
-
- if (cia == NULL || !camel_internet_address_get (cia, 0, NULL, &addr) || !addr) {
- return NULL;
- }
-
- G_LOCK (photos_cache);
-
- /* search a cache first */
- for (p = photos_cache; p; p = p->next) {
- PhotoInfo *pi = p->data;
-
- if (!pi)
- continue;
-
- if (pi->photo) {
- if (!first_not_null)
- first_not_null = p;
- count_not_null++;
- }
-
- if (g_ascii_strcasecmp (addr, pi->address) == 0) {
- photo = pi->photo;
- break;
- }
- }
-
- /* !p means the address had not been found in the cache */
- if (!p && search_address_in_addressbooks (
- addr, local_only, extract_photo_data, &photo)) {
- PhotoInfo *pi;
-
- if (photo && photo->type != E_CONTACT_PHOTO_TYPE_INLINED) {
- e_contact_photo_free (photo);
- photo = NULL;
- }
-
- /* keep only up to 10 photos in memory */
- if (photo && count_not_null >= 10 && first_not_null) {
- pi = first_not_null->data;
-
- photos_cache = g_slist_remove (photos_cache, pi);
-
- emu_free_photo_info (pi);
- }
-
- pi = g_new0 (PhotoInfo, 1);
- pi->address = g_strdup (addr);
- pi->photo = photo;
-
- photos_cache = g_slist_append (photos_cache, pi);
- }
-
- /* some photo found, use it */
- if (photo) {
- /* Form a mime part out of the photo */
- part = camel_mime_part_new ();
- camel_mime_part_set_content (part,
- (const gchar *) photo->data.inlined.data,
- photo->data.inlined.length, "image/jpeg");
- }
-
- G_UNLOCK (photos_cache);
-
- return part;
-}
-
-/* list of email addresses (strings) to remove from local cache of photos and
- * contacts, but only if the photo doesn't exist or is an not-found contact */
-void
-emu_remove_from_mail_cache (const GSList *addresses)
-{
- const GSList *a;
- GSList *p;
- CamelInternetAddress *cia;
-
- cia = camel_internet_address_new ();
-
- for (a = addresses; a; a = a->next) {
- const gchar *addr = NULL;
-
- if (!a->data)
- continue;
-
- if (camel_address_decode ((CamelAddress *) cia, a->data) != -1 &&
- camel_internet_address_get (cia, 0, NULL, &addr) && addr) {
- gchar *lowercase_addr = g_utf8_strdown (addr, -1);
-
- G_LOCK (contact_cache);
- if (g_hash_table_lookup (contact_cache, lowercase_addr) == NOT_FOUND_BOOK)
- g_hash_table_remove (contact_cache, lowercase_addr);
- G_UNLOCK (contact_cache);
-
- g_free (lowercase_addr);
-
- G_LOCK (photos_cache);
- for (p = photos_cache; p; p = p->next) {
- PhotoInfo *pi = p->data;
-
- if (pi && !pi->photo && g_ascii_strcasecmp (pi->address, addr) == 0) {
- photos_cache = g_slist_remove (photos_cache, pi);
- emu_free_photo_info (pi);
- break;
- }
- }
- G_UNLOCK (photos_cache);
- }
- }
-
- g_object_unref (cia);
-}
-
void
-emu_remove_from_mail_cache_1 (const gchar *address)
+emu_free_mail_account_sort_order_cache (void)
{
- GSList *l;
-
- g_return_if_fail (address != NULL);
-
- l = g_slist_append (NULL, (gpointer) address);
-
- emu_remove_from_mail_cache (l);
-
- g_slist_free (l);
-}
-
-/* frees all data created by call of em_utils_in_addressbook() or
- * em_utils_contact_photo() */
-void
-emu_free_mail_cache (void)
-{
- G_LOCK (contact_cache);
-
- if (emu_books_hash) {
- g_hash_table_destroy (emu_books_hash);
- emu_books_hash = NULL;
- }
-
- if (emu_broken_books_hash) {
- g_hash_table_destroy (emu_broken_books_hash);
- emu_broken_books_hash = NULL;
- }
-
- if (emu_books_source_list) {
- g_object_unref (emu_books_source_list);
- emu_books_source_list = NULL;
- }
-
- if (contact_cache) {
- g_hash_table_destroy (contact_cache);
- contact_cache = NULL;
- }
-
- G_UNLOCK (contact_cache);
-
- G_LOCK (photos_cache);
-
- g_slist_foreach (photos_cache, (GFunc) emu_free_photo_info, NULL);
- g_slist_free (photos_cache);
- photos_cache = NULL;
-
- G_UNLOCK (photos_cache);
-
free_account_sort_order_cache ();
}
@@ -1999,206 +1227,6 @@ em_utils_url_unescape_amp (const gchar *url)
return buff;
}
-static EAccount *
-guess_account_from_folder (CamelFolder *folder)
-{
- CamelStore *store;
- const gchar *uid;
-
- store = camel_folder_get_parent_store (folder);
- uid = camel_service_get_uid (CAMEL_SERVICE (store));
-
- return e_get_account_by_uid (uid);
-}
-
-static EAccount *
-guess_account_from_message (CamelMimeMessage *message)
-{
- const gchar *uid;
-
- uid = camel_mime_message_get_source (message);
-
- return (uid != NULL) ? e_get_account_by_uid (uid) : NULL;
-}
-
-GHashTable *
-em_utils_generate_account_hash (void)
-{
- GHashTable *account_hash;
- EAccount *account, *def;
- EAccountList *account_list;
- EIterator *iterator;
-
- account_list = e_get_account_list ();
- account_hash = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
-
- def = e_get_default_account ();
-
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (e_iterator_is_valid (iterator)) {
- account = (EAccount *) e_iterator_get (iterator);
-
- if (account->id->address) {
- EAccount *acnt;
-
- /* Accounts with identical email addresses that are
- * enabled take precedence over the accounts that
- * aren't. If all accounts with matching email
- * addresses are disabled, then the first one in
- * the list takes precedence. The default account
- * always takes precedence no matter what. */
- acnt = g_hash_table_lookup (
- account_hash, account->id->address);
- if (acnt && acnt != def && !acnt->enabled && account->enabled) {
- g_hash_table_remove (
- account_hash, acnt->id->address);
- acnt = NULL;
- }
-
- if (!acnt)
- g_hash_table_insert (
- account_hash, (gchar *)
- account->id->address,
- (gpointer) account);
- }
-
- e_iterator_next (iterator);
- }
-
- g_object_unref (iterator);
-
- /* The default account has to be there if none
- * of the enabled accounts are present. */
- if (g_hash_table_size (account_hash) == 0 && def && def->id->address)
- g_hash_table_insert (
- account_hash, (gchar *)
- def->id->address,
- (gpointer) def);
-
- return account_hash;
-}
-
-EAccount *
-em_utils_guess_account (CamelMimeMessage *message,
- CamelFolder *folder)
-{
- EAccount *account = NULL;
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
- if (folder != NULL)
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- /* check for newsgroup header */
- if (folder != NULL
- && camel_medium_get_header (CAMEL_MEDIUM (message), "Newsgroups"))
- account = guess_account_from_folder (folder);
-
- /* check for source folder */
- if (account == NULL && folder != NULL)
- account = guess_account_from_folder (folder);
-
- /* then message source */
- if (account == NULL)
- account = guess_account_from_message (message);
-
- return account;
-}
-
-EAccount *
-em_utils_guess_account_with_recipients (CamelMimeMessage *message,
- CamelFolder *folder)
-{
- EAccount *account = NULL;
- EAccountList *account_list;
- GHashTable *recipients;
- EIterator *iterator;
- CamelInternetAddress *addr;
- const gchar *type;
- const gchar *key;
-
- /* This policy is subject to debate and tweaking,
- * but please also document the rational here. */
-
- g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
- /* Build a set of email addresses in which to test for membership.
- * Only the keys matter here; the values just need to be non-NULL. */
- recipients = g_hash_table_new (g_str_hash, g_str_equal);
-
- type = CAMEL_RECIPIENT_TYPE_TO;
- addr = camel_mime_message_get_recipients (message, type);
- if (addr != NULL) {
- gint index = 0;
-
- while (camel_internet_address_get (addr, index++, NULL, &key))
- g_hash_table_insert (
- recipients, (gpointer) key,
- GINT_TO_POINTER (1));
- }
-
- type = CAMEL_RECIPIENT_TYPE_CC;
- addr = camel_mime_message_get_recipients (message, type);
- if (addr != NULL) {
- gint index = 0;
-
- while (camel_internet_address_get (addr, index++, NULL, &key))
- g_hash_table_insert (
- recipients, (gpointer) key,
- GINT_TO_POINTER (1));
- }
-
- /* First Preference: We were given a folder that maps to an
- * enabled account, and that account's email address appears
- * in the list of To: or Cc: recipients. */
-
- if (folder != NULL)
- account = guess_account_from_folder (folder);
-
- if (account == NULL || !account->enabled)
- goto second_preference;
-
- if ((key = account->id->address) == NULL)
- goto second_preference;
-
- if (g_hash_table_lookup (recipients, key) != NULL)
- goto exit;
-
-second_preference:
-
- /* Second Preference: Choose any enabled account whose email
- * address appears in the list to To: or Cc: recipients. */
-
- account_list = e_get_account_list ();
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (e_iterator_is_valid (iterator)) {
- account = (EAccount *) e_iterator_get (iterator);
- e_iterator_next (iterator);
-
- if (account == NULL || !account->enabled)
- continue;
-
- if ((key = account->id->address) == NULL)
- continue;
-
- if (g_hash_table_lookup (recipients, key) != NULL) {
- g_object_unref (iterator);
- goto exit;
- }
- }
- g_object_unref (iterator);
-
- /* Last Preference: Defer to em_utils_guess_account(). */
- account = em_utils_guess_account (message, folder);
-
-exit:
- g_hash_table_destroy (recipients);
-
- return account;
-}
-
void
emu_restore_folder_tree_state (EMFolderTree *folder_tree)
{
@@ -2229,76 +1257,6 @@ emu_restore_folder_tree_state (EMFolderTree *folder_tree)
g_key_file_free (key_file);
}
-/* Returns TRUE if CamelURL points to a local mbox file. */
-gboolean
-em_utils_is_local_delivery_mbox_file (CamelURL *url)
-{
- g_return_val_if_fail (url != NULL, FALSE);
-
- return g_str_equal (url->protocol, "mbox") &&
- (url->path != NULL) &&
- g_file_test (url->path, G_FILE_TEST_EXISTS) &&
- !g_file_test (url->path, G_FILE_TEST_IS_DIR);
-}
-
-static void
-cancel_service_connect_cb (GCancellable *cancellable,
- CamelService *service)
-{
- g_return_if_fail (CAMEL_IS_SERVICE (service));
-
- camel_service_cancel_connect (service);
-}
-
-gboolean
-em_utils_connect_service_sync (CamelService *service,
- GCancellable *cancellable,
- GError **error)
-{
- gboolean res;
- gulong handler_id = 0;
-
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), FALSE);
-
- if (cancellable != NULL)
- handler_id = g_cancellable_connect (
- cancellable,
- G_CALLBACK (cancel_service_connect_cb),
- service, NULL);
-
- res = camel_service_connect_sync (service, error);
-
- if (handler_id)
- g_cancellable_disconnect (cancellable, handler_id);
-
- return res;
-}
-
-gboolean
-em_utils_disconnect_service_sync (CamelService *service,
- gboolean clean,
- GCancellable *cancellable,
- GError **error)
-{
- gboolean res;
- gulong handler_id = 0;
-
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), FALSE);
-
- if (cancellable != NULL)
- handler_id = g_cancellable_connect (
- cancellable,
- G_CALLBACK (cancel_service_connect_cb),
- service, NULL);
-
- res = camel_service_disconnect_sync (service, clean, error);
-
- if (handler_id)
- g_cancellable_disconnect (cancellable, handler_id);
-
- return res;
-}
-
G_LOCK_DEFINE_STATIC (accounts_sort_order_cache);
static GHashTable *accounts_sort_order_cache = NULL; /* account_uid string to sort order uint */
diff --git a/mail/em-utils.h b/mail/em-utils.h
index b07b74b..26fcfd6 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -29,8 +29,9 @@
#include <libedataserver/e-proxy.h>
#include <mail/e-mail-reader.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
#include <mail/em-folder-tree.h>
+#include <libemail-engine/e-mail-utils.h>
G_BEGIN_DECLS
@@ -40,7 +41,6 @@ gboolean em_utils_ask_open_many (GtkWindow *parent, gint how_many);
gboolean em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...);
GPtrArray *em_utils_uids_copy (GPtrArray *uids);
-void em_utils_uids_free (GPtrArray *uids);
gboolean em_utils_check_user_can_send_mail (void);
@@ -62,11 +62,6 @@ void em_utils_selection_get_uidlist (GtkSelectionData *data, EMailSession *sessi
void em_utils_selection_set_urilist (GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids);
void em_utils_selection_get_urilist (GtkSelectionData *data, CamelFolder *folder);
-gboolean em_utils_folder_is_drafts (CamelFolder *folder);
-gboolean em_utils_folder_is_templates (CamelFolder *folder);
-gboolean em_utils_folder_is_sent (CamelFolder *folder);
-gboolean em_utils_folder_is_outbox (CamelFolder *folder);
-
EProxy * em_utils_get_proxy (void);
/* FIXME: should this have an override charset? */
@@ -75,31 +70,16 @@ gchar *em_utils_message_to_html (CamelMimeMessage *msg, const gchar *credits, gu
void em_utils_expunge_folder (GtkWidget *parent, EMailBackend *backend, CamelFolder *folder);
void em_utils_empty_trash (GtkWidget *parent, EMailBackend *backend);
-/* is this address in the addressbook? caches results */
-gboolean em_utils_in_addressbook (CamelInternetAddress *addr, gboolean local_only);
-CamelMimePart *em_utils_contact_photo (CamelInternetAddress *addr, gboolean local);
-
/* clears flag 'get_password_canceled' at every known accounts, so if needed, get_password will show dialog */
void em_utils_clear_get_password_canceled_accounts_flag (void);
/* Unescapes & back to a real & in URIs */
gchar *em_utils_url_unescape_amp (const gchar *url);
-GHashTable * em_utils_generate_account_hash (void);
-struct _EAccount *em_utils_guess_account (CamelMimeMessage *message, CamelFolder *folder);
-struct _EAccount *em_utils_guess_account_with_recipients (CamelMimeMessage *message, CamelFolder *folder);
-
-void emu_remove_from_mail_cache (const GSList *addresses);
-void emu_remove_from_mail_cache_1 (const gchar *address);
-void emu_free_mail_cache (void);
+void emu_free_mail_account_sort_order_cache (void);
void emu_restore_folder_tree_state (EMFolderTree *folder_tree);
-gboolean em_utils_is_local_delivery_mbox_file (CamelURL *url);
-
-gboolean em_utils_connect_service_sync (CamelService *service, GCancellable *cancellable, GError **error);
-gboolean em_utils_disconnect_service_sync (CamelService *service, gboolean clean, GCancellable *cancellable, GError **error);
-
void em_utils_save_accounts_sort_order (EMailBackend *backend, const GSList *account_uids);
GSList *em_utils_load_accounts_sort_order (EMailBackend *backend);
guint em_utils_get_account_sort_order (EMailBackend *backend, const gchar *account_uid);
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index 7da89fb..6cf50b8 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -32,7 +32,7 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "em-vfolder-editor.h"
#include "em-vfolder-rule.h"
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 04c009b..e78bf5b 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -32,8 +32,8 @@
#include "em-vfolder-context.h"
#include "em-vfolder-rule.h"
-#include "mail/e-mail-folder-utils.h"
-#include "mail/e-mail-store.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-store.h"
#include "mail/em-utils.h"
#include "mail/em-folder-tree.h"
#include "mail/em-folder-selector.h"
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 832bf74..288d9fb 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -40,7 +40,7 @@
#include "mail-importer.h"
-#include "mail/mail-mt.h"
+#include "libemail-utils/mail-mt.h"
#include "mail/e-mail-backend.h"
#include "e-util/e-import.h"
#include "shell/e-shell.h"
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 3c97bd9..140d425 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -45,12 +45,12 @@
#include "shell/e-shell-sidebar.h"
#include "mail/e-mail-backend.h"
-#include "mail/e-mail-local.h"
-#include "mail/e-mail-store.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#include "mail/em-folder-selection-button.h"
#include "mail/em-folder-tree-model.h"
#include "mail/em-folder-tree.h"
-#include "mail/mail-mt.h"
+#include "libemail-utils/mail-mt.h"
#include "mail-importer.h"
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index e28de37..4e73f46 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -39,10 +39,10 @@
#include "e-util/e-util-private.h"
#include "shell/e-shell-backend.h"
-#include "mail-mt.h"
-#include "mail-tools.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-tools.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
#include "mail-importer.h"
@@ -277,9 +277,9 @@ mail_importer_import_mbox_sync (EMailSession *session,
m->path = g_strdup (path);
m->uri = g_strdup (folderuri);
if (cancellable)
- e_activity_set_cancellable (m->base.activity, cancellable);
+ m->base.cancellable = cancellable;
- cancellable = e_activity_get_cancellable (m->base.activity);
+ cancellable = m->base.cancellable;
import_mbox_exec (m, cancellable, &m->base.error);
import_mbox_done (m);
diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h
index d66ed46..bd0335c 100644
--- a/mail/importers/mail-importer.h
+++ b/mail/importers/mail-importer.h
@@ -26,7 +26,7 @@
#include <e-util/e-import.h>
#include <camel/camel.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
EImportImporter *mbox_importer_peek (void);
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index 710e02b..5797d87 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -43,7 +43,7 @@
#include "mail-importer.h"
-#include "mail/mail-mt.h"
+#include "libemail-utils/mail-mt.h"
#include "mail/e-mail-backend.h"
#include "e-util/e-import.h"
#include "shell/e-shell.h"
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 3fc90d5..c83b632 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -29,8 +29,8 @@
#include <glib/gi18n.h>
-#include "e-mail-folder-utils.h"
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-session.h"
#include "mail-vfolder.h"
#include "mail-autofilter.h"
#include "em-utils.h"
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 7356772..564a90c 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -31,15 +31,15 @@
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-util.h>
-#include "e-util/e-account-utils.h"
-#include "e-util/e-signature-utils.h"
+#include "libemail-utils/e-account-utils.h"
+#include "libemail-utils/e-signature-utils.h"
#include <gconf/gconf-client.h>
-#include "e-mail-local.h"
-#include "e-mail-folder-utils.h"
-#include "mail-config.h"
-#include "mail-tools.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-engine/mail-tools.h"
typedef struct {
GSList *labels;
diff --git a/mail/mail-config.h b/mail/mail-config.h
index 2903809..0a1c618 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -23,7 +23,7 @@
#ifndef MAIL_CONFIG_H
#define MAIL_CONFIG_H
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
G_BEGIN_DECLS
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 30bbce6..77ecacb 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -39,19 +39,19 @@
#include <glib/gstdio.h>
#include <libedataserver/e-data-server-util.h>
-#include <e-util/e-marshal.h>
+#include <libemail-utils/e-marshal.h>
#include <e-util/e-util.h>
-#include "mail-mt.h"
-#include "mail-folder-cache.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "em-utils.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
-#include "e-mail-store-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store-utils.h"
#define w(x)
#define d(x)
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index d904eed..c5fb367 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -31,7 +31,7 @@
#include <e-util/e-alert-sink.h>
#include <shell/e-shell-view.h>
-#include "mail-mt.h"
+#include "libemail-utils/mail-mt.h"
/*#define MALLOC_CHECK*/
#define d(x)
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 5788517..6e89d89 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -35,17 +35,17 @@
#include <glib/gi18n.h>
#include <libedataserver/e-data-server-util.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "em-filter-rule.h"
#include "em-utils.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
-#include "e-mail-session-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-session-utils.h"
#define w(x)
#define d(x)
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index 4ec64cc..6038ff7 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -28,7 +28,7 @@ G_BEGIN_DECLS
#include <camel/camel.h>
-#include <mail/mail-mt.h>
+#include <libemail-utils/mail-mt.h>
#include <mail/e-mail-backend.h>
void mail_transfer_messages (EMailSession *session,
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 33ac977..4f24718 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -32,20 +32,21 @@
#include "libedataserver/e-account-list.h"
#include "shell/e-shell.h"
-#include "e-util/e-account-utils.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/e-account-utils.h"
+#include "libemail-utils/gconf-bridge.h"
-#include "e-mail-folder-utils.h"
-#include "e-mail-local.h"
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-session.h"
#include "em-event.h"
#include "em-filter-rule.h"
#include "em-utils.h"
-#include "mail-folder-cache.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
#include "mail-send-recv.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-tools.h"
#define d(x)
@@ -819,7 +820,7 @@ receive_done (gpointer data)
info->again = 0;
mail_send_queue (
- info->backend,
+ session,
local_outbox,
CAMEL_TRANSPORT (service),
E_FILTER_SOURCE_OUTGOING,
@@ -1155,7 +1156,7 @@ send_receive (GtkWindow *parent,
case SEND_SEND:
/* todo, store the folder in info? */
mail_send_queue (
- backend, local_outbox,
+ session, local_outbox,
CAMEL_TRANSPORT (service),
E_FILTER_SOURCE_OUTGOING,
info->cancellable,
@@ -1453,7 +1454,7 @@ mail_receive_account (EMailBackend *backend,
local_outbox = e_mail_local_get_folder (
E_MAIL_LOCAL_FOLDER_OUTBOX);
mail_send_queue (
- info->backend,
+ session,
local_outbox,
CAMEL_TRANSPORT (service),
E_FILTER_SOURCE_OUTGOING,
@@ -1538,7 +1539,7 @@ mail_send (EMailBackend *backend)
g_return_if_fail (CAMEL_IS_TRANSPORT (service));
mail_send_queue (
- backend, local_outbox,
+ session, local_outbox,
CAMEL_TRANSPORT (service),
E_FILTER_SOURCE_OUTGOING,
info->cancellable,
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 9ef758f..2e7b6d6 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -37,10 +37,10 @@
#include <glib/gi18n.h>
-#include "e-mail-session.h"
+#include "libemail-engine/e-mail-session.h"
#include "em-utils.h"
-#include "mail-folder-cache.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-engine/mail-tools.h"
/* **************************************** */
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index c1e451d..2c98ab4 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -32,25 +32,26 @@
#include "e-util/e-alert-dialog.h"
#include "e-util/e-util-private.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-mail-backend.h"
-#include "e-mail-session.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-utils.h"
#include "em-folder-tree-model.h"
#include "em-utils.h"
#include "em-vfolder-context.h"
#include "em-vfolder-editor.h"
#include "em-vfolder-rule.h"
#include "mail-autofilter.h"
-#include "mail-folder-cache.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
#include "mail-vfolder.h"
-#include "e-mail-local.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#define d(x) /* (printf("%s:%s: ", G_STRLOC, G_STRFUNC), (x))*/
@@ -1161,7 +1162,7 @@ vfolder_load_storage (EMailBackend *backend)
G_CALLBACK (context_rule_removed), context);
/* load store to mail component */
- e_mail_store_add (backend, vfolder_store);
+ e_mail_store_add (session, vfolder_store);
/* and setup the rules we have */
rule = NULL;
diff --git a/mail/message-list.c b/mail/message-list.c
index 1e903a3..4b2c018 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -62,10 +62,11 @@
#include "e-mail-label-list-store.h"
#include "em-utils.h"
-#include "mail-config.h"
-#include "mail-mt.h"
-#include "mail-ops.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
+#include "libemail-engine/e-mail-utils.h"
#include "message-list.h"
#if HAVE_CLUTTER
@@ -4815,7 +4816,7 @@ regen_list_done (struct _regen_list_msg *m)
GCancellable *cancellable;
gboolean searching;
- cancellable = e_activity_get_cancellable (m->base.activity);
+ cancellable = m->base.cancellable;
if (m->ml->priv->destroyed)
return;
@@ -5008,7 +5009,7 @@ mail_regen_cancel (MessageList *ml)
MailMsg *mm = l->data;
GCancellable *cancellable;
- cancellable = e_activity_get_cancellable (mm->activity);
+ cancellable = mm->cancellable;
if (CAMEL_IS_OPERATION (cancellable))
camel_operation_cancel (
CAMEL_OPERATION (cancellable));
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index e8f2afd..657071a 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/misc/e-paned.h"
#include "widgets/misc/e-preview-pane.h"
diff --git a/modules/addressbook/e-book-shell-view-private.h b/modules/addressbook/e-book-shell-view-private.h
index a715d5a..bc28dd2 100644
--- a/modules/addressbook/e-book-shell-view-private.h
+++ b/modules/addressbook/e-book-shell-view-private.h
@@ -35,7 +35,7 @@
#include "e-util/e-util.h"
#include "e-util/e-file-utils.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-content.h"
#include "shell/e-shell-searchbar.h"
#include "shell/e-shell-sidebar.h"
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c
index 1d0c99a..88a8ac3 100644
--- a/modules/bogofilter/evolution-bogofilter.c
+++ b/modules/bogofilter/evolution-bogofilter.c
@@ -23,8 +23,8 @@
#include <camel/camel.h>
-#include <e-util/gconf-bridge.h>
-#include <mail/e-mail-junk-filter.h>
+#include <libemail-utils/gconf-bridge.h>
+#include <libemail-engine/e-mail-junk-filter.h>
/* Standard GObject macros */
#define E_TYPE_BOGOFILTER \
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 81fc76b..608c3b9 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
#include "widgets/misc/e-selectable.h"
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 77c5639..7017529 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -30,7 +30,7 @@
#include <libedataserverui/e-client-utils.h>
#include "e-util/e-alert-dialog.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "widgets/misc/e-paned.h"
#include "calendar/gui/e-calendar-selector.h"
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index 6653632..d8cfa48 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -33,7 +33,7 @@
#include <libedataserver/e-sexp.h>
#include <libedataserverui/e-client-utils.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-selection.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index f0f4fe9..86805cd 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c
index 6402cf1..f0d2d9d 100644
--- a/modules/calendar/e-memo-shell-migrate.c
+++ b/modules/calendar/e-memo-shell-migrate.c
@@ -32,7 +32,7 @@
#include <libedataserver/e-source-group.h>
#include <libedataserver/e-source-list.h>
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "calendar/gui/calendar-config-keys.h"
#include "shell/e-shell.h"
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index 0a6a390..38aa206 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -32,7 +32,7 @@
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
#include "e-util/e-util.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "misc/e-popup-action.h"
#include "misc/e-selectable.h"
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 743bb93..73e1233 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -28,7 +28,7 @@
#include <glib/gi18n.h>
#include "e-util/e-selection.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h
index ec2173f..b288248 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -34,7 +34,7 @@
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
#include "e-util/e-util.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "shell/e-shell-utils.h"
#include "misc/e-popup-action.h"
#include "misc/e-selectable.h"
diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am
index 0bea9ac..16e893c 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -7,6 +7,8 @@ libevolution_module_mail_la_CPPFLAGS = \
-I$(top_srcdir)/widgets \
$(GNOME_PLATFORM_CFLAGS) \
$(EVOLUTION_MAIL_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS) \
+ $(EMAIL_ENGINE_CFLAGS) \
$(CAMEL_CFLAGS) \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
@@ -67,6 +69,8 @@ libevolution_module_mail_la_LIBADD = \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/capplet/settings/libevolution-mail-settings.la \
$(EVOLUTION_MAIL_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
+ $(EMAIL_ENGINE_LIBS) \
$(CAMEL_LIBS) \
$(GTKHTML_LIBS) \
$(E_WIDGETS_LIBS) \
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 4cf3cb7..9cf1dda 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -40,10 +40,10 @@
#include "e-mail-shell-view.h"
#include "e-mail-browser.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include "e-mail-reader.h"
-#include "e-mail-session.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store.h"
#include "em-account-editor.h"
#include "em-account-prefs.h"
#include "em-composer-prefs.h"
@@ -54,8 +54,8 @@
#include "em-mailer-prefs.h"
#include "em-network-prefs.h"
#include "em-utils.h"
-#include "mail-config.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-config.h"
+#include "libemail-engine/mail-ops.h"
#include "mail-send-recv.h"
#include "mail-vfolder.h"
#include "importers/mail-importer.h"
@@ -234,6 +234,7 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
{
EShell *shell;
EShellBackend *shell_backend;
+ EMailSession *session;
shell_backend = E_SHELL_BACKEND (mail_shell_backend);
shell = e_shell_backend_get_shell (shell_backend);
@@ -246,8 +247,10 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
if (mail_shell_backend->priv->mail_sync_in_progress)
goto exit;
+ session = e_mail_backend_get_session (E_MAIL_BACKEND (mail_shell_backend));
+
e_mail_store_foreach (
- E_MAIL_BACKEND (mail_shell_backend),
+ session,
(GFunc) mail_shell_backend_sync_store_cb,
mail_shell_backend);
@@ -441,6 +444,7 @@ mail_shell_backend_start (EShellBackend *shell_backend)
EShell *shell;
EShellSettings *shell_settings;
EMailBackend *backend;
+ EMailSession *session;
gboolean enable_search_folders;
const gchar *data_dir;
@@ -450,9 +454,11 @@ mail_shell_backend_start (EShellBackend *shell_backend)
shell_settings = e_shell_get_shell_settings (shell);
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
+
data_dir = e_shell_backend_get_data_dir (shell_backend);
- e_mail_store_init (backend, data_dir);
+ e_mail_store_init (session, data_dir);
enable_search_folders = e_shell_settings_get_boolean (
shell_settings, "mail-enable-search-folders");
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 9fd7d3b..5b5f105 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -29,7 +29,7 @@
#include <libedataserver/e-data-server-util.h>
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/menus/gal-view-instance.h"
#include "widgets/misc/e-paned.h"
@@ -37,7 +37,7 @@
#include "widgets/misc/e-search-bar.h"
#include "em-utils.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-ops.h"
#include "message-list.h"
#include "e-mail-paned-view.h"
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 6d9b3a4..f752506 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -85,6 +85,7 @@ action_mail_account_disable_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellView *shell_view;
EMailBackend *backend;
+ EMailSession *session;
EMFolderTree *folder_tree;
CamelService *service;
CamelStore *store;
@@ -98,6 +99,7 @@ action_mail_account_disable_cb (GtkAction *action,
shell_backend = e_shell_view_get_shell_backend (shell_view);
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
store = em_folder_tree_get_selected_store (folder_tree);
@@ -115,7 +117,7 @@ action_mail_account_disable_cb (GtkAction *action,
account->enabled = !account->enabled;
e_account_list_change (account_list, account);
- e_mail_store_remove_by_account (backend, account);
+ e_mail_store_remove_by_account (session, account);
if (account->parent_uid != NULL)
e_account_list_remove (account_list, account);
@@ -225,15 +227,17 @@ action_mail_download_cb (GtkAction *action,
EMailView *mail_view;
EMailReader *reader;
EMailBackend *backend;
+ EMailSession *session;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
reader = E_MAIL_READER (mail_view);
backend = e_mail_reader_get_backend (reader);
+ session = e_mail_backend_get_session (backend);
e_mail_store_foreach (
- backend, (GFunc) action_mail_download_foreach_cb, reader);
+ session, (GFunc) action_mail_download_foreach_cb, reader);
}
static void
diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index 9bd276d..6dd4351 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -29,26 +29,26 @@
#include <camel/camel-search-private.h> /* for camel_search_word */
#include "e-util/e-util.h"
-#include "e-util/gconf-bridge.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/gconf-bridge.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-ui-manager.h"
#include "filter/e-filter-part.h"
#include "widgets/misc/e-web-view.h"
#include "widgets/misc/e-popup-action.h"
#include "widgets/menus/gal-view-instance.h"
-#include "e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-folder-utils.h"
#include "e-mail-label-action.h"
#include "e-mail-label-dialog.h"
#include "e-mail-label-list-store.h"
-#include "e-mail-local.h"
+#include "libemail-engine/e-mail-local.h"
#include "e-mail-reader.h"
#include "e-mail-reader-utils.h"
-#include "e-mail-session.h"
-#include "e-mail-session-utils.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-session-utils.h"
#include "e-mail-sidebar.h"
-#include "e-mail-store.h"
-#include "e-mail-store-utils.h"
+#include "libemail-engine/e-mail-store.h"
+#include "libemail-engine/e-mail-store-utils.h"
#include "em-composer-utils.h"
#include "em-folder-properties.h"
#include "em-folder-selector.h"
@@ -57,10 +57,10 @@
#include "em-subscription-editor.h"
#include "em-utils.h"
#include "mail-autofilter.h"
-#include "mail-folder-cache.h"
-#include "mail-ops.h"
+#include "libemail-engine/mail-folder-cache.h"
+#include "libemail-engine/mail-ops.h"
#include "mail-send-recv.h"
-#include "mail-tools.h"
+#include "libemail-engine/mail-tools.h"
#include "mail-vfolder.h"
#include "message-list.h"
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 0dc93be..d1bb9dd 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -33,11 +33,11 @@
#include <glib/gi18n.h>
#include "e-util/e-alert-dialog.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-mail-backend.h"
-#include "e-mail-local.h"
-#include "e-mail-store.h"
+#include "libemail-engine/e-mail-local.h"
+#include "libemail-engine/e-mail-store.h"
#include "em-config.h"
#include "em-account-editor.h"
#include "em-utils.h"
@@ -98,6 +98,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
EMAccountPrefs *prefs)
{
EAccount *account;
+ EMailSession *session;
account = e_account_tree_view_get_selected (tree_view);
if (!account) {
@@ -106,19 +107,22 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
}
g_return_if_fail (account != NULL);
-
- e_mail_store_add_by_account (prefs->priv->backend, account);
+ session = e_mail_backend_get_session (prefs->priv->backend);
+ e_mail_store_add_by_account (session, account);
}
static void
account_prefs_disable_account_cb (EAccountTreeView *tree_view,
EMAccountPrefs *prefs)
{
+ EMailSession *session;
EAccountList *account_list;
EAccount *account;
gpointer parent;
gint response;
+ session = e_mail_backend_get_session (prefs->priv->backend);
+
account = e_account_tree_view_get_selected (tree_view);
if (!account) {
if (account_prefs_toggle_enable_special (prefs, e_account_tree_view_get_selected_type (tree_view), FALSE))
@@ -131,7 +135,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account_list != NULL);
if (!e_account_list_account_has_proxies (account_list, account)) {
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
return;
}
@@ -148,7 +152,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
e_account_list_remove_account_proxies (account_list, account);
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
}
static void
@@ -321,12 +325,14 @@ account_prefs_delete_account (EAccountManager *manager)
EAccountTreeView *tree_view;
EAccountList *account_list;
EAccount *account;
+ EMailSession *session;
gboolean has_proxies;
gpointer parent;
gint response;
priv = EM_ACCOUNT_PREFS (manager)->priv;
+ session = e_mail_backend_get_session (priv->backend);
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
account = e_account_tree_view_get_selected (tree_view);
@@ -354,7 +360,7 @@ account_prefs_delete_account (EAccountManager *manager)
/* Remove the account from the folder tree. */
if (account->enabled)
- e_mail_store_remove_by_account (priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
/* Remove all the proxies the account has created. */
if (has_proxies)
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 12a521b..695cb94 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -30,8 +30,8 @@
#include <unistd.h>
#include <fcntl.h>
-#include "e-util/e-signature-utils.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/e-signature-utils.h"
+#include "libemail-utils/gconf-bridge.h"
#include "em-composer-prefs.h"
#include "composer/e-msg-composer.h"
diff --git a/modules/online-accounts/e-online-accounts-google.c b/modules/online-accounts/e-online-accounts-google.c
index 04d7f9f..03963b9 100644
--- a/modules/online-accounts/e-online-accounts-google.c
+++ b/modules/online-accounts/e-online-accounts-google.c
@@ -29,7 +29,7 @@
#include <libecal/e-cal.h>
#include <libebook/e-book.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
/* This is the property name or URL parameter under which we
* embed the GoaAccount ID into an EAccount or ESource object. */
diff --git a/modules/online-accounts/evolution-online-accounts.c b/modules/online-accounts/evolution-online-accounts.c
index d127f4d..780c94e 100644
--- a/modules/online-accounts/evolution-online-accounts.c
+++ b/modules/online-accounts/evolution-online-accounts.c
@@ -30,7 +30,7 @@
#include <libedataserver/e-account-list.h>
#include <shell/e-shell.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include "camel-sasl-xoauth.h"
#include "e-online-accounts-google.h"
diff --git a/modules/spamassassin/evolution-spamassassin.c b/modules/spamassassin/evolution-spamassassin.c
index b578acf..de4ec99 100644
--- a/modules/spamassassin/evolution-spamassassin.c
+++ b/modules/spamassassin/evolution-spamassassin.c
@@ -25,8 +25,8 @@
#include <shell/e-shell.h>
#include <e-util/e-mktemp.h>
-#include <e-util/gconf-bridge.h>
-#include <mail/e-mail-junk-filter.h>
+#include <libemail-utils/gconf-bridge.h>
+#include <libemail-engine/e-mail-junk-filter.h>
/* Standard GObject macros */
#define E_TYPE_SPAM_ASSASSIN \
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 1184948..e77e3ff 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -24,12 +24,12 @@
#include <libebackend/e-extension.h>
#include <shell/e-shell.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-import.h>
#include <mail/e-mail-backend.h>
-#include <mail/e-mail-local.h>
+#include <libemail-engine/e-mail-local.h>
#include <mail/em-account-editor.h>
#include <capplet/settings/mail-capplet-shell.h>
#include <calendar/gui/calendar-config.h>
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index e2cce51..8389305 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -38,7 +38,7 @@
#include <libedataserverui/e-passwords.h>
#include <e-util/e-dialog-utils.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include "caldav-browse-server.h"
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index b838bdf..ae426ca 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -65,10 +65,10 @@
#include <libedataserverui/e-source-selector-dialog.h>
#include <mail/e-mail-backend.h>
-#include <mail/e-mail-local.h>
+#include <libemail-engine/e-mail-local.h>
#include <mail/em-folder-selection-button.h>
-#include <mail/mail-mt.h>
-#include <mail/mail-tools.h>
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/mail-tools.h>
#include <mail/em-utils.h>
#define d(x)
@@ -598,7 +598,7 @@ dbx_import_file (DbxImporter *m)
/* Destination folder, was set in our widget */
m->parent_uri = g_strdup (((EImportTargetURI *) m->target)->uri_dest);
- cancellable = e_activity_get_cancellable (m->base.activity);
+ cancellable = m->base.cancellable;
/* XXX Dig up the EMailSession from the default EShell.
* Since the EImport framework doesn't allow for user
diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c
index a496106..cb408ca 100644
--- a/plugins/imap-features/imap-headers.c
+++ b/plugins/imap-features/imap-headers.c
@@ -31,7 +31,7 @@
#include <gtk/gtk.h>
#include <e-util/e-util.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <glib/gi18n.h>
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 9ab5895..1262694 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -37,11 +37,11 @@
#include <mail/em-config.h>
#include <mail/em-format-html.h>
#include <mail/em-utils.h>
-#include <mail/mail-folder-cache.h>
-#include <mail/mail-tools.h>
-#include <mail/mail-mt.h>
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-tools.h>
+#include <libemail-utils/mail-mt.h>
#include <libedataserver/e-account-list.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-mktemp.h>
#include <calendar/gui/itip-utils.h>
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index d85987d..fbd9ff5 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -37,8 +37,8 @@
#include <time.h>
#include <e-util/e-config.h>
-#include <e-util/gconf-bridge.h>
-#include <mail/e-mail-folder-utils.h>
+#include <libemail-utils/gconf-bridge.h>
+#include <libemail-engine/e-mail-folder-utils.h>
#include <mail/em-utils.h>
#include <mail/em-event.h>
#include <mail/em-folder-tree.h>
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 810a2b5..6cfcf3b 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -46,7 +46,7 @@
#include <mail/em-utils.h>
#include <mail/em-format-html.h>
#include <mail/message-list.h>
-#include <e-util/e-account-utils.h>
+#include <libemail-utils/e-account-utils.h>
#include <e-util/e-dialog-utils.h>
#include <misc/e-popup-action.h>
#include <shell/e-shell-view.h>
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index e9d2dda..37b57fd 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -37,11 +37,11 @@
#include "mail/em-format-hook.h"
#include "mail/em-config.h"
#include "mail/em-utils.h"
-#include "mail/mail-ops.h"
-#include "mail/mail-mt.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-utils/mail-mt.h"
#include "mail/message-list.h"
#include "e-util/e-util.h"
-#include "e-util/e-account-utils.h"
+#include "libemail-utils/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
#include "shell/e-shell-view.h"
#include "shell/e-shell-window.h"
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 4fe19cf..5241620 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -30,7 +30,7 @@
#include <glib/gi18n.h>
#include <e-util/e-plugin-ui.h>
-#include <mail/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-folder-utils.h>
#include <mail/em-folder-tree.h>
#include <mail/em-utils.h>
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index fc19d7a..8a181fa 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -54,10 +54,10 @@
#include <libedataserverui/e-client-utils.h>
#include <mail/e-mail-backend.h>
-#include <mail/e-mail-local.h>
+#include <libemail-engine/e-mail-local.h>
#include <mail/em-folder-selection-button.h>
-#include <mail/mail-mt.h>
-#include <mail/mail-tools.h>
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/mail-tools.h>
#include <mail/em-utils.h>
#include <shell/e-shell.h>
#include <shell/e-shell-window.h>
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index f68cfc1..827b5bf 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -34,13 +34,13 @@
#include <e-util/e-config.h>
-#include <mail/e-mail-folder-utils.h>
-#include <mail/e-mail-local.h>
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-local.h>
#include <mail/e-mail-reader.h>
-#include <mail/e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
#include <mail/em-composer-utils.h>
#include <mail/em-utils.h>
-#include <mail/mail-ops.h>
+#include <libemail-engine/mail-ops.h>
#include <mail/message-list.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-plugin.h>
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 2b31203..edf7eaf 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -60,6 +60,7 @@ libeshell_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"evolution-shell\" \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS) \
$(EGG_SMCLIENT_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(TZDIALOG_CFLAGS) \
@@ -97,6 +98,7 @@ libeshell_la_LIBADD = \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/widgets/menus/libmenus.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(EGG_SMCLIENT_LIBS) \
$(CLUTTER_LIBS) \
@@ -132,6 +134,7 @@ evolution_CPPFLAGS = \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(datadir)"\" \
$(GNOME_PLATFORM_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS) \
$(TZDIALOG_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(SHELL_CFLAGS)
@@ -149,6 +152,7 @@ evolution_LDADD = \
$(TZDIALOG_LIBS) \
$(SHELL_LIBS) \
$(GNOME_PLATFORM_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
$(CLUTTER_LIBS) \
$(EVOLUTIONICON)
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index 5e5f342..dcbc151 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -31,7 +31,7 @@
#include "e-shell-settings.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
struct _EShellSettingsPrivate {
GArray *value_array;
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index d36a3e6..96c805b 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -35,7 +35,7 @@
#include <e-util/e-alert-dialog.h>
#include <e-util/e-alert-sink.h>
#include <e-util/e-plugin-ui.h>
-#include <e-util/gconf-bridge.h>
+#include <libemail-utils/gconf-bridge.h>
#include <widgets/misc/e-alert-bar.h>
#include <widgets/misc/e-import-assistant.h>
#include <widgets/misc/e-menu-tool-button.h>
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index b842aec..6bfc490 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -27,7 +27,7 @@
#include <glib/gi18n.h>
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
#include "e-attachment-view.h"
#include "e-attachment-store.h"
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index 691fd51..16c1542 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -30,7 +30,7 @@
#include "e-util/e-util.h"
#include "e-util/e-mktemp.h"
-#include "e-util/gconf-bridge.h"
+#include "libemail-utils/gconf-bridge.h"
struct _EAttachmentStorePrivate {
GHashTable *attachment_index;
diff --git a/widgets/misc/e-contact-map.c b/widgets/misc/e-contact-map.c
index 500600d..83affe1 100644
--- a/widgets/misc/e-contact-map.c
+++ b/widgets/misc/e-contact-map.c
@@ -26,7 +26,7 @@
#include "e-contact-map.h"
#include "e-contact-marker.h"
-#include <e-util/e-marshal.h>
+#include <libemail-utils/e-marshal.h>
#include <champlain/champlain.h>
#include <champlain-gtk/champlain-gtk.h>
diff --git a/widgets/misc/e-signature-combo-box.h b/widgets/misc/e-signature-combo-box.h
index dd81eb5..5a57149 100644
--- a/widgets/misc/e-signature-combo-box.h
+++ b/widgets/misc/e-signature-combo-box.h
@@ -23,8 +23,8 @@
#define E_SIGNATURE_COMBO_BOX_H
#include <gtk/gtk.h>
-#include <e-util/e-signature.h>
-#include <e-util/e-signature-list.h>
+#include <libemail-utils/e-signature.h>
+#include <libemail-utils/e-signature-list.h>
/* Standard GObject macros */
#define E_TYPE_SIGNATURE_COMBO_BOX \
diff --git a/widgets/misc/e-signature-editor.c b/widgets/misc/e-signature-editor.c
index 16efaa6..d968deb 100644
--- a/widgets/misc/e-signature-editor.c
+++ b/widgets/misc/e-signature-editor.c
@@ -30,7 +30,7 @@
#include <e-util/e-alert-dialog.h>
#include <e-util/e-alert-sink.h>
-#include <e-util/e-signature-utils.h>
+#include <libemail-utils/e-signature-utils.h>
#include <misc/e-web-view.h>
enum {
diff --git a/widgets/misc/e-signature-editor.h b/widgets/misc/e-signature-editor.h
index 6d9f4a9..0ba47b7 100644
--- a/widgets/misc/e-signature-editor.h
+++ b/widgets/misc/e-signature-editor.h
@@ -23,7 +23,7 @@
#define E_SIGNATURE_EDITOR_H
#include <gtkhtml-editor.h>
-#include <e-util/e-signature.h>
+#include <libemail-utils/e-signature.h>
#include <misc/e-focus-tracker.h>
/* Standard GObject macros */
diff --git a/widgets/misc/e-signature-manager.h b/widgets/misc/e-signature-manager.h
index 88ee391..cdbe16c 100644
--- a/widgets/misc/e-signature-manager.h
+++ b/widgets/misc/e-signature-manager.h
@@ -23,7 +23,7 @@
#define E_SIGNATURE_MANAGER_H
#include <gtk/gtk.h>
-#include <e-util/e-signature-list.h>
+#include <libemail-utils/e-signature-list.h>
#include <misc/e-signature-editor.h>
#include <misc/e-signature-tree-view.h>
diff --git a/widgets/misc/e-signature-preview.c b/widgets/misc/e-signature-preview.c
index a2c2352..41064b1 100644
--- a/widgets/misc/e-signature-preview.c
+++ b/widgets/misc/e-signature-preview.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <unistd.h>
#include <glib/gstdio.h>
-#include "e-util/e-signature-utils.h"
+#include "libemail-utils/e-signature-utils.h"
enum {
PROP_0,
diff --git a/widgets/misc/e-signature-preview.h b/widgets/misc/e-signature-preview.h
index 1a884b8..27ec47f 100644
--- a/widgets/misc/e-signature-preview.h
+++ b/widgets/misc/e-signature-preview.h
@@ -22,7 +22,7 @@
#ifndef E_SIGNATURE_PREVIEW_H
#define E_SIGNATURE_PREVIEW_H
-#include <e-util/e-signature.h>
+#include <libemail-utils/e-signature.h>
#include <misc/e-web-view.h>
/* Standard GObject macros */
diff --git a/widgets/misc/e-signature-tree-view.h b/widgets/misc/e-signature-tree-view.h
index 50d1e11..6842340 100644
--- a/widgets/misc/e-signature-tree-view.h
+++ b/widgets/misc/e-signature-tree-view.h
@@ -23,8 +23,8 @@
#define E_SIGNATURE_TREE_VIEW_H
#include <gtk/gtk.h>
-#include <e-util/e-signature.h>
-#include <e-util/e-signature-list.h>
+#include <libemail-utils/e-signature.h>
+#include <libemail-utils/e-signature-list.h>
/* Standard GObject macros */
#define E_TYPE_SIGNATURE_TREE_VIEW \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]