aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-26 17:24:49 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:57 +0800
commitb8a55643a382956df48d897cc6480ed7a28e3c62 (patch)
treeb9d0d4417bebd1e502a007f44757cddbc5c83682 /plugins
parent126772ab2b4b64fbe608ac3505ce924ed2b692b9 (diff)
downloadgsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar.gz
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar.bz2
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar.lz
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar.xz
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.tar.zst
gsoc2013-evolution-b8a55643a382956df48d897cc6480ed7a28e3c62.zip
Bug #655551 - [mail-to-task] Pick organizer based on selected folder's store
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mail-to-task/mail-to-task.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 56da9efa7e..ddcd1328d1 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -308,14 +308,21 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
}
static gchar *
-set_organizer (ECalComponent *comp)
+set_organizer (ECalComponent *comp, CamelFolder *folder)
{
- EAccount *account;
+ EAccount *account = NULL;
const gchar *str, *name;
ECalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
gchar *res;
- account = e_get_default_account ();
+ if (folder) {
+ CamelStore *store = camel_folder_get_parent_store (folder);
+
+ account = e_get_account_by_uid (camel_service_get_uid (CAMEL_SERVICE (store)));
+ }
+
+ if (!account)
+ account = e_get_default_account ();
if (!account)
return NULL;
@@ -894,7 +901,7 @@ do_mail_to_event (AsyncData *data)
gchar *organizer;
/* set actual user as organizer, to be able to change event's properties */
- organizer = set_organizer (comp);
+ organizer = set_organizer (comp, data->folder);
set_attendees (comp, message, organizer);
g_free (organizer);
}