diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-12-02 00:43:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-12-02 04:01:14 +0800 |
commit | 5e938b590f66a44ed69e0867efe5158b634a7f57 (patch) | |
tree | ac3881b20ef9bcff5e93cf478e8d8abf9875dc0a /plugins/groupwise-features/status-track.c | |
parent | 76fbb9d23242cba427d71ded5590a9cad271b2b3 (diff) | |
download | gsoc2013-evolution-5e938b590f66a44ed69e0867efe5158b634a7f57.tar.gz 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/groupwise-features/status-track.c')
-rw-r--r-- | plugins/groupwise-features/status-track.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c index 018e69261a..622fc3b6cd 100644 --- a/plugins/groupwise-features/status-track.c +++ b/plugins/groupwise-features/status-track.c @@ -65,24 +65,21 @@ get_selected_message (EShellView *shell_view, CamelFolder **folder, gchar **sele CamelMimeMessage *msg = NULL; EShellContent *shell_content; EMailReader *reader; - GtkWidget *message_list; - GPtrArray *selected; + GPtrArray *uids; shell_content = e_shell_view_get_shell_content (shell_view); - reader = (EMailReader *) (shell_content); - message_list = e_mail_reader_get_message_list (reader); - g_return_val_if_fail (message_list != NULL, NULL); + reader = E_MAIL_READER (shell_content); + uids = e_mail_reader_get_selected_uids (reader); - selected = message_list_get_selected (MESSAGE_LIST (message_list)); - if (selected && selected->len == 1) { - *folder = MESSAGE_LIST (message_list)->folder; - *selected_uid = g_strdup (g_ptr_array_index (selected, 0)); + if (uids && uids->len == 1) { + *folder = e_mail_reader_get_folder (reader); + *selected_uid = g_strdup (g_ptr_array_index (uids, 0)); msg = camel_folder_get_message (*folder, *selected_uid, NULL); } - em_utils_uids_free (selected); + em_utils_uids_free (uids); return msg; } |