aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-05-09 03:06:24 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-05-09 03:06:24 +0800
commit1a0cddf01be352b29b576214f17ceb5d9ef20c21 (patch)
tree018768e25cc8850ba02fcada8e7d39c28251b09d /mail
parent15ec84558afc27acd6b43c1d5911a92cc710e265 (diff)
downloadgsoc2013-evolution-1a0cddf01be352b29b576214f17ceb5d9ef20c21.tar.gz
gsoc2013-evolution-1a0cddf01be352b29b576214f17ceb5d9ef20c21.tar.zst
gsoc2013-evolution-1a0cddf01be352b29b576214f17ceb5d9ef20c21.zip
Free the UIDs if the user decides to not go through with editing all the
2001-05-08 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (edit_msg_internal): Free the UIDs if the user decides to not go through with editing all the messages he selected. (resend_msg): If the user attempts to resend more than 10 messages, make sure he really means it. (do_resend_messages): Richard Zach feels that "Resend" should open the message(s) in a composer since he might want to edit at least the recipients (maybe he needs to resend because the message bounced the first time) and Ettore wants pretty much the same thing. This makes "Resend" basically the same as "Edit" but for previously sent messages, whereas "Edit" is only for Drafts. svn path=/trunk/; revision=9717
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/mail-callbacks.c31
2 files changed, 40 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 6d8c70eed5..c742349f96 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,17 @@
+2001-05-08 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-callbacks.c (edit_msg_internal): Free the UIDs if the user
+ decides to not go through with editing all the messages he
+ selected.
+ (resend_msg): If the user attempts to resend more than 10
+ messages, make sure he really means it.
+ (do_resend_messages): Richard Zach feels that "Resend" should open
+ the message(s) in a composer since he might want to edit at least
+ the recipients (maybe he needs to resend because the message
+ bounced the first time) and Ettore wants pretty much the same
+ thing. This makes "Resend" basically the same as "Edit" but for
+ previously sent messages, whereas "Edit" is only for Drafts.
+
2001-05-08 Gediminas Paulauskas <menesis@delfi.lt>
* mail-search.c: convert search entry to utf8.
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 8f42ebdbe8..98c8350903 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1153,8 +1153,16 @@ edit_msg_internal (FolderBrowser *fb)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- if (uids->len > 10 && !are_you_sure (_("Are you sure you want to edit all %d messages?"), uids, fb))
+ if (uids->len > 10 && !are_you_sure (_("Are you sure you want to edit all %d messages?"), uids, fb)) {
+ int i;
+
+ for (i = 0; i < uids->len; i++)
+ g_free (uids->pdata[i]);
+
+ g_ptr_array_free (uids, TRUE);
+
return;
+ }
mail_get_messages (fb->folder, uids, do_edit_messages, fb);
}
@@ -1179,13 +1187,15 @@ edit_msg (GtkWidget *widget, gpointer user_data)
static void
do_resend_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void *data)
{
- const MailConfigAccount *account;
int i;
- account = mail_config_get_default_account ();
+ for (i = 0; i < messages->len; i++) {
+ /* generate a new Message-Id because they need to be unique */
+ camel_mime_message_set_message_id (messages->pdata[i], NULL);
+ }
- for (i = 0; i < messages->len; i++)
- mail_send_mail (account->transport->url, messages->pdata[i], NULL, NULL);
+ /* "Resend" should open up the composer to let the user edit the message */
+ do_edit_messages (folder, uids, messages, data);
}
@@ -1211,6 +1221,17 @@ resend_msg (GtkWidget *widget, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
+ if (uids->len > 10 && !are_you_sure (_("Are you sure you want to resend all %d messages?"), uids, fb)) {
+ int i;
+
+ for (i = 0; i < uids->len; i++)
+ g_free (uids->pdata[i]);
+
+ g_ptr_array_free (uids, TRUE);
+
+ return;
+ }
+
mail_get_messages (fb->folder, uids, do_resend_messages, fb);
}