aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-to-task
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-02 00:43:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-02 04:01:14 +0800
commit5e938b590f66a44ed69e0867efe5158b634a7f57 (patch)
treeac3881b20ef9bcff5e93cf478e8d8abf9875dc0a /plugins/mail-to-task
parent76fbb9d23242cba427d71ded5590a9cad271b2b3 (diff)
downloadgsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.gz
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.bz2
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.lz
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.xz
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.zst
gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.zip
Expand the EMailReader interface so it's easier to use.
Adds the following methods: CamelFolder * (*get_folder) (EMailReader *reader); const gchar * (*get_folder_uri) (EMailReader *reader); GPtrArray * (*get_selected_uids) (EMailReader *reader);
Diffstat (limited to 'plugins/mail-to-task')
-rw-r--r--plugins/mail-to-task/mail-to-task.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 6b79b78e94..fc62561a5e 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -926,18 +926,16 @@ mail_to_event (ECalSourceType source_type,
gboolean with_attendees,
EMailReader *reader)
{
- GtkWidget *message_list;
CamelFolder *folder;
- GPtrArray *selected;
+ GPtrArray *uids;
ESourceList *source_list = NULL;
gboolean done = FALSE;
GSList *groups, *p;
ESource *source = NULL;
GError *error = NULL;
- message_list = e_mail_reader_get_message_list (reader);
- selected = message_list_get_selected (MESSAGE_LIST (message_list));
- folder = MESSAGE_LIST (message_list)->folder;
+ folder = e_mail_reader_get_folder (reader);
+ uids = e_mail_reader_get_selected_uids (reader);
if (!e_cal_get_sources (&source_list, source_type, &error)) {
e_notice (NULL, GTK_MESSAGE_ERROR, _("Cannot get source list. %s"), error ? error->message : _("Unknown error."));
@@ -1005,10 +1003,10 @@ mail_to_event (ECalSourceType source_type,
data = g_new0 (AsyncData, 1);
data->client = client;
data->folder = folder;
- data->uids = selected;
+ data->uids = uids;
data->with_attendees = with_attendees;
- if (selected->len == 1)
+ if (uids->len == 1)
data->selected_text = get_selected_text (reader);
else
data->selected_text = NULL;