aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-11 22:23:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-12 00:58:53 +0800
commite5760e065ff1f4c5b9842b182224a1ccdd2e322f (patch)
tree760cb295d3eef4ff65ed24eb3bca43ddc0b1724c /mail/e-mail-reader.c
parentbf44bd68f2564be25896ee29bf405d7e111fe49f (diff)
downloadgsoc2013-evolution-e5760e065ff1f4c5b9842b182224a1ccdd2e322f.tar.gz
gsoc2013-evolution-e5760e065ff1f4c5b9842b182224a1ccdd2e322f.tar.zst
gsoc2013-evolution-e5760e065ff1f4c5b9842b182224a1ccdd2e322f.zip
Reimplement em_utils_forward_messages().
Now uses e_mail_folder_build_attachment() and e_mail_folder_get_multiple_messages().
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r--mail/e-mail-reader.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index ec667765e2..e248a561cd 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -536,26 +536,19 @@ static void
action_mail_forward_cb (GtkAction *action,
EMailReader *reader)
{
- EShell *shell;
- EMailBackend *backend;
- EShellBackend *shell_backend;
CamelFolder *folder;
GtkWindow *window;
GPtrArray *uids;
- backend = e_mail_reader_get_backend (reader);
folder = e_mail_reader_get_folder (reader);
uids = e_mail_reader_get_selected_uids (reader);
window = e_mail_reader_get_window (reader);
g_return_if_fail (uids != NULL);
- shell_backend = E_SHELL_BACKEND (backend);
- shell = e_shell_backend_get_shell (shell_backend);
-
if (em_utils_ask_open_many (window, uids->len))
em_utils_forward_messages (
- shell, folder, uids,
+ reader, folder, uids,
e_mail_reader_get_forward_style (reader));
else
em_utils_uids_free (uids);
@@ -567,26 +560,19 @@ static void
action_mail_forward_attached_cb (GtkAction *action,
EMailReader *reader)
{
- EShell *shell;
- EMailBackend *backend;
- EShellBackend *shell_backend;
CamelFolder *folder;
GtkWindow *window;
GPtrArray *uids;
- backend = e_mail_reader_get_backend (reader);
folder = e_mail_reader_get_folder (reader);
uids = e_mail_reader_get_selected_uids (reader);
window = e_mail_reader_get_window (reader);
g_return_if_fail (uids != NULL);
- shell_backend = E_SHELL_BACKEND (backend);
- shell = e_shell_backend_get_shell (shell_backend);
-
if (em_utils_ask_open_many (window, uids->len))
em_utils_forward_messages (
- shell, folder, uids,
+ reader, folder, uids,
E_MAIL_FORWARD_STYLE_ATTACHED);
else
em_utils_uids_free (uids);
@@ -598,26 +584,19 @@ static void
action_mail_forward_inline_cb (GtkAction *action,
EMailReader *reader)
{
- EShell *shell;
- EMailBackend *backend;
- EShellBackend *shell_backend;
CamelFolder *folder;
GtkWindow *window;
GPtrArray *uids;
- backend = e_mail_reader_get_backend (reader);
folder = e_mail_reader_get_folder (reader);
uids = e_mail_reader_get_selected_uids (reader);
window = e_mail_reader_get_window (reader);
g_return_if_fail (uids != NULL);
- shell_backend = E_SHELL_BACKEND (backend);
- shell = e_shell_backend_get_shell (shell_backend);
-
if (em_utils_ask_open_many (window, uids->len))
em_utils_forward_messages (
- shell, folder, uids,
+ reader, folder, uids,
E_MAIL_FORWARD_STYLE_INLINE);
else
em_utils_uids_free (uids);
@@ -629,26 +608,19 @@ static void
action_mail_forward_quoted_cb (GtkAction *action,
EMailReader *reader)
{
- EShell *shell;
- EMailBackend *backend;
- EShellBackend *shell_backend;
CamelFolder *folder;
GtkWindow *window;
GPtrArray *uids;
- backend = e_mail_reader_get_backend (reader);
folder = e_mail_reader_get_folder (reader);
uids = e_mail_reader_get_selected_uids (reader);
window = e_mail_reader_get_window (reader);
g_return_if_fail (uids != NULL);
- shell_backend = E_SHELL_BACKEND (backend);
- shell = e_shell_backend_get_shell (shell_backend);
-
if (em_utils_ask_open_many (window, uids->len))
em_utils_forward_messages (
- shell, folder, uids,
+ reader, folder, uids,
E_MAIL_FORWARD_STYLE_QUOTED);
else
em_utils_uids_free (uids);