diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 0bb82c843c..a7388a81e2 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -834,8 +834,7 @@ mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path) int i; uids = camel_folder_get_uids (ml->folder); - for (i = 0; i < uids->len; i++) - { + for (i = 0; i < uids->len; i++) { camel_folder_set_message_flags (ml->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN); @@ -843,6 +842,38 @@ mark_all_seen (BonoboUIHandler *uih, void *user_data, const char *path) } static void +real_edit_msg (MessageList *ml, const char *uid, gpointer user_data) +{ + CamelException *ex = user_data; + CamelMimeMessage *msg; + GtkWidget *composer; + + if (camel_exception_is_set (ex)) + return; + + msg = camel_folder_get_message (ml->folder, uid, ex); + + composer = e_msg_composer_new_with_message (msg); + gtk_widget_show (composer); +} + +void +edit_message (BonoboUIHandler *uih, void *user_data, const char *path) +{ + FolderBrowser *fb = FOLDER_BROWSER (user_data); + MessageList *ml = fb->message_list; + CamelException ex; + + camel_exception_init (&ex); + message_list_foreach (ml, real_edit_msg, &ex); + if (camel_exception_is_set (&ex)) { + mail_exception_dialog ("Could not open message for editing", &ex, fb); + camel_exception_clear (&ex); + return; + } +} + +static void real_delete_msg (MessageList *ml, const char *uid, gpointer user_data) { CamelException *ex = user_data; |