aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-05-15 02:07:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-15 02:07:30 +0800
commit1ce8c3b6b93193bb6559ba62291c4ec384312d5b (patch)
tree30f4f80f5866040987eb7a391ed6be62b2110ad3 /mail/em-composer-utils.c
parent6f58e91a1c07f49aec286eb0bc80d06622b174b0 (diff)
downloadgsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.gz
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.zst
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.zip
Updated the #if 0'd code for the API chanegs made to
2004-05-14 Jeffrey Stedfast <fejj@novell.com> * em-popup.c (emp_popup_resend): Updated the #if 0'd code for the API chanegs made to em_utils_edit_messages(). * em-folder-view.c (em_folder_view_open_selected): Pass TRUE as the replace argument to em_utils_edit_messages() here. (emfv_popup_resend): Pass FALSE here. Fixes bug #58357. * em-composer-utils.c (em_utils_edit_messages): Now takes a 'replace' argument specifying whether or not the original message should be deleted when the edited message is sent or saved. svn path=/trunk/; revision=25907
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 9b35dcb8ea..3e73e682bf 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -787,6 +787,7 @@ em_utils_edit_message (CamelMimeMessage *message)
static void
edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user_data)
{
+ gboolean replace = GPOINTER_TO_INT (user_data);
int i;
if (msgs == NULL)
@@ -795,7 +796,10 @@ edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user
for (i = 0; i < msgs->len; i++) {
camel_medium_remove_header (CAMEL_MEDIUM (msgs->pdata[i]), "X-Mailer");
- edit_message (msgs->pdata[i], folder, uids->pdata[i]);
+ if (replace)
+ edit_message (msgs->pdata[i], folder, uids->pdata[i]);
+ else
+ edit_message (msgs->pdata[i], NULL, NULL);
}
}
@@ -803,16 +807,17 @@ edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user
* em_utils_edit_messages:
* @folder: folder containing messages to edit
* @uids: uids of messages to edit
+ * @replace: replace the existing message(s) when sent or saved.
*
* Opens a composer for each message to be edited.
**/
void
-em_utils_edit_messages (CamelFolder *folder, GPtrArray *uids)
+em_utils_edit_messages (CamelFolder *folder, GPtrArray *uids, gboolean replace)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
- mail_get_messages (folder, uids, edit_messages, NULL);
+ mail_get_messages (folder, uids, edit_messages, GINT_TO_POINTER (replace));
}
/* Forwarding messages... */