[evolution/email-factory-3-4] Cosmetic cleanups.



commit 173d1b81316b424c5976412200a8616c68b37cc5
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Jan 18 17:33:52 2012 -0500

    Cosmetic cleanups.
    
    Mostly sorting out #include's so they're not so jumbled together.
    
    Also make EMailUISession's API consistent -- all functions should take
    an EMailUISession pointer, not an EMailSession pointer.

 calendar/gui/dialogs/event-page.c                  |   36 ++++++-----
 calendar/gui/dialogs/memo-page.c                   |   17 +++--
 calendar/gui/dialogs/task-page.c                   |   24 ++++---
 calendar/gui/e-cal-model.c                         |   10 ++-
 calendar/gui/e-meeting-store.c                     |    6 ++-
 calendar/gui/itip-utils.c                          |   19 +++--
 capplet/settings/mail-settings-view.c              |    6 +-
 composer/e-composer-header-table.h                 |    2 +-
 composer/e-msg-composer.c                          |   14 ++--
 e-util/e-util.h                                    |    1 +
 libemail-engine/e-mail-folder-utils.c              |    2 +-
 libemail-engine/e-mail-junk-filter.c               |    2 +-
 libemail-engine/e-mail-session-utils.c             |    7 +-
 libemail-engine/e-mail-utils.c                     |   58 ----------------
 libemail-engine/e-mail-utils.h                     |   50 ++++++++------
 libemail-engine/mail-config.c                      |    8 +-
 libemail-engine/mail-folder-cache.c                |    4 +-
 libemail-engine/mail-ops.c                         |   24 ++++---
 libemail-engine/mail-ops.h                         |    3 +-
 libemail-utils/e-signature-list.h                  |    2 +-
 mail/e-mail-account-store.c                        |    4 +-
 mail/e-mail-backend.c                              |   60 +++++++++--------
 mail/e-mail-backend.h                              |    2 +-
 mail/e-mail-folder-pane.c                          |    7 ++-
 mail/e-mail-migrate.c                              |   21 ++++---
 mail/e-mail-paned-view.c                           |    9 ++-
 mail/e-mail-reader-utils.c                         |    9 ++-
 mail/e-mail-sidebar.h                              |    2 +-
 mail/e-mail-ui-session.c                           |   14 ++--
 mail/e-mail-ui-session.h                           |    5 +-
 mail/e-mail.h                                      |    4 -
 mail/em-account-editor.c                           |   41 +++++++-----
 mail/em-composer-utils.c                           |   34 +++++-----
 mail/em-filter-context.h                           |    2 +-
 mail/em-filter-folder-element.h                    |    2 +-
 mail/em-filter-source-element.c                    |    2 +-
 mail/em-filter-source-element.h                    |    2 +-
 mail/em-folder-properties.c                        |   15 ++--
 mail/em-folder-properties.h                        |    2 +-
 mail/em-folder-selection-button.c                  |    3 +-
 mail/em-folder-selector.c                          |    3 +-
 mail/em-folder-tree-model.c                        |   30 ++++-----
 mail/em-folder-tree.c                              |   11 ++--
 mail/em-folder-tree.h                              |    4 +-
 mail/em-folder-utils.c                             |   15 ++--
 mail/em-format-html-print.c                        |    8 ++-
 mail/em-subscription-editor.c                      |    8 +-
 mail/em-sync-stream.c                              |    2 +-
 mail/em-utils.c                                    |   42 ++++++------
 mail/em-utils.h                                    |    5 +-
 mail/em-vfolder-context.h                          |    2 +-
 mail/em-vfolder-rule.c                             |   20 +++---
 mail/em-vfolder-rule.h                             |    2 +-
 mail/mail-autofilter.c                             |    5 +-
 mail/mail-autofilter.h                             |    2 +-
 mail/mail-mt.c                                     |    2 +-
 mail/mail-send-recv.c                              |   28 ++++----
 mail/mail-vfolder.c                                |   13 ++--
 mail/message-list.c                                |   17 +++--
 modules/calendar/e-cal-shell-view-private.h        |   54 ++++++++-------
 modules/calendar/e-memo-shell-migrate.c            |    7 +-
 modules/mail/Makefile.am                           |    1 -
 modules/mail/e-mail-shell-backend.c                |   57 +++++++++-------
 modules/mail/e-mail-shell-content.c                |   28 ++++----
 modules/mail/e-mail-shell-view-actions.c           |   14 +++--
 modules/mail/e-mail-shell-view-private.c           |    3 +-
 modules/mail/e-mail-shell-view-private.h           |   70 ++++++++++---------
 modules/mail/e-mail-shell-view.c                   |    2 +-
 modules/mail/em-account-prefs.c                    |   28 +++++----
 modules/mail/em-composer-prefs.c                   |   21 ++++---
 modules/mail/em-network-prefs.c                    |   17 ++---
 modules/online-accounts/camel-sasl-xoauth.c        |    6 +-
 .../online-accounts/evolution-online-accounts.c    |    1 +
 modules/startup-wizard/evolution-startup-wizard.c  |    6 ++-
 plugins/caldav/caldav-browse-server.c              |    1 +
 plugins/dbx-import/dbx-importer.c                  |    5 +-
 plugins/imap-features/imap-headers.c               |    7 +-
 plugins/itip-formatter/itip-formatter.c            |   29 +++++---
 plugins/mail-to-task/mail-to-task.c                |   23 ++++---
 .../mailing-list-actions/mailing-list-actions.c    |   39 ++++++-----
 plugins/mark-all-read/mark-all-read.c              |    1 +
 plugins/pst-import/pst-importer.c                  |    5 +-
 plugins/templates/templates.c                      |   14 ++--
 smime/lib/Makefile.am                              |    2 +-
 widgets/misc/Makefile.am                           |    2 +-
 widgets/misc/e-signature-editor.h                  |    2 +-
 widgets/misc/e-signature-manager.h                 |    2 +-
 widgets/misc/e-signature-preview.c                 |    3 +-
 widgets/misc/e-signature-preview.h                 |    2 +-
 89 files changed, 632 insertions(+), 574 deletions(-)
---
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 48d132e..a5c0ac6 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -34,31 +34,35 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
+
+#include <libecal/e-cal-time-util.h>
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
-#include "misc/e-dateedit.h"
-#include "misc/e-send-options.h"
-#include "misc/e-buffer-tagger.h"
-#include <libecal/e-cal-time-util.h>
-#include "../e-timezone-entry.h"
 
-#include "e-util/e-util.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"
-#include "e-util/e-util-private.h"
+#include <e-util/e-util.h>
+#include <e-util/e-categories-config.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-dialog-widgets.h>
+#include <e-util/e-util-private.h>
+
+#include <libemail-utils/e-account-utils.h>
 
+#include <misc/e-dateedit.h>
+#include <misc/e-send-options.h>
+#include <misc/e-buffer-tagger.h>
+
+#include "../e-alarm-list.h"
 #include "../e-meeting-attendee.h"
-#include "../e-meeting-store.h"
 #include "../e-meeting-list-view.h"
-#include "comp-editor.h"
-#include "comp-editor-util.h"
-#include "../e-alarm-list.h"
+#include "../e-meeting-store.h"
+#include "../e-timezone-entry.h"
+
 #include "alarm-list-dialog.h"
-#include "event-page.h"
+#include "comp-editor-util.h"
+#include "comp-editor.h"
 #include "e-send-options-utils.h"
+#include "event-page.h"
 
 #define EVENT_PAGE_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 9a817fa..bf60445 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -33,20 +33,23 @@
 #include <string.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
+
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
 #include <libedataserverui/e-name-selector.h>
 #include <libedataserverui/e-name-selector-entry.h>
 #include <libedataserverui/e-name-selector-list.h>
-#include <widgets/misc/e-dateedit.h>
-#include "misc/e-buffer-tagger.h"
-
-#include "e-util/e-util.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-util-private.h"
+
+#include <e-util/e-util.h>
+#include <e-util/e-categories-config.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
+
+#include <misc/e-dateedit.h>
+#include <misc/e-buffer-tagger.h>
+
+#include <libemail-utils/e-account-utils.h>
 
 #include "../calendar-config.h"
 #include "comp-editor.h"
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 5462cd1..2033a46 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -33,27 +33,31 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
+
 #include <libedataserverui/e-category-completion.h>
 #include <libedataserverui/e-client-utils.h>
 #include <libedataserverui/e-source-combo-box.h>
+
 #include <misc/e-dateedit.h>
-#include "misc/e-buffer-tagger.h"
+#include <misc/e-buffer-tagger.h>
+
+#include <e-util/e-categories-config.h>
 #include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
+#include <e-util/e-util.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include "../e-meeting-attendee.h"
+#include "../e-meeting-list-view.h"
+#include "../e-meeting-store.h"
 #include "../e-timezone-entry.h"
+
 #include "comp-editor.h"
 #include "comp-editor-util.h"
 #include "e-send-options-utils.h"
 #include "task-page.h"
 
-#include "e-util/e-util.h"
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-categories-config.h"
-#include "e-util/e-util-private.h"
-
-#include "../e-meeting-attendee.h"
-#include "../e-meeting-store.h"
-#include "../e-meeting-list-view.h"
-
 #define TASK_PAGE_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), TYPE_TASK_PAGE, TaskPagePrivate))
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 079b8e9..7344e87 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -28,18 +28,22 @@
 
 #include <string.h>
 #include <glib/gi18n.h>
+
 #include <libebackend/e-extensible.h>
 #include <libedataserver/e-flag.h>
 #include <libedataserver/e-time-utils.h>
 #include <libecal/e-cal-client-view.h>
 #include <libecal/e-cal-time-util.h>
+
+#include <e-util/e-util.h>
+#include <e-util/e-util-enumtypes.h>
+
+#include <libemail-utils/e-account-utils.h>
+
 #include "comp-util.h"
 #include "e-cal-model.h"
 #include "itip-utils.h"
 #include "misc.h"
-#include "e-util/e-util.h"
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-util-enumtypes.h"
 
 struct _ECalModelComponentPrivate {
 	GString *categories_str;
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index c35d451..e11d90e 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -28,6 +28,7 @@
 #include <gio/gio.h>
 #include <glib/gi18n.h>
 #include <libsoup/soup.h>
+
 #include <libecal/e-cal-component.h>
 #include <libecal/e-cal-util.h>
 #include <libecal/e-cal-time-util.h>
@@ -35,8 +36,11 @@
 #include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-proxy.h>
 #include <libedataserverui/e-passwords.h>
-#include <libemail-utils/e-account-utils.h>
+
 #include <e-util/e-util-enumtypes.h>
+
+#include <libemail-utils/e-account-utils.h>
+
 #include "itip-utils.h"
 #include "e-meeting-utils.h"
 #include "e-meeting-attendee.h"
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index ca2dc82..e58f2f9 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -24,21 +24,24 @@
 #include <config.h>
 #endif
 
+#include <time.h>
 #include <glib/gi18n.h>
-#include <libedataserver/e-time-utils.h>
-#include <gtk/gtk.h>
 #include <libical/ical.h>
-#include <libemail-utils/e-account-utils.h>
-#include <e-util/e-dialog-utils.h>
+#include <libsoup/soup.h>
+
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-util.h>
-#include <libsoup/soup.h>
-#include "itip-utils.h"
-#include <time.h>
-#include "dialogs/comp-editor-util.h"
+#include <libedataserver/e-time-utils.h>
+
+#include <e-util/e-dialog-utils.h>
+
+#include <libemail-utils/e-account-utils.h>
 
 #include <composer/e-msg-composer.h>
 
+#include "itip-utils.h"
+#include "dialogs/comp-editor-util.h"
+
 #define d(x)
 
 static const gchar *itip_methods[] = {
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index 80e8a6a..992f705 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -25,11 +25,13 @@
 #endif
 
 #include <glib/gi18n.h>
-#include "mail-settings-view.h"
 #include <libedataserver/e-account-list.h>
-#include "mail-view.h"
+
 #include <libemail-utils/e-account-utils.h>
 
+#include "mail-settings-view.h"
+#include "mail-view.h"
+
 struct _MailSettingsViewPrivate {
 	GtkWidget *tab_str;
 
diff --git a/composer/e-composer-header-table.h b/composer/e-composer-header-table.h
index f29fcf5..9d6a83f 100644
--- a/composer/e-composer-header-table.h
+++ b/composer/e-composer-header-table.h
@@ -23,9 +23,9 @@
 #include <libebook/e-destination.h>
 
 #include <shell/e-shell.h>
+#include <composer/e-composer-header.h>
 #include <libemail-utils/e-signature.h>
 #include <libemail-utils/e-signature-list.h>
-#include <composer/e-composer-header.h>
 
 /* Standard GObject macros */
 #define E_TYPE_COMPOSER_HEADER_TABLE \
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 113a120..6a48950 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -37,13 +37,13 @@
 #include <ctype.h>
 #include <fcntl.h>
 
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-alert-dialog.h"
-#include "e-util/e-dialog-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"
+#include <e-util/e-alert-dialog.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
+#include <em-format/em-format.h>
+#include <em-format/em-format-quote.h>
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/e-signature-utils.h>
 
 #include "e-composer-private.h"
 
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 14237da..101706b 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -30,6 +30,7 @@
 
 #include <e-util/e-marshal.h>
 #include <e-util/e-util-enums.h>
+
 #include <libedataserver/e-source-list.h>
 
 /* e_get_user_data_dir() used to live here, so #include its new home
diff --git a/libemail-engine/e-mail-folder-utils.c b/libemail-engine/e-mail-folder-utils.c
index bca0dda..cf00921 100644
--- a/libemail-engine/e-mail-folder-utils.c
+++ b/libemail-engine/e-mail-folder-utils.c
@@ -24,7 +24,7 @@
 
 #include <glib/gi18n-lib.h>
 
-#include "mail-tools.h"
+#include <libemail-engine/mail-tools.h>
 
 /* X-Mailer header value */
 #define X_MAILER ("Evolution Mail Data Server" PACKAGE_VERSION)
diff --git a/libemail-engine/e-mail-junk-filter.c b/libemail-engine/e-mail-junk-filter.c
index d682490..fda8efb 100644
--- a/libemail-engine/e-mail-junk-filter.c
+++ b/libemail-engine/e-mail-junk-filter.c
@@ -18,7 +18,7 @@
 
 #include "e-mail-junk-filter.h"
 
-#include <e-mail-session.h>
+#include <libemail-engine/e-mail-session.h>
 
 G_DEFINE_ABSTRACT_TYPE (
 	EMailJunkFilter,
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index 404b9d9..60e745e 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -22,12 +22,11 @@
 
 #include "e-mail-session-utils.h"
 
-#include "e-mail-utils.h"
-
 #include <glib/gi18n-lib.h>
 
-#include "mail-tools.h"
-#include "e-mail-folder-utils.h"
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-utils.h>
+#include <libemail-engine/mail-tools.h>
 #include <libemail-utils/e-account-utils.h>
 
 /* X-Mailer header value */
diff --git a/libemail-engine/e-mail-utils.c b/libemail-engine/e-mail-utils.c
index 48de229..05f5381 100644
--- a/libemail-engine/e-mail-utils.c
+++ b/libemail-engine/e-mail-utils.c
@@ -853,64 +853,6 @@ guess_account_from_message (CamelMimeMessage *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)
diff --git a/libemail-engine/e-mail-utils.h b/libemail-engine/e-mail-utils.h
index 62fdcf0..144f13d 100644
--- a/libemail-engine/e-mail-utils.h
+++ b/libemail-engine/e-mail-utils.h
@@ -19,32 +19,38 @@
  *
  */
 
-#ifndef __E_MAIL_UTILS_H__
-#define __E_MAIL_UTILS_H__
+#ifndef E_MAIL_UTILS_H
+#define E_MAIL_UTILS_H
 
-#include <sys/types.h>
 #include <camel/camel.h>
+#include <libedataserver/e-account.h>
 
 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);
-
-gboolean em_utils_in_addressbook (CamelInternetAddress *addr, gboolean local_only);
-CamelMimePart *em_utils_contact_photo (CamelInternetAddress *addr, gboolean local);
-
-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);
-
-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_uids_free (GPtrArray *uids);
-gboolean em_utils_is_local_delivery_mbox_file (CamelURL *url);
-
-#endif
+gboolean	em_utils_in_addressbook		(CamelInternetAddress *addr,
+						 gboolean local_only);
+CamelMimePart *	em_utils_contact_photo		(CamelInternetAddress *addr,
+						 gboolean local);
+EAccount *	em_utils_guess_account		(CamelMimeMessage *message,
+						 CamelFolder *folder);
+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);
+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_uids_free		(GPtrArray *uids);
+gboolean	em_utils_is_local_delivery_mbox_file
+						(CamelURL *url);
+
+#endif /* E_MAIL_UTILS_H */
diff --git a/libemail-engine/mail-config.c b/libemail-engine/mail-config.c
index 57ec1b5..51d34a0 100644
--- a/libemail-engine/mail-config.c
+++ b/libemail-engine/mail-config.c
@@ -30,11 +30,11 @@
 #include <gtk/gtk.h>
 
 #include <libedataserver/e-data-server-util.h>
-#include "libemail-utils/e-account-utils.h"
-#include "libemail-utils/e-signature-list.h"
-#include "libemail-utils/e-signature-utils.h"
-#include "libemail-engine/e-mail-folder-utils.h"
 
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/e-signature-utils.h>
+
+#include "e-mail-folder-utils.h"
 #include "mail-config.h"
 #include "mail-tools.h"
 
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 914c0f3..54adddd 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -40,12 +40,14 @@
 
 #include <libedataserver/e-data-server-util.h>
 
-#include "libemail-utils/mail-mt.h"
+#include <libemail-utils/mail-mt.h>
+
 #include "mail-folder-cache.h"
 #include "mail-ops.h"
 #include "mail-tools.h"
 #include "e-mail-utils.h"
 #include "e-mail-folder-utils.h"
+#include "e-mail-session.h"
 #include "e-mail-store-utils.h"
 #include "mail-config.h"
 
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index d5c992c..d47b173 100644
--- a/libemail-engine/mail-ops.c
+++ b/libemail-engine/mail-ops.c
@@ -35,12 +35,15 @@
 #include <glib/gi18n.h>
 
 #include <libedataserver/e-data-server-util.h>
-#include "libemail-utils/e-account-utils.h"
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
 
 #include "e-mail-utils.h"
-#include "libemail-utils/mail-mt.h"
 #include "mail-ops.h"
 #include "mail-tools.h"
+
+#include "e-mail-session.h"
 #include "e-mail-session-utils.h"
 
 #define w(x)
@@ -210,7 +213,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
 	struct _filter_mail_msg *fm = (struct _filter_mail_msg *) m;
 	CamelFolder *folder = NULL;
 	CamelService *service;
-	CamelSession *session;	
+	CamelSession *session;
 	CamelURL *url;
 	gboolean is_local_delivery = FALSE;
 	const gchar *uid;
@@ -221,7 +224,6 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
 
 	fm->destination = e_mail_session_get_local_folder (
 		E_MAIL_SESSION (session), E_MAIL_LOCAL_FOLDER_LOCAL_INBOX);
-
 	if (fm->destination == NULL)
 		goto exit;
 	g_object_ref (fm->destination);
@@ -535,7 +537,7 @@ mail_send_message (struct _send_queue_msg *m,
 	if (transport != NULL) {
 		const gchar *uid;
 
- 		/* Let the dialog know the right account it is using. */
+		/* Let the dialog know the right account it is using. */
 		uid = camel_service_get_uid (CAMEL_SERVICE (transport));
 		report_status (m, CAMEL_FILTER_STATUS_ACTION, 0, uid);
 	}
@@ -947,6 +949,7 @@ mail_send_queue (EMailSession *session,
 {
 	struct _send_queue_msg *m;
 
+	g_return_if_fail (E_IS_MAIL_SESSION (session));
 
 	m = mail_msg_new (&send_queue_info);
 	m->session = g_object_ref (session);
@@ -1756,11 +1759,11 @@ static MailMsgInfo multi_op_object = {
 };
 
 void
-mail_operate_on_object(GObject *object, 
-		       GCancellable *cancellable,
-		       gboolean (*do_op) (GObject *object, gpointer data, GError **error),
-		       void (*done) (gboolean ret, gpointer data, GError *error), 
-		       gpointer data)
+mail_operate_on_object (GObject *object, 
+		        GCancellable *cancellable,
+		        gboolean (*do_op) (GObject *object, gpointer data, GError **error),
+		        void (*done) (gboolean ret, gpointer data, GError *error), 
+		        gpointer data)
 {
 	struct _multi_op_object_msg *m;
 
@@ -1774,4 +1777,3 @@ mail_operate_on_object(GObject *object,
 		m->base.cancellable = cancellable;
 	mail_msg_unordered_push (m);
 }
-
diff --git a/libemail-engine/mail-ops.h b/libemail-engine/mail-ops.h
index 6b4a595..a748b87 100644
--- a/libemail-engine/mail-ops.h
+++ b/libemail-engine/mail-ops.h
@@ -27,9 +27,8 @@
 G_BEGIN_DECLS
 
 #include <camel/camel.h>
-#include <libemail-engine/e-mail-session.h>
-
 #include <libemail-utils/mail-mt.h>
+#include <libemail-engine/e-mail-session.h>
 
 void		mail_transfer_messages		(EMailSession *session,
 						 CamelFolder *source,
diff --git a/libemail-utils/e-signature-list.h b/libemail-utils/e-signature-list.h
index abeeed5..ebcb4b2 100644
--- a/libemail-utils/e-signature-list.h
+++ b/libemail-utils/e-signature-list.h
@@ -26,7 +26,7 @@
 
 #include <gconf/gconf-client.h>
 #include <libedataserver/e-list.h>
-#include "libemail-utils/e-signature.h"
+#include <libemail-utils/e-signature.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_LIST \
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index 2b62b29..0af2725 100644
--- a/mail/e-mail-account-store.c
+++ b/mail/e-mail-account-store.c
@@ -25,9 +25,11 @@
 #include <libebackend/e-extensible.h>
 
 #include <e-util/e-marshal.h>
-#include <libemail-utils/e-account-utils.h>
 #include <e-util/e-alert-dialog.h>
+
+#include <libemail-utils/e-account-utils.h>
 #include <libemail-engine/mail-ops.h>
+
 #include <mail/mail-vfolder.h>
 
 #define E_MAIL_ACCOUNT_STORE_GET_PRIVATE(obj) \
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 17c5811..da9d1bf 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -32,29 +32,29 @@
 #include <glib/gstdio.h>
 #include <libedataserver/e-data-server-util.h>
 
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-alert-dialog.h"
-#include "e-util/e-alert-sink.h"
-
-#include "misc/e-account-combo-box.h"
-
-#include "shell/e-shell.h"
-
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "mail/e-mail-migrate.h"
-#include "libemail-engine/e-mail-session.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 "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"
-#include "mail/e-mail-ui-session.h"
+#include <shell/e-shell.h>
+
+#include <e-util/e-alert-dialog.h>
+#include <e-util/e-alert-sink.h>
+
+#include <misc/e-account-combo-box.h>
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/e-mail-store-utils.h>
+#include <libemail-engine/mail-config.h>
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-ops.h>
+
+#include <mail/e-mail-migrate.h>
+#include <mail/e-mail-ui-session.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-send-recv.h>
+#include <mail/mail-vfolder.h>
 
 #define E_MAIL_BACKEND_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -797,6 +797,7 @@ mail_mt_create_activity (GCancellable *cancellable)
 	e_activity_set_cancellable (activity, cancellable);
 	SET_ACITIVITY (cancellable, activity);
 }
+
 static void
 mail_mt_submit_activity (GCancellable *cancellable)
 {
@@ -978,12 +979,13 @@ 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);
+	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 a63f4b1..b44b330 100644
--- a/mail/e-mail-backend.h
+++ b/mail/e-mail-backend.h
@@ -26,8 +26,8 @@
 #ifndef E_MAIL_BACKEND_H
 #define E_MAIL_BACKEND_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <shell/e-shell-backend.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define E_TYPE_MAIL_BACKEND \
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c
index c3de413..7e0457e 100644
--- a/mail/e-mail-folder-pane.c
+++ b/mail/e-mail-folder-pane.c
@@ -30,19 +30,22 @@
 
 #include "e-util/e-util.h"
 #include "e-util/e-plugin-ui.h"
+
 #include "shell/e-shell.h"
 #include "shell/e-shell-utils.h"
+
 #include "widgets/misc/e-popup-action.h"
 #include "widgets/misc/e-preview-pane.h"
 
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/mail-tools.h"
+
 #include "mail/e-mail-reader.h"
 #include "mail/e-mail-reader-utils.h"
 #include "mail/em-folder-tree-model.h"
 #include "mail/em-format-html-display.h"
 #include "mail/em-composer-utils.h"
 #include "mail/em-utils.h"
-#include "libemail-engine/mail-tools.h"
-#include "libemail-engine/e-mail-utils.h"
 #include "mail/message-list.h"
 
 #define E_MAIL_FOLDER_PANE_GET_PRIVATE(obj) \
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 8587dbf..3b7de4c 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -48,22 +48,25 @@
 #include <libxml/parser.h>
 #include <libxml/xmlmemory.h>
 
-#include <e-util/e-util.h>
 #include <libedataserver/e-xml-utils.h>
 #include <libedataserver/e-data-server-util.h>
+
+#include <shell/e-shell.h>
+#include <shell/e-shell-migrate.h>
+
+#include <e-util/e-util.h>
 #include <e-util/e-xml-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 "libemail-utils/e-signature-utils.h"
+#include <e-util/e-alert-dialog.h>
+#include <e-util/e-util-private.h>
+#include <e-util/e-plugin.h>
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/e-signature-utils.h>
 
-#include "shell/e-shell.h"
-#include "shell/e-shell-migrate.h"
+#include <libemail-engine/e-mail-folder-utils.h>
 
 #include "e-mail-backend.h"
-#include "libemail-engine/e-mail-folder-utils.h"
 #include "em-utils.h"
 
 #define d(x) x
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 2cb4404..7a510e3 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -38,12 +38,13 @@
 
 #include <shell/e-shell-window-actions.h>
 
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-utils.h>
+#include <libemail-engine/mail-config.h>
+#include <libemail-engine/mail-ops.h>
+
 #include "em-utils.h"
-#include "libemail-engine/mail-config.h"
-#include "libemail-engine/mail-ops.h"
 #include "message-list.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-utils.h"
 #include "e-mail-reader-utils.h"
 
 #define E_MAIL_PANED_VIEW_GET_PRIVATE(obj) \
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 0aafad1..c814435 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -37,16 +37,17 @@
 #include "misc/e-web-view.h"
 #include "shell/e-shell-utils.h"
 
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-utils.h>
+#include <libemail-engine/mail-ops.h>
+#include <libemail-engine/mail-tools.h>
+
 #include "mail/e-mail-backend.h"
 #include "mail/e-mail-browser.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-utils.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 "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-sidebar.h b/mail/e-mail-sidebar.h
index 136e194..bdde4c1 100644
--- a/mail/e-mail-sidebar.h
+++ b/mail/e-mail-sidebar.h
@@ -22,8 +22,8 @@
 #ifndef E_MAIL_SIDEBAR_H
 #define E_MAIL_SIDEBAR_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <mail/em-folder-tree.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define E_TYPE_MAIL_SIDEBAR \
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index d39dba1..25dd93c 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -714,8 +714,8 @@ mail_ui_session_get_property (GObject *object,
 		case PROP_LABEL_STORE:
 			g_value_set_object (
 				value,
-				e_mail_session_get_label_store (
-				E_MAIL_SESSION (object)));
+				e_mail_ui_session_get_label_store (
+				E_MAIL_UI_SESSION (object)));
 			return;
 
 
@@ -884,8 +884,8 @@ e_mail_ui_session_get_vfolder_store (EMailUISession *session)
 }
 
 void
-e_mail_session_add_activity (EMailSession *session,
-                             EActivity *activity)
+e_mail_ui_session_add_activity (EMailUISession *session,
+                                EActivity *activity)
 {
 	g_return_if_fail (E_IS_MAIL_UI_SESSION (session));
 	g_return_if_fail (E_IS_ACTIVITY (activity));
@@ -894,11 +894,11 @@ e_mail_session_add_activity (EMailSession *session,
 }
 
 EMailLabelListStore *
-e_mail_session_get_label_store (EMailSession *session)
+e_mail_ui_session_get_label_store (EMailUISession *session)
 {
-	g_return_val_if_fail (E_IS_MAIL_SESSION (session), NULL);
+	g_return_val_if_fail (E_IS_MAIL_UI_SESSION (session), NULL);
 
-	return ((EMailUISession *) session)->priv->label_store;
+	return session->priv->label_store;
 }
 
 
diff --git a/mail/e-mail-ui-session.h b/mail/e-mail-ui-session.h
index e8fb9ae..1a36487 100644
--- a/mail/e-mail-ui-session.h
+++ b/mail/e-mail-ui-session.h
@@ -82,10 +82,11 @@ CamelStore *	e_mail_ui_session_get_vfolder_store
 EMailAccountStore *
 		e_mail_ui_session_get_account_store
 						(EMailUISession *session);
-void		e_mail_session_add_activity	(EMailSession *session,
+void		e_mail_ui_session_add_activity	(EMailUISession *session,
 						 EActivity *activity);
 EMailLabelListStore *
-		e_mail_session_get_label_store	(EMailSession *session);
+		e_mail_ui_session_get_label_store
+						(EMailUISession *session);
 
 G_END_DECLS
 
diff --git a/mail/e-mail.h b/mail/e-mail.h
index 1f7f6bd..3b34765 100644
--- a/mail/e-mail.h
+++ b/mail/e-mail.h
@@ -26,7 +26,6 @@
 #include <mail/e-mail-enums.h>
 #include <mail/e-mail-enumtypes.h>
 #include <mail/e-mail-folder-pane.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>
@@ -38,10 +37,7 @@
 #include <mail/e-mail-paned-view.h>
 #include <mail/e-mail-reader.h>
 #include <mail/e-mail-reader-utils.h>
-#include <libemail-engine/e-mail-session.h>
-#include <libemail-engine/e-mail-session-utils.h>
 #include <mail/e-mail-sidebar.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 ba2b98d..d22a796 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -45,33 +45,38 @@
 
 #include <libedataserverui/e-passwords.h>
 
-#include "shell/e-shell.h"
-#include "e-util/e-util.h"
-#include "e-util/e-alert-dialog.h"
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-dialog-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 <shell/e-shell.h>
 
+#include <e-util/e-util.h>
+#include <e-util/e-alert-dialog.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/e-signature-list.h>
+#include <libemail-utils/e-signature-utils.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/mail-ops.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-account-store.h"
 #include "e-mail-backend.h"
-#include "libemail-engine/e-mail-folder-utils.h"
 #include "e-mail-junk-options.h"
+#include "e-mail-ui-session.h"
+#include "em-account-editor.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-guess-servers.h"
-#include "libemail-engine/mail-ops.h"
-#include "libemail-utils/mail-mt.h"
-#include "e-mail-ui-session.h"
+#include "mail-mt.h"
+#include "mail-send-recv.h"
 
 #if defined (HAVE_NSS) && defined (ENABLE_SMIME)
-#include "smime/gui/e-cert-selector.h"
+#include <smime/gui/e-cert-selector.h>
 #endif
 
 #define EM_ACCOUNT_EDITOR_GET_PRIVATE(obj) \
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 6dc8a22..2a46b94 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -32,33 +32,35 @@
 
 #include <libedataserver/e-data-server-util.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-alert-dialog.h>
+#include <e-util/e-alert-sink.h>
+#include <e-util/e-util.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/e-mail-session-utils.h>
+#include <libemail-engine/mail-ops.h>
+#include <libemail-engine/mail-tools.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 "shell/e-shell.h"
+#include <composer/e-msg-composer.h>
+#include <composer/e-composer-actions.h>
+#include <composer/e-composer-post-header.h>
 
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-utils.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"
-#include "composer/e-composer-actions.h"
-#include "composer/e-composer-post-header.h"
 #include "em-folder-selector.h"
 #include "em-folder-tree.h"
 #include "em-format-html.h"
 #include "em-format-html-print.h"
 #include "em-format-quote.h"
 #include "em-event.h"
+#include "mail-mt.h"
+#include "mail-send-recv.h"
+
 
 #ifdef G_OS_WIN32
 #ifdef gmtime_r
diff --git a/mail/em-filter-context.h b/mail/em-filter-context.h
index 77288d0..1f8889d 100644
--- a/mail/em-filter-context.h
+++ b/mail/em-filter-context.h
@@ -25,8 +25,8 @@
 #ifndef EM_FILTER_CONTEXT_H
 #define EM_FILTER_CONTEXT_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <filter/e-rule-context.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_FILTER_CONTEXT \
diff --git a/mail/em-filter-folder-element.h b/mail/em-filter-folder-element.h
index d36484c..f5a1741 100644
--- a/mail/em-filter-folder-element.h
+++ b/mail/em-filter-folder-element.h
@@ -25,8 +25,8 @@
 #ifndef EM_FILTER_FOLDER_ELEMENT_H
 #define EM_FILTER_FOLDER_ELEMENT_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <filter/e-filter-element.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_FILTER_FOLDER_ELEMENT \
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 257a6ed..5848f93 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -32,8 +32,8 @@
 #include <gtk/gtk.h>
 #include <camel/camel.h>
 
-#include <libemail-utils/e-account-utils.h>
 #include <filter/e-filter-part.h>
+#include <libemail-utils/e-account-utils.h>
 
 #define EM_FILTER_SOURCE_ELEMENT_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/mail/em-filter-source-element.h b/mail/em-filter-source-element.h
index efd7a6a..061a487 100644
--- a/mail/em-filter-source-element.h
+++ b/mail/em-filter-source-element.h
@@ -24,8 +24,8 @@
 #ifndef EM_FILTER_SOURCE_ELEMENT_H
 #define EM_FILTER_SOURCE_ELEMENT_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <filter/e-filter-element.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_FILTER_SOURCE_ELEMENT \
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index cd34364..2abb1f3 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -24,19 +24,20 @@
 #include <config.h>
 #endif
 
+#include "em-folder-properties.h"
+
 #include <string.h>
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#include "em-folder-properties.h"
-#include "em-config.h"
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/mail-ops.h>
 
 #include "e-mail-backend.h"
 #include "e-mail-ui-session.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/mail-ops.h"
-#include "libemail-utils/mail-mt.h"
+#include "em-config.h"
 #include "mail-vfolder.h"
 
 typedef struct _AsyncContext AsyncContext;
@@ -499,8 +500,8 @@ em_folder_properties_show (CamelStore *store,
 	cancellable = camel_operation_new ();
 	e_activity_set_cancellable (context->activity, cancellable);
 
-	e_mail_session_add_activity (
-		E_MAIL_SESSION (session), context->activity);
+	e_mail_ui_session_add_activity (
+		E_MAIL_UI_SESSION (session), context->activity);
 
 	camel_store_get_folder (
 		store, folder_name, 0, G_PRIORITY_DEFAULT, cancellable,
diff --git a/mail/em-folder-properties.h b/mail/em-folder-properties.h
index ee7ef67..2d829af 100644
--- a/mail/em-folder-properties.h
+++ b/mail/em-folder-properties.h
@@ -25,8 +25,8 @@
 #define __EM_FOLDER_PROPERTIES_H__
 
 #include <camel/camel.h>
-#include <libemail-engine/e-mail-session.h>
 #include <e-util/e-alert-sink.h>
+#include <libemail-engine/e-mail-session.h>
 
 G_BEGIN_DECLS
 
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 5f4c129..fb4e27d 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -28,7 +28,8 @@
 #include <glib/gi18n.h>
 #include <e-util/e-util.h>
 
-#include "libemail-engine/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 9d892aa..18172cb 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -29,7 +29,8 @@
 #include <glib/gi18n.h>
 #include <e-util/e-util.h>
 
-#include "libemail-engine/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 e9db6b9..7ee385c 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -36,24 +36,22 @@
 
 #include <glib/gi18n.h>
 
-#include "e-util/e-util.h"
-#include "libemail-utils/e-account-utils.h"
+#include <e-util/e-util.h>
+#include <shell/e-shell.h>
 
-#include "libemail-engine/mail-tools.h"
-#include "libemail-utils/mail-mt.h"
-#include "libemail-engine/mail-ops.h"
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
 
-/* sigh, these 2 only needed for outbox total count checking - a mess */
-#include "libemail-engine/mail-folder-cache.h"
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-tools.h>
+#include <libemail-engine/mail-ops.h>
 
-#include "em-utils.h"
-#include "em-folder-utils.h"
-#include "em-event.h"
-#include "e-mail-ui-session.h"
-
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-utils.h"
-#include "shell/e-shell.h"
+#include <e-mail-account-store.h>
+#include <e-mail-ui-session.h>
+#include <em-utils.h>
+#include <em-folder-utils.h>
+#include <em-event.h>
 
 #define EM_FOLDER_TREE_MODEL_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -575,7 +573,7 @@ em_folder_tree_model_set_session (EMFolderTreeModel *model,
 		MailFolderCache *folder_cache;
 
 		folder_cache = e_mail_session_get_folder_cache (session);
-		account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION(session));
+		account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
 
 		/* Keep our own reference since we connect to its signals. */
 		g_warn_if_fail (model->priv->account_store == NULL);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 6e9f5cf..46a8c10 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -49,10 +49,10 @@
 #include "em-vfolder-rule.h"
 
 #include "libemail-utils/mail-mt.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-session.h"
 #include "libemail-engine/mail-ops.h"
 #include "libemail-engine/mail-tools.h"
-#include "mail-send-recv.h"
-#include "mail-vfolder.h"
 
 #include "em-utils.h"
 #include "em-folder-tree.h"
@@ -60,9 +60,9 @@
 #include "em-folder-selector.h"
 #include "em-folder-properties.h"
 #include "em-event.h"
+#include "mail-send-recv.h"
+#include "mail-vfolder.h"
 
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-session.h"
 #include "e-mail-ui-session.h"
 
 #define d(x)
@@ -1823,7 +1823,8 @@ em_folder_tree_new_activity (EMFolderTree *folder_tree)
 	g_object_unref (cancellable);
 
 	session = em_folder_tree_get_session (folder_tree);
-	e_mail_session_add_activity (session, activity);
+	e_mail_ui_session_add_activity (
+		E_MAIL_UI_SESSION (session), activity);
 
 	return activity;
 }
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index 6c90fe2..1e39eba 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -25,10 +25,10 @@
 #define EM_FOLDER_TREE_H
 
 #include <gtk/gtk.h>
+#include <e-util/e-activity.h>
 #include <e-util/e-alert-sink.h>
-#include <libemail-engine/e-mail-session.h>
 #include <mail/em-folder-tree-model.h>
-#include <e-util/e-activity.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_FOLDER_TREE \
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 1bb1ecb..1350df7 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -46,23 +46,22 @@
 #include "em-vfolder-rule.h"
 
 #include "libemail-utils/mail-mt.h"
+#include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-session.h"
+#include "libemail-engine/e-mail-store-utils.h"
+#include "libemail-engine/e-mail-utils.h"
 #include "libemail-engine/mail-ops.h"
 #include "libemail-engine/mail-tools.h"
-#include "mail-vfolder.h"
 #include "libemail-engine/mail-folder-cache.h"
 
+#include "e-mail-ui-session.h"
 #include "em-utils.h"
 #include "em-folder-tree.h"
 #include "em-folder-tree-model.h"
 #include "em-folder-utils.h"
 #include "em-folder-selector.h"
 #include "em-folder-properties.h"
-#include "e-mail-ui-session.h"
-
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-session.h"
-#include "libemail-engine/e-mail-store-utils.h"
-#include "libemail-engine/e-mail-utils.h"
+#include "mail-vfolder.h"
 
 #define d(x)
 
@@ -569,7 +568,7 @@ em_folder_utils_create_folder (GtkWindow *parent,
 	model = em_folder_tree_model_new ();
 	em_folder_tree_model_set_session (model, session);
 
-	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION(session));
+	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
 	e_mail_account_store_queue_enabled_services (account_store, &queue);
 
 	while (!g_queue_is_empty (&queue)) {
diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index f376a5b..0421690 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -30,11 +30,13 @@
 #include <gtk/gtk.h>
 #include <gtkhtml/gtkhtml.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>
 
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/mail-ops.h>
+
+#include "em-format-html-print.h"
+
 G_DEFINE_TYPE (
 	EMFormatHTMLPrint,
 	em_format_html_print,
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 5d5db4a..ceefe7c 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -25,12 +25,12 @@
 #include <string.h>
 #include <glib/gi18n-lib.h>
 
-#include "libemail-engine/mail-tools.h"
-#include "libemail-engine/mail-ops.h"
-#include "libemail-utils/mail-mt.h"
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/mail-tools.h>
+#include <libemail-engine/mail-ops.h>
 
 #include <e-util/e-util.h>
-#include <libemail-utils/e-account-utils.h>
 #include <e-util/e-util-private.h>
 
 #include "em-folder-utils.h"
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 4f7d4a3..841d890 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 "libemail-utils/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 af096f7..247b47d 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -41,39 +41,40 @@
 #undef interface
 #endif
 
-#include <libebook/e-book-client.h>
-#include <libebook/e-book-query.h>
-
 #include "em-filter-editor.h"
 
 #include <glib/gi18n.h>
 
 #include <gio/gio.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 <libebook/e-book-client.h>
+#include <libebook/e-book-query.h>
 #include <libedataserver/e-data-server-util.h>
 #include <libedataserver/e-flag.h>
 #include <libedataserver/e-proxy.h>
-#include "e-util/e-util.h"
-#include "e-util/e-util-private.h"
-#include "e-util/e-mktemp.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"
-#include "widgets/misc/e-attachment.h"
 
-#include "em-utils.h"
+#include <e-util/e-util.h>
+#include <e-util/e-util-private.h>
+#include <e-util/e-mktemp.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-alert-dialog.h>
+
+#include <shell/e-shell.h>
+#include <widgets/misc/e-attachment.h>
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/mail-ops.h>
+#include <libemail-engine/mail-tools.h>
+
+#include "e-mail-tag-editor.h"
 #include "em-composer-utils.h"
 #include "em-format-quote.h"
 #include "em-format-html-print.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-session.h"
+#include "em-utils.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. */
@@ -1259,7 +1260,6 @@ em_utils_empty_trash (GtkWidget *parent,
 
 /* ********************************************************************** */
 
-
 void
 em_utils_clear_get_password_canceled_accounts_flag (void)
 {
diff --git a/mail/em-utils.h b/mail/em-utils.h
index 2846f21..09ae4a5 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -29,11 +29,12 @@
 #include <libedataserver/e-proxy.h>
 #include <libedataserver/e-account.h>
 
-#include <mail/e-mail-reader.h>
 #include <libemail-engine/e-mail-session.h>
-#include <mail/em-folder-tree.h>
 #include <libemail-engine/e-mail-utils.h>
 
+#include <mail/e-mail-reader.h>
+#include <mail/em-folder-tree.h>
+
 G_BEGIN_DECLS
 
 struct _EMFormat;
diff --git a/mail/em-vfolder-context.h b/mail/em-vfolder-context.h
index 069b8ce..2d1c6ef 100644
--- a/mail/em-vfolder-context.h
+++ b/mail/em-vfolder-context.h
@@ -25,8 +25,8 @@
 #ifndef EM_VFOLDER_CONTEXT_H
 #define EM_VFOLDER_CONTEXT_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <filter/e-rule-context.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_VFOLDER_CONTEXT \
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index b194db1..91bf461 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -30,17 +30,19 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
+#include <shell/e-shell.h>
+
+#include <e-util/e-util.h>
+#include <e-util/e-alert.h>
+#include <e-util/e-util-private.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+
+#include "em-folder-selector.h"
+#include "em-folder-tree.h"
+#include "em-utils.h"
 #include "em-vfolder-context.h"
 #include "em-vfolder-rule.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "mail/em-utils.h"
-#include "mail/em-folder-tree.h"
-#include "mail/em-folder-selector.h"
-#include "shell/e-shell.h"
-
-#include "e-util/e-util.h"
-#include "e-util/e-alert.h"
-#include "e-util/e-util-private.h"
 
 #define EM_VFOLDER_RULE_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h
index a3319c6..1b3a443 100644
--- a/mail/em-vfolder-rule.h
+++ b/mail/em-vfolder-rule.h
@@ -24,8 +24,8 @@
 #ifndef EM_VFOLDER_RULE_H
 #define EM_VFOLDER_RULE_H
 
-#include <libemail-engine/e-mail-session.h>
 #include <filter/e-filter-rule.h>
+#include <libemail-engine/e-mail-session.h>
 
 /* Standard GObject macros */
 #define EM_TYPE_VFOLDER_RULE \
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 752d094..08e3a3d 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -29,8 +29,9 @@
 
 #include <glib/gi18n.h>
 
-#include "libemail-engine/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-session.h>
+
 #include "mail-vfolder.h"
 #include "mail-autofilter.h"
 #include "em-utils.h"
diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h
index 9b2dbf5..34593b0 100644
--- a/mail/mail-autofilter.h
+++ b/mail/mail-autofilter.h
@@ -27,9 +27,9 @@
 #include <camel/camel.h>
 
 #include <filter/e-filter-rule.h>
-#include <libemail-engine/e-mail-session.h>
 #include <mail/em-filter-context.h>
 #include <mail/em-vfolder-context.h>
+#include <libemail-engine/e-mail-session.h>
 
 enum {
 	AUTO_SUBJECT = 1,
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 56aab74..1330d0d 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 "libemail-utils/mail-mt.h"
+#include <libemail-utils/mail-mt.h>
 
 /*#define MALLOC_CHECK*/
 #define d(x)
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 1aebf0a..05a48c4 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -29,26 +29,26 @@
 
 #include <glib/gi18n.h>
 
-#include "libedataserver/e-account-list.h"
+#include <libedataserver/e-account-list.h>
 
-#include "shell/e-shell.h"
+#include <shell/e-shell.h>
+#include <e-util/e-util.h>
 
-#include "libemail-utils/e-account-utils.h"
-#include "e-util/e-util.h"
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
 
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "libemail-engine/e-mail-utils.h"
-#include "libemail-engine/e-mail-session.h"
-#include "mail/e-mail-ui-session.h"
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-ops.h>
+#include <libemail-engine/mail-tools.h>
+
+#include "e-mail-account-store.h"
+#include "e-mail-ui-session.h"
 #include "em-event.h"
 #include "em-filter-rule.h"
 #include "em-utils.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 "libemail-engine/mail-tools.h"
-#include <mail/e-mail-account-store.h>
 
 #define d(x)
 
@@ -505,7 +505,7 @@ build_dialog (GtkWindow *parent,
 	EMEventTargetSendReceive *target;
 	GQueue queue = G_QUEUE_INIT;
 
-	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION(session));
+	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
 
 	/* Convert the outgoing account to a CamelTransport. */
 	if (outgoing_account != NULL) {
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index c0556e5..4b10e82 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -31,20 +31,21 @@
 #include "e-util/e-alert-dialog.h"
 #include "e-util/e-util-private.h"
 
-#include "e-mail-backend.h"
-#include "libemail-engine/e-mail-session.h"
+#include "libemail-utils/mail-mt.h"
+#include "libemail-engine/mail-folder-cache.h"
 #include "libemail-engine/e-mail-folder-utils.h"
+#include "libemail-engine/e-mail-session.h"
 #include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/mail-ops.h"
+#include "libemail-engine/mail-tools.h"
+
+#include "e-mail-backend.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 "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-ui-session.h"
 
diff --git a/mail/message-list.c b/mail/message-list.c
index 695436e..405e9d0 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -58,15 +58,16 @@
 #include "table/e-tree-memory-callbacks.h"
 #include "table/e-tree-memory.h"
 
-#include "e-mail-label-list-store.h"
-#include "em-utils.h"
-#include "libemail-engine/mail-config.h"
 #include "libemail-utils/mail-mt.h"
+#include "libemail-engine/e-mail-utils.h"
+#include "libemail-engine/mail-config.h"
 #include "libemail-engine/mail-ops.h"
 #include "libemail-engine/mail-tools.h"
-#include "libemail-engine/e-mail-utils.h"
-#include "message-list.h"
+
+#include "mail/e-mail-label-list-store.h"
 #include "mail/e-mail-ui-session.h"
+#include "mail/em-utils.h"
+#include "mail/message-list.h"
 
 #if HAVE_CLUTTER
 #include <clutter/clutter.h>
@@ -1711,7 +1712,8 @@ ml_tree_value_at_ex (ETreeModel *etm,
 			/* Get all applicable labels. */
 			struct LabelsData ld;
 
-			ld.store = e_mail_session_get_label_store (session);
+			ld.store = e_mail_ui_session_get_label_store (
+				E_MAIL_UI_SESSION (session));
 			ld.labels_tag2iter = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) gtk_tree_iter_free);
 			for_node_and_subtree_if_collapsed (message_list, path, msg_info, add_all_labels_foreach, &ld);
 
@@ -1793,7 +1795,8 @@ ml_tree_value_at_ex (ETreeModel *etm,
 		struct LabelsData ld;
 		GString *result = g_string_new ("");
 
-		ld.store = e_mail_session_get_label_store (session);
+		ld.store = e_mail_ui_session_get_label_store (
+			E_MAIL_UI_SESSION (session));
 		ld.labels_tag2iter = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) gtk_tree_iter_free);
 		for_node_and_subtree_if_collapsed (message_list, path, msg_info, add_all_labels_foreach, &ld);
 
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index c428ffe..ad4984a 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -26,6 +26,7 @@
 
 #include <string.h>
 #include <glib/gi18n.h>
+
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-system-timezone.h>
 #include <libedataserver/e-categories.h>
@@ -33,31 +34,34 @@
 #include <libedataserver/e-sexp.h>
 #include <libedataserverui/e-client-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"
-#include "e-util/e-util.h"
-#include "shell/e-shell-utils.h"
-#include "misc/e-popup-action.h"
-#include "misc/e-selectable.h"
-
-#include "calendar/gui/calendar-config.h"
-#include "calendar/gui/comp-util.h"
-#include "calendar/gui/e-cal-list-view.h"
-#include "calendar/gui/e-cal-model-tasks.h"
-#include "calendar/gui/e-calendar-view.h"
-#include "calendar/gui/e-day-view.h"
-#include "calendar/gui/e-week-view.h"
-#include "calendar/gui/gnome-cal.h"
-#include "calendar/gui/print.h"
-#include "calendar/gui/dialogs/calendar-setup.h"
-#include "calendar/gui/dialogs/copy-source-dialog.h"
-#include "calendar/gui/dialogs/event-editor.h"
-#include "calendar/gui/dialogs/goto-dialog.h"
-#include "calendar/gui/dialogs/memo-editor.h"
-#include "calendar/gui/dialogs/select-source-dialog.h"
-#include "calendar/gui/dialogs/task-editor.h"
+#include <e-util/e-selection.h>
+#include <e-util/e-dialog-utils.h>
+#include <e-util/e-file-utils.h>
+#include <e-util/e-util.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include <shell/e-shell-utils.h>
+
+#include <misc/e-popup-action.h>
+#include <misc/e-selectable.h>
+
+#include <calendar/gui/calendar-config.h>
+#include <calendar/gui/comp-util.h>
+#include <calendar/gui/e-cal-list-view.h>
+#include <calendar/gui/e-cal-model-tasks.h>
+#include <calendar/gui/e-calendar-view.h>
+#include <calendar/gui/e-day-view.h>
+#include <calendar/gui/e-week-view.h>
+#include <calendar/gui/gnome-cal.h>
+#include <calendar/gui/print.h>
+#include <calendar/gui/dialogs/calendar-setup.h>
+#include <calendar/gui/dialogs/copy-source-dialog.h>
+#include <calendar/gui/dialogs/event-editor.h>
+#include <calendar/gui/dialogs/goto-dialog.h>
+#include <calendar/gui/dialogs/memo-editor.h>
+#include <calendar/gui/dialogs/select-source-dialog.h>
+#include <calendar/gui/dialogs/task-editor.h>
 
 #include "e-cal-shell-backend.h"
 #include "e-cal-shell-content.h"
diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c
index f0d2d9d..171428f 100644
--- a/modules/calendar/e-memo-shell-migrate.c
+++ b/modules/calendar/e-memo-shell-migrate.c
@@ -28,13 +28,14 @@
 #include <string.h>
 #include <glib/gi18n.h>
 #include <camel/camel.h>
+
 #include <libedataserver/e-source.h>
 #include <libedataserver/e-source-group.h>
 #include <libedataserver/e-source-list.h>
 
-#include "libemail-utils/e-account-utils.h"
-#include "calendar/gui/calendar-config-keys.h"
-#include "shell/e-shell.h"
+#include <shell/e-shell.h>
+#include <calendar/gui/calendar-config-keys.h>
+#include <libemail-utils/e-account-utils.h>
 
 #include "e-memo-shell-backend.h"
 
diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am
index d168878..7fbb354 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -3,7 +3,6 @@ module_LTLIBRARIES = libevolution-module-mail.la
 libevolution_module_mail_la_CPPFLAGS =					\
 	$(AM_CPPFLAGS)							\
 	-I$(top_srcdir)							\
-	-I$(top_srcdir)/mail						\
 	-I$(top_srcdir)/widgets						\
 	-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\"			\
 	-DEVOLUTION_UIDIR=\""$(uidir)"\"				\
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 7a69fee..4e28d8c 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -27,38 +27,42 @@
 
 #include <glib/gi18n.h>
 
-#include "e-util/e-import.h"
-#include "e-util/e-util.h"
-#include "shell/e-shell.h"
-#include "shell/e-shell-window.h"
-#include "composer/e-msg-composer.h"
-#include "widgets/misc/e-preferences-window.h"
-#include "widgets/misc/e-web-view.h"
+#include <e-util/e-import.h>
+#include <e-util/e-util.h>
+
+#include <shell/e-shell.h>
+#include <shell/e-shell-window.h>
+
+#include <composer/e-msg-composer.h>
+
+#include <widgets/misc/e-preferences-window.h>
+#include <widgets/misc/e-web-view.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/mail-config.h>
+#include <libemail-engine/mail-ops.h>
+
+#include <mail/e-mail-browser.h>
+#include <mail/e-mail-reader.h>
+#include <mail/em-account-editor.h>
+#include <mail/em-composer-utils.h>
+#include <mail/em-folder-utils.h>
+#include <mail/em-format-hook.h>
+#include <mail/em-format-html-display.h>
+#include <mail/em-utils.h>
+#include <mail/mail-send-recv.h>
+#include <mail/mail-vfolder.h>
+#include <mail/importers/mail-importer.h>
+#include <mail/e-mail-ui-session.h>
 
 #include "e-mail-shell-settings.h"
 #include "e-mail-shell-sidebar.h"
 #include "e-mail-shell-view.h"
-
-#include "e-mail-browser.h"
-#include "libemail-engine/e-mail-folder-utils.h"
-#include "e-mail-reader.h"
-#include "libemail-engine/e-mail-session.h"
-#include "em-account-editor.h"
 #include "em-account-prefs.h"
 #include "em-composer-prefs.h"
-#include "em-composer-utils.h"
-#include "em-folder-utils.h"
-#include "em-format-hook.h"
-#include "em-format-html-display.h"
 #include "em-mailer-prefs.h"
 #include "em-network-prefs.h"
-#include "em-utils.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"
-#include "e-mail-ui-session.h"
 
 #define E_MAIL_SHELL_BACKEND_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -472,7 +476,7 @@ mail_shell_backend_start (EShellBackend *shell_backend)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	account_store = e_mail_ui_session_get_account_store ((EMailUISession *)session);
+	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
 
 	enable_search_folders = e_shell_settings_get_boolean (
 		shell_settings, "mail-enable-search-folders");
@@ -647,7 +651,8 @@ e_mail_labels_get_filter_options (void)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	model = GTK_TREE_MODEL (label_store);
 	valid = gtk_tree_model_get_iter_first (model, &iter);
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index fff395c..5bb60e3 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -28,21 +28,23 @@
 #include <glib/gi18n.h>
 #include <libedataserver/e-data-server-util.h>
 
-#include "e-util/e-util-private.h"
-#include "widgets/menus/gal-view-etable.h"
-#include "widgets/menus/gal-view-instance.h"
-#include "widgets/misc/e-paned.h"
-#include "widgets/misc/e-preview-pane.h"
-#include "widgets/misc/e-search-bar.h"
-
-#include "em-utils.h"
-#include "libemail-engine/mail-ops.h"
-#include "message-list.h"
-
-#include "e-mail-paned-view.h"
-#include "e-mail-notebook-view.h"
-#include "e-mail-reader.h"
-#include "e-mail-reader-utils.h"
+#include <e-util/e-util-private.h>
+
+#include <widgets/menus/gal-view-etable.h>
+#include <widgets/menus/gal-view-instance.h>
+#include <widgets/misc/e-paned.h>
+#include <widgets/misc/e-preview-pane.h>
+#include <widgets/misc/e-search-bar.h>
+
+#include <libemail-engine/mail-ops.h>
+
+#include <mail/e-mail-paned-view.h>
+#include <mail/e-mail-notebook-view.h>
+#include <mail/e-mail-reader.h>
+#include <mail/e-mail-reader-utils.h>
+#include <mail/em-utils.h>
+#include <mail/message-list.h>
+
 #include "e-mail-shell-backend.h"
 #include "e-mail-shell-view-actions.h"
 
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 8202b09..407f17e 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -99,7 +99,7 @@ action_mail_account_disable_cb (GtkAction *action,
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	account_store = e_mail_ui_session_get_account_store ((EMailUISession *) session);
+	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION (session));
 
 	folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
 	store = em_folder_tree_get_selected_store (folder_tree);
@@ -709,7 +709,8 @@ action_mail_label_new_cb (GtkAction *action,
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	label_dialog = E_MAIL_LABEL_DIALOG (dialog);
 	label_name = e_mail_label_dialog_get_label_name (label_dialog);
@@ -770,7 +771,8 @@ action_mail_label_none_cb (GtkAction *action,
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	mail_shell_content = mail_shell_view->priv->mail_shell_content;
 	mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
@@ -1919,7 +1921,8 @@ e_mail_shell_view_update_popup_labels (EMailShellView *mail_shell_view)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	action_group = ACTION_GROUP (MAIL_LABEL);
 	merge_id = mail_shell_view->priv->label_merge_id;
@@ -2021,7 +2024,8 @@ e_mail_shell_view_update_search_filter (EMailShellView *mail_shell_view)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	action_group = ACTION_GROUP (MAIL_FILTER);
 	e_action_group_remove_all_actions (action_group);
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index b7e7f95..f43734f 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -665,7 +665,8 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (
+		E_MAIL_UI_SESSION (session));
 
 	e_shell_window_add_action_group (shell_window, "mail");
 	e_shell_window_add_action_group (shell_window, "mail-filter");
diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h
index 58892fa..c60d5c6 100644
--- a/modules/mail/e-mail-shell-view-private.h
+++ b/modules/mail/e-mail-shell-view-private.h
@@ -28,39 +28,43 @@
 #include <gtkhtml/gtkhtml.h>
 #include <camel/camel-search-private.h>  /* for camel_search_word */
 
-#include "e-util/e-util.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 "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-reader.h"
-#include "e-mail-reader-utils.h"
-#include "libemail-engine/e-mail-session.h"
-#include "libemail-engine/e-mail-session-utils.h"
-#include "e-mail-sidebar.h"
-#include "libemail-engine/e-mail-store-utils.h"
-#include "em-composer-utils.h"
-#include "em-folder-properties.h"
-#include "em-folder-selector.h"
-#include "em-folder-utils.h"
-#include "em-search-context.h"
-#include "em-subscription-editor.h"
-#include "em-utils.h"
-#include "mail-autofilter.h"
-#include "libemail-engine/mail-folder-cache.h"
-#include "libemail-engine/mail-ops.h"
-#include "mail-send-recv.h"
-#include "libemail-engine/mail-tools.h"
-#include "mail-vfolder.h"
-#include "message-list.h"
-#include "e-mail-ui-session.h"
+#include <e-util/e-util.h>
+#include <e-util/e-ui-manager.h>
+
+#include <filter/e-filter-part.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include <libemail-engine/e-mail-folder-utils.h>
+#include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/e-mail-session-utils.h>
+#include <libemail-engine/e-mail-store-utils.h>
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-ops.h>
+#include <libemail-engine/mail-tools.h>
+
+#include <misc/e-web-view.h>
+#include <misc/e-popup-action.h>
+#include <menus/gal-view-instance.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-reader.h>
+#include <mail/e-mail-reader-utils.h>
+#include <mail/e-mail-sidebar.h>
+#include <mail/e-mail-ui-session.h>
+#include <mail/em-composer-utils.h>
+#include <mail/em-folder-properties.h>
+#include <mail/em-folder-selector.h>
+#include <mail/em-folder-utils.h>
+#include <mail/em-search-context.h>
+#include <mail/em-subscription-editor.h>
+#include <mail/em-utils.h>
+#include <mail/mail-autofilter.h>
+#include <mail/mail-send-recv.h>
+#include <mail/mail-vfolder.h>
+#include <mail/message-list.h>
 
 #include "e-mail-shell-backend.h"
 #include "e-mail-shell-content.h"
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 07fec7e..afd7501 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -269,7 +269,7 @@ mail_shell_view_execute_search (EShellView *shell_view)
 	folder = e_mail_reader_get_folder (reader);
 	message_list = e_mail_reader_get_message_list (reader);
 
-	label_store = e_mail_session_get_label_store (session);
+	label_store = e_mail_ui_session_get_label_store (E_MAIL_UI_SESSION (session));
 
 	action = ACTION (MAIL_SEARCH_SUBJECT_OR_ADDRESSES_CONTAIN);
 	value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 8051b35..c6b132e 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -33,17 +33,20 @@
 
 #include <glib/gi18n.h>
 
-#include "e-util/e-alert-dialog.h"
-#include "libemail-utils/e-account-utils.h"
-
-#include "e-mail-backend.h"
-#include "em-config.h"
-#include "em-account-editor.h"
-#include "em-utils.h"
-#include "mail-vfolder.h"
-#include "shell/e-shell.h"
-#include "capplet/settings/mail-capplet-shell.h"
-#include "e-mail-ui-session.h"
+#include <e-util/e-alert-dialog.h>
+
+#include <shell/e-shell.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include <capplet/settings/mail-capplet-shell.h>
+
+#include <mail/e-mail-backend.h>
+#include <mail/e-mail-ui-session.h>
+#include <mail/em-config.h>
+#include <mail/em-account-editor.h>
+#include <mail/em-utils.h>
+#include <mail/mail-vfolder.h>
 
 #define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -322,7 +325,8 @@ em_account_prefs_new (EPreferencesWindow *window)
 
 	backend = E_MAIL_BACKEND (shell_backend);
 	session = e_mail_backend_get_session (backend);
-	account_store = e_mail_ui_session_get_account_store (E_MAIL_UI_SESSION(session));
+	account_store = e_mail_ui_session_get_account_store (
+		E_MAIL_UI_SESSION (session));
 
 	return g_object_new (
 		EM_TYPE_ACCOUNT_PREFS,
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 96aa91e..e678152 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -24,18 +24,14 @@
 #include <config.h>
 #endif
 
+#include "em-composer-prefs.h"
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 
-#include "libemail-utils/e-signature-utils.h"
-
-#include "em-composer-prefs.h"
-#include "composer/e-msg-composer.h"
-#include "shell/e-shell-utils.h"
-
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 
@@ -44,14 +40,21 @@
 
 #include <e-util/e-util.h>
 #include <e-util/e-util-private.h>
+
+#include <libemail-utils/e-signature-utils.h>
+
+#include <composer/e-msg-composer.h>
+
+#include <shell/e-shell-utils.h>
+
 #include <misc/e-charset-combo-box.h>
 #include <misc/e-signature-editor.h>
 #include <misc/e-signature-manager.h>
 #include <misc/e-signature-preview.h>
 
-#include "em-config.h"
-#include "em-folder-selection-button.h"
-#include "e-mail-junk-options.h"
+#include <mail/em-config.h>
+#include <mail/em-folder-selection-button.h>
+#include <mail/e-mail-junk-options.h>
 
 G_DEFINE_TYPE (
 	EMComposerPrefs,
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 7939250..93a12d2 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -24,25 +24,24 @@
 #include <config.h>
 #endif
 
+#include "em-network-prefs.h"
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 
-#include "em-network-prefs.h"
-
+#include <glib/gstdio.h>
 #include <gdk/gdkkeysyms.h>
 #include <gconf/gconf-client.h>
 
-#include <glib/gstdio.h>
-
-#include "e-util/e-util.h"
-#include "e-util/e-util-private.h"
-#include "mail/e-mail-junk-options.h"
+#include <e-util/e-util.h>
+#include <e-util/e-util-private.h>
 
-#include "em-config.h"
-#include "em-folder-selection-button.h"
+#include <mail/em-config.h>
+#include <mail/em-folder-selection-button.h>
+#include <mail/e-mail-junk-options.h>
 
 #define d(x)
 
diff --git a/modules/online-accounts/camel-sasl-xoauth.c b/modules/online-accounts/camel-sasl-xoauth.c
index edf5c6e..7b1a59a 100644
--- a/modules/online-accounts/camel-sasl-xoauth.c
+++ b/modules/online-accounts/camel-sasl-xoauth.c
@@ -20,11 +20,11 @@
 #include <config.h>
 #endif
 
-#include <e-util/e-account-utils.h>
+#include <glib/gi18n-lib.h>
 
-#include "camel-sasl-xoauth.h"
+#include <libemail-utils/e-account-utils.h>
 
-#include <glib/gi18n-lib.h>
+#include "camel-sasl-xoauth.h"
 
 #define GOA_API_IS_SUBJECT_TO_CHANGE
 #include <goa/goa.h>
diff --git a/modules/online-accounts/evolution-online-accounts.c b/modules/online-accounts/evolution-online-accounts.c
index 780c94e..6efeaba 100644
--- a/modules/online-accounts/evolution-online-accounts.c
+++ b/modules/online-accounts/evolution-online-accounts.c
@@ -30,6 +30,7 @@
 #include <libedataserver/e-account-list.h>
 
 #include <shell/e-shell.h>
+
 #include <libemail-utils/e-account-utils.h>
 
 #include "camel-sasl-xoauth.h"
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 18681bf..2edeb1c 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -24,13 +24,17 @@
 #include <libebackend/e-extension.h>
 
 #include <shell/e-shell.h>
-#include <libemail-utils/e-account-utils.h>
+
 #include <e-util/e-alert-dialog.h>
 #include <e-util/e-import.h>
 
+#include <libemail-utils/e-account-utils.h>
+
 #include <mail/e-mail-backend.h>
 #include <mail/em-account-editor.h>
+
 #include <capplet/settings/mail-capplet-shell.h>
+
 #include <calendar/gui/calendar-config.h>
 
 /* Standard GObject macros */
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index aad2c98..c9d09ce 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -38,6 +38,7 @@
 #include <libedataserverui/e-passwords.h>
 
 #include <e-util/e-dialog-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 dfb0d7a..f6b6665 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -64,10 +64,11 @@
 #include <libedataserver/e-data-server-util.h>
 #include <libedataserverui/e-source-selector-dialog.h>
 
-#include <mail/e-mail-backend.h>
-#include <mail/em-folder-selection-button.h>
 #include <libemail-utils/mail-mt.h>
 #include <libemail-engine/mail-tools.h>
+
+#include <mail/e-mail-backend.h>
+#include <mail/em-folder-selection-button.h>
 #include <mail/em-utils.h>
 
 #define d(x)
diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c
index 2748a73..60f50d7 100644
--- a/plugins/imap-features/imap-headers.c
+++ b/plugins/imap-features/imap-headers.c
@@ -25,15 +25,14 @@
 #endif
 
 #include <string.h>
-
-#include <mail/em-config.h>
-
 #include <gtk/gtk.h>
+#include <glib/gi18n.h>
 
 #include <e-util/e-util.h>
+
 #include <libemail-utils/e-account-utils.h>
 
-#include <glib/gi18n.h>
+#include <mail/em-config.h>
 
 typedef struct _epif_data EPImapFeaturesData;
 struct _epif_data {
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index c72c31a..d450dcf 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -27,27 +27,36 @@
 #include <string.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
+
 #include <libecal/e-cal-client.h>
 #include <libecal/e-cal-time-util.h>
+#include <libedataserver/e-account-list.h>
 #include <libedataserverui/e-source-selector.h>
 #include <libedataserverui/e-client-utils.h>
 #include <gtkhtml/gtkhtml-embedded.h>
+
+#include <e-util/e-alert-dialog.h>
+#include <e-util/e-mktemp.h>
+
+#include <shell/e-shell.h>
+#include <shell/e-shell-utils.h>
+
+#include <libemail-utils/e-account-utils.h>
+#include <libemail-utils/mail-mt.h>
+
+#include <libemail-engine/mail-folder-cache.h>
+#include <libemail-engine/mail-tools.h>
+
 #include <mail/em-format-hook.h>
 #include <mail/em-config.h>
 #include <mail/em-format-html.h>
 #include <mail/em-utils.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 <libemail-utils/e-account-utils.h>
-#include <e-util/e-alert-dialog.h>
-#include <e-util/e-mktemp.h>
+
+#include <misc/e-attachment.h>
+
 #include <calendar/gui/itip-utils.h>
-#include <shell/e-shell.h>
-#include <shell/e-shell-utils.h>
+
 #include "itip-view.h"
-#include <misc/e-attachment.h>
 
 #define CLASSID "itip://"
 #define CONF_KEY_DELETE "delete-processed"
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 39c1cac..e338393 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -28,9 +28,9 @@
 #include <config.h>
 #endif
 
-#include <glib/gi18n-lib.h>
-#include <string.h>
 #include <stdio.h>
+#include <string.h>
+#include <glib/gi18n-lib.h>
 
 #include <gtkhtml/gtkhtml.h>
 #include <libecal/e-cal-client.h>
@@ -41,20 +41,25 @@
 #include <libedataserverui/e-source-selector-dialog.h>
 #include <libedataserverui/e-client-utils.h>
 
-#include <mail/e-mail-browser.h>
-#include <mail/em-utils.h>
-#include <mail/em-format-html.h>
-#include <mail/message-list.h>
-#include <libemail-utils/e-account-utils.h>
 #include <e-util/e-dialog-utils.h>
+
+#include <libemail-utils/e-account-utils.h>
+
 #include <misc/e-popup-action.h>
+#include <misc/e-attachment-store.h>
+
 #include <shell/e-shell-view.h>
 #include <shell/e-shell-window-actions.h>
+
+#include <mail/e-mail-browser.h>
+#include <mail/em-utils.h>
+#include <mail/em-format-html.h>
+#include <mail/message-list.h>
+
 #include <calendar/gui/dialogs/comp-editor.h>
 #include <calendar/gui/dialogs/event-editor.h>
-#include <calendar/gui/dialogs/task-editor.h>
 #include <calendar/gui/dialogs/memo-editor.h>
-#include <misc/e-attachment-store.h>
+#include <calendar/gui/dialogs/task-editor.h>
 
 #define E_SHELL_WINDOW_ACTION_CONVERT_TO_EVENT(window) \
 	E_SHELL_WINDOW_ACTION ((window), "mail-convert-to-event")
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index cad91e9..a9bc811 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -24,27 +24,32 @@
 #include <config.h>
 #endif
 
-#include <glib/gi18n-lib.h>
 #include <stdio.h>
 #include <string.h>
 #include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
+
+#include <e-util/e-util.h>
+#include <e-util/e-alert-dialog.h>
+
+#include <libemail-utils/e-account-utils.h>
+
+#include <shell/e-shell-view.h>
+#include <shell/e-shell-window.h>
+#include <shell/e-shell-window-actions.h>
+
+#include <composer/e-msg-composer.h>
+
+#include <libemail-utils/mail-mt.h>
+#include <libemail-engine/mail-ops.h>
 
-#include "composer/e-msg-composer.h"
-#include "mail/e-mail-browser.h"
-#include "mail/e-mail-reader.h"
-#include "mail/em-composer-utils.h"
-#include "mail/em-format-hook.h"
-#include "mail/em-config.h"
-#include "mail/em-utils.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 "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"
-#include "shell/e-shell-window-actions.h"
+#include <mail/e-mail-browser.h>
+#include <mail/e-mail-reader.h>
+#include <mail/em-composer-utils.h>
+#include <mail/em-config.h>
+#include <mail/em-format-hook.h>
+#include <mail/em-utils.h>
+#include <mail/message-list.h>
 
 /* EAlert Message IDs */
 #define MESSAGE_PREFIX			"org.gnome.mailing-list-actions:"
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index f3b5ced..beac49a 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -31,6 +31,7 @@
 #include <e-util/e-plugin-ui.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 6b3324d..f1e61dd 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -53,10 +53,11 @@
 #include <libedataserverui/e-source-combo-box.h>
 #include <libedataserverui/e-client-utils.h>
 
-#include <mail/e-mail-backend.h>
-#include <mail/em-folder-selection-button.h>
 #include <libemail-utils/mail-mt.h>
 #include <libemail-engine/mail-tools.h>
+
+#include <mail/e-mail-backend.h>
+#include <mail/em-folder-selection-button.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 162f115..2b62dc9 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -30,19 +30,21 @@
 #include <glib/gi18n.h>
 #include <string.h>
 
+#include <e-util/e-alert-dialog.h>
 #include <e-util/e-config.h>
+#include <e-util/e-plugin.h>
+#include <e-util/e-util.h>
+
+#include <shell/e-shell-view.h>
 
 #include <libemail-engine/e-mail-folder-utils.h>
-#include <mail/e-mail-reader.h>
 #include <libemail-engine/e-mail-session.h>
+#include <libemail-engine/mail-ops.h>
+
+#include <mail/e-mail-reader.h>
 #include <mail/em-composer-utils.h>
 #include <mail/em-utils.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>
-#include <e-util/e-util.h>
-#include <shell/e-shell-view.h>
 
 #include <composer/e-msg-composer.h>
 
diff --git a/smime/lib/Makefile.am b/smime/lib/Makefile.am
index 17a2a63..9ed6067 100644
--- a/smime/lib/Makefile.am
+++ b/smime/lib/Makefile.am
@@ -29,10 +29,10 @@ libessmime_la_SOURCES = 	\
 	e-pkcs12.h
 
 libessmime_la_LIBADD =				\
+	$(top_builddir)/libemail-utils/libemail-utils.la	\
 	$(top_builddir)/e-util/libeutil.la	\
 	$(EVOLUTION_DATA_SERVER_LIBS)		\
 	$(GNOME_PLATFORM_LIBS)			\
-	$(top_builddir)/libemail-utils/libemail-utils.la	\
 	$(CERT_UI_LIBS)
 
 libessmime_la_LDFLAGS = $(NO_UNDEFINED)
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index 4fc867f..d0bef3f 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -157,7 +157,7 @@ libemiscwidgets_la_LIBADD =					\
 	$(top_builddir)/filter/libfilter.la			\
 	$(top_builddir)/a11y/libevolution-a11y.la		\
 	$(top_builddir)/libgnomecanvas/libgnomecanvas.la	\
-	$(top_builddir)/libemail-utils/libemail-utils.la		\
+	$(top_builddir)/libemail-utils/libemail-utils.la	\
 	$(EVOLUTION_DATA_SERVER_LIBS)				\
 	$(GNOME_PLATFORM_LIBS)					\
 	$(MATH_LIB)						\
diff --git a/widgets/misc/e-signature-editor.h b/widgets/misc/e-signature-editor.h
index 0ba47b7..0d07cb8 100644
--- a/widgets/misc/e-signature-editor.h
+++ b/widgets/misc/e-signature-editor.h
@@ -23,8 +23,8 @@
 #define E_SIGNATURE_EDITOR_H
 
 #include <gtkhtml-editor.h>
-#include <libemail-utils/e-signature.h>
 #include <misc/e-focus-tracker.h>
+#include <libemail-utils/e-signature.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_EDITOR \
diff --git a/widgets/misc/e-signature-manager.h b/widgets/misc/e-signature-manager.h
index cdbe16c..a551621 100644
--- a/widgets/misc/e-signature-manager.h
+++ b/widgets/misc/e-signature-manager.h
@@ -23,9 +23,9 @@
 #define E_SIGNATURE_MANAGER_H
 
 #include <gtk/gtk.h>
-#include <libemail-utils/e-signature-list.h>
 #include <misc/e-signature-editor.h>
 #include <misc/e-signature-tree-view.h>
+#include <libemail-utils/e-signature-list.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_MANAGER \
diff --git a/widgets/misc/e-signature-preview.c b/widgets/misc/e-signature-preview.c
index 41064b1..6de03c0 100644
--- a/widgets/misc/e-signature-preview.c
+++ b/widgets/misc/e-signature-preview.c
@@ -29,7 +29,8 @@
 #include <string.h>
 #include <unistd.h>
 #include <glib/gstdio.h>
-#include "libemail-utils/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 27ec47f..f13ecf8 100644
--- a/widgets/misc/e-signature-preview.h
+++ b/widgets/misc/e-signature-preview.h
@@ -22,8 +22,8 @@
 #ifndef E_SIGNATURE_PREVIEW_H
 #define E_SIGNATURE_PREVIEW_H
 
-#include <libemail-utils/e-signature.h>
 #include <misc/e-web-view.h>
+#include <libemail-utils/e-signature.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_PREVIEW \



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