diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-08-07 14:55:53 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-08-07 14:55:53 +0800 |
commit | 9739fb5219a67aab4e7e7f2b84ec3795ef042f09 (patch) | |
tree | 060d7bfd52379c64f9418a65e1d2c2538bdfdbbb /mail/mail-ops.c | |
parent | c6c1164cca58c30c9bec04ca1c01856ed04a1366 (diff) | |
download | gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar.gz gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar.bz2 gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar.lz gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar.xz gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.tar.zst gsoc2013-evolution-9739fb5219a67aab4e7e7f2b84ec3795ef042f09.zip |
New menu item under Actions to allow editing of messages.
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* folder-browser-factory.c (control_activate): New menu item under
Actions to allow editing of messages.
* mail-ops.c (edit_message): New function for editing messages.
svn path=/trunk/; revision=4563
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; |