diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-12-09 23:34:55 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-12-11 10:34:19 +0800 |
commit | 7c0c40f83317228e0a725bfb5ca8854339d25588 (patch) | |
tree | db1197dd9f336e175c590c3a41201dfa78ee303e /mail/importers | |
parent | 2f32e1cc68cd416f4530ecc3d2ff08b0e6498d45 (diff) | |
download | gsoc2013-evolution-7c0c40f83317228e0a725bfb5ca8854339d25588.tar.gz gsoc2013-evolution-7c0c40f83317228e0a725bfb5ca8854339d25588.tar.zst gsoc2013-evolution-7c0c40f83317228e0a725bfb5ca8854339d25588.zip |
Reorder accounts by drag-and-drop.
This implements https://bugzilla.gnome.org/show_bug.cgi?id=663527#c3.
Account reordering is now done by drag-and-drop instead of up/down
buttons.
Turned out to be a wee bit more complicated than I initially thought.
This scraps EAccountManager and EAccountTreeView and replaces them with
new classes centered around EMailAccountStore, which EMailSession owns.
EMailAccountStore is the model behind the account list in Preferences.
The folder tree model now uses it to sort its own top-level rows using
gtk_tree_path_compare(). It also broadcasts account operations through
signals so we don't have to rely so heavily on EAccountList signals,
since EAccountList is going away soon.
Also as part of this work, the e-mail-local.h and e-mail-store.h APIs
have been merged into EMailSession and MailFolderCache.
Diffstat (limited to 'mail/importers')
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 10 | ||||
-rw-r--r-- | mail/importers/mail-importer.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index 3c97bd953b..b158d606a9 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -45,8 +45,6 @@ #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 "mail/em-folder-selection-button.h" #include "mail/em-folder-tree-model.h" #include "mail/em-folder-tree.h" @@ -85,6 +83,8 @@ mbox_getwidget (EImport *ei, { EShell *shell; EShellBackend *shell_backend; + EMailBackend *backend; + EMailSession *session; GtkWindow *window; GtkWidget *hbox, *w; GtkLabel *label; @@ -96,6 +96,9 @@ mbox_getwidget (EImport *ei, shell = e_shell_get_default (); shell_backend = e_shell_get_backend_by_name (shell, "mail"); + backend = E_MAIL_BACKEND (shell_backend); + session = e_mail_backend_get_session (backend); + /* preselect the folder selected in a mail view */ window = e_shell_get_active_window (shell); if (E_IS_SHELL_WINDOW (window)) { @@ -129,7 +132,8 @@ mbox_getwidget (EImport *ei, if (!select_uri) { const gchar *uri; - uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_INBOX); + uri = e_mail_session_get_local_folder_uri ( + session, E_MAIL_LOCAL_FOLDER_INBOX); select_uri = g_strdup (uri); } diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index e28de37b3c..558359c636 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -41,7 +41,6 @@ #include "mail-mt.h" #include "mail-tools.h" -#include "e-mail-local.h" #include "e-mail-session.h" #include "mail-importer.h" @@ -124,7 +123,8 @@ import_mbox_exec (struct _import_mbox_msg *m, } if (m->uri == NULL || m->uri[0] == 0) - folder = e_mail_local_get_folder (E_MAIL_LOCAL_FOLDER_INBOX); + folder = e_mail_session_get_local_folder ( + m->session, E_MAIL_LOCAL_FOLDER_INBOX); else folder = e_mail_session_uri_to_folder_sync ( m->session, m->uri, CAMEL_STORE_FOLDER_CREATE, |