[evolution/email-factory-3-4: 1/19] 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: 1/19] Port Evolution to EDS's new mail library.
- Date: Fri, 18 Nov 2011 04:14:40 +0000 (UTC)
commit 1d0ba3c4a483fa99751ae31fea342b8922258b51
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 | 6 +-
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 | 14 +
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 | 15 +-
mail/e-mail-attachment-bar.c | 2 +-
mail/e-mail-backend.c | 157 ++++++-
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 | 11 +-
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 | 16 +-
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 | 17 +-
mail/em-folder-tree-model.h | 2 +-
mail/em-folder-tree.c | 17 +-
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 | 531 +-------------------
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 | 19 +-
mail/message-list.c | 11 +-
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 | 6 +-
modules/mail/e-mail-shell-backend.c | 10 +-
modules/mail/e-mail-shell-content.c | 4 +-
modules/mail/e-mail-shell-view-private.h | 22 +-
modules/mail/em-account-prefs.c | 11 +-
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 | 6 +-
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 +-
133 files changed, 525 insertions(+), 888 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 4fa0250..d2c349c 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 187757c..b6563b8 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 7efddcf..c04722e 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 <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 2bf464c..22356e1 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -38,9 +38,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>
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 69e3169d..c6dbff6 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 5ed9fad..22f679b 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 4bb19e0..da2511d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1223,6 +1223,20 @@ CERT_UI_LIBS="$MOZILLA_L_DIR $MANUAL_NSS_LIBS $MOZILLA_NSS_LIBS"
AC_SUBST(CERT_UI_CFLAGS)
AC_SUBST(CERT_UI_LIBS)
+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 Libnotify Flags
dnl ***************
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index b5d4559..5e0e0df 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\" \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
- $(GNOME_PLATFORM_CFLAGS)
+ $(GNOME_PLATFORM_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) \
$(EVOLUTION_DATA_SERVER_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 037db0f..74671e6 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 de2a817..5fcdba2 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 7f479ac..51f7db8 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 0a14a19..261201e 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -31,6 +31,8 @@ libevolution_mail_la_CPPFLAGS = \
$(CANBERRA_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(GTKHTML_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS) \
+ $(EMAIL_ENGINE_CFLAGS) \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
@@ -131,23 +133,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 \
@@ -178,12 +173,8 @@ libevolution_mail_la_SOURCES = \
em-vfolder-rule.c \
mail-autofilter.c \
mail-config.c \
- mail-folder-cache.c \
mail-guess-servers.c \
- mail-mt.c \
- mail-ops.c \
mail-send-recv.c \
- mail-tools.c \
mail-vfolder.c \
message-list.c
@@ -214,6 +205,8 @@ libevolution_mail_la_LIBADD = \
$(top_builddir)/filter/libfilter.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_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 aedbdd2..974fc94 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 \
@@ -739,6 +741,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;
@@ -758,6 +879,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 (
@@ -788,6 +910,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);
@@ -823,7 +955,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 fe8b898..071f55e 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 fe093ad..0b66a20 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 28d174e..34179fb 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 f3ce503..e962da3 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
@@ -681,6 +681,7 @@ create_mbox_account (EShellBackend *shell_backend,
mail_backend = E_MAIL_BACKEND (shell_backend);
mail_session = e_mail_backend_get_session (mail_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_session, data_dir);
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 8b7c803..cef8752 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"
@@ -53,8 +53,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 eca58bc..6b99205 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 7e9508c..5e50cb0 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 7f978c8..12014bd 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 c995f42..2e8161f 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 c1953b6..548c553 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -49,28 +49,28 @@
#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-auth-combo-box.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 "mail-guess-servers.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"
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 3f851c0..b65d898 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 b6d518d..1425ce0 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -32,7 +32,7 @@
#include <gtk/gtk.h>
#include <camel/camel.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 6e8e04c..f254b8c 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 e63d362..ff24677 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) \
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 79e9a04..66a64c3 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)
@@ -1787,6 +1787,7 @@ em_folder_tree_new_with_model (EMailBackend *backend,
{
EMailSession *session;
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);
@@ -2038,7 +2039,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 9a7c87f..cb8b811 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 d92713f..c5b4e0b 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 1423130..6225428 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. */
@@ -976,193 +977,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;
@@ -1274,6 +1088,7 @@ em_utils_expunge_folder (GtkWidget *parent,
CamelFolder *folder)
{
const gchar *description;
+ EMailSession *session;
description = camel_folder_get_description (folder);
@@ -1283,7 +1098,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);
}
/**
@@ -1335,12 +1151,13 @@ 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);
}
+<<<<<<< HEAD
/* ********************************************************************** */
/* runs sync, in main thread */
@@ -1862,57 +1679,11 @@ emu_remove_from_mail_cache (const GSList *addresses)
g_object_unref (cia);
}
+=======
+>>>>>>> Port Evolution to EDS's new mail library.
void
-emu_remove_from_mail_cache_1 (const gchar *address)
-{
- 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)
+emu_free_mail_account_sort_order_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 ();
}
@@ -1970,206 +1741,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)
{
@@ -2200,76 +1771,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 b7e3ec6..b2d0ebc 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);
void em_utils_edit_filters (GtkWidget *parent, EMailBackend *backend);
void em_filename_make_safe (gchar *string);
@@ -60,11 +60,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? */
@@ -73,31 +68,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 5dd215a..b7b4bec 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 526571f..56aab74 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 24a494d..39c4ed1 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 167b4fd..f81f50c 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 30ac175..2d45f9e 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 639e75b..1b94c3f 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))*/
diff --git a/mail/message-list.c b/mail/message-list.c
index e01f42f..ea77c5f 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;
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 90cf1aa..c4c39bf 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -5,6 +5,8 @@ libevolution_module_mail_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/mail \
-I$(top_srcdir)/widgets \
+ $(EMAIL_UTILS_CFLAGS) \
+ $(EMAIL_ENGINE_CFLAGS) \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DEVOLUTION_PRIVDATADIR=\""$(privdatadir)"\" \
@@ -68,7 +70,9 @@ libevolution_module_mail_la_LIBADD = \
$(top_builddir)/capplet/settings/libevolution-mail-settings.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
- $(GTKHTML_LIBS)
+ $(GTKHTML_LIBS) \
+ $(EMAIL_UTILS_LIBS) \
+ $(EMAIL_ENGINE_LIBS)
libevolution_module_mail_la_LDFLAGS = \
-avoid-version -module $(NO_UNDEFINED)
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index b729a00..dd17d8b 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"
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-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 ddf51d8..0f40385 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"
@@ -107,7 +107,6 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
}
g_return_if_fail (account != NULL);
-
session = e_mail_backend_get_session (prefs->priv->backend);
e_mail_store_add_by_account (session, account);
}
@@ -116,12 +115,15 @@ static void
account_prefs_disable_account_cb (EAccountTreeView *tree_view,
EMAccountPrefs *prefs)
{
+ EMailSession *session;
EAccountList *account_list;
EAccount *account;
EMailSession *session;
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))
@@ -334,6 +336,7 @@ account_prefs_delete_account (EAccountManager *manager)
priv = EM_ACCOUNT_PREFS (manager)->priv;
session = e_mail_backend_get_session (priv->backend);
+ 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);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 4f4c0d1..685e7fe 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 07c8923..e01f94f 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 029ea86..0bf5af7 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 f09f880..2748a73 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 72535a3..c691f3c 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 d41f492..281cd12 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 f028528..6926fb8 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -45,7 +45,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 5e48a59..b7b91fa 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 d4054b5..eb01d35 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 ad9a0bb..9f6e658 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) \
$(GTKHTML_CFLAGS) \
$(CLUTTER_CFLAGS)
@@ -96,6 +97,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,7 +134,8 @@ evolution_CPPFLAGS = \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
$(GTKHTML_CFLAGS) \
- $(CLUTTER_CFLAGS)
+ $(CLUTTER_CFLAGS) \
+ $(EMAIL_UTILS_CFLAGS)
evolution_SOURCES = \
main.c
@@ -146,6 +149,7 @@ evolution_LDADD = \
$(top_builddir)/filter/libfilter.la \
$(EVOLUTION_DATA_SERVER_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 2903c84..7399beb 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 8c808d9..cfc3e0d 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]