aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-15 06:20:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-15 23:44:29 +0800
commitcbf51737faf61d88c3b7c5349b5db635b892c2c1 (patch)
tree0bc436489470b182a045e34679dab07bdf97f08f /plugins
parent3aa74ebe41c3d30c0e22dabd2c27c215a90d0c73 (diff)
downloadgsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar.gz
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar.bz2
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar.lz
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar.xz
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.tar.zst
gsoc2013-evolution-cbf51737faf61d88c3b7c5349b5db635b892c2c1.zip
Add e_mail_session_append_to_local_folder().
Asynchronous + synchronous convenience functions. Uses the EMailLocalFolder enumeration to specify a well-known folder.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/templates/templates.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 4359af01b9..f218bce9a4 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -37,8 +37,7 @@
#include <shell/e-shell-view.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 <mail/e-mail-reader.h>
@@ -1157,7 +1156,6 @@ got_message_draft_cb (EMsgComposer *composer,
EMailSession *session;
CamelMimeMessage *message;
CamelMessageInfo *info;
- CamelFolder *folder;
GError *error = NULL;
message = e_msg_composer_get_message_draft_finish (
@@ -1188,10 +1186,6 @@ got_message_draft_cb (EMsgComposer *composer,
backend = E_MAIL_BACKEND (shell_backend);
session = e_mail_backend_get_session (backend);
- /* Get the templates folder and all UIDs of the messages there. */
- folder = e_mail_session_get_local_folder (
- session, E_MAIL_LOCAL_FOLDER_TEMPLATES);
-
info = camel_message_info_new (NULL);
/* The last argument is a bit mask which tells the function
@@ -1200,9 +1194,11 @@ got_message_draft_cb (EMsgComposer *composer,
camel_message_info_set_flags (
info, CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DRAFT, ~0);
- /* FIXME No async callback, so... hope for the best? */
- e_mail_folder_append_message (
- folder, message, info, G_PRIORITY_DEFAULT,
+ /* FIXME Should submit an EActivity for this
+ * operation, same as saving to Outbox. */
+ e_mail_session_append_to_local_folder (
+ session, E_MAIL_LOCAL_FOLDER_TEMPLATES,
+ message, info, G_PRIORITY_DEFAULT,
NULL, (GAsyncReadyCallback) NULL, NULL);
g_object_unref (message);