aboutsummaryrefslogtreecommitdiffstats
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
parent6f58e91a1c07f49aec286eb0bc80d06622b174b0 (diff)
downloadgsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.gz
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.bz2
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.lz
gsoc2013-evolution-1ce8c3b6b93193bb6559ba62291c4ec384312d5b.tar.xz
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
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-composer-utils.c11
-rw-r--r--mail/em-composer-utils.h2
-rw-r--r--mail/em-folder-view.c4
-rw-r--r--mail/em-popup.c2
5 files changed, 23 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2d403adf7a..378a841a89 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,16 @@
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.
+
* em-format-html.c (efh_format_secure): Same. Also changed the
"Valid signature, cannot verify sender" string to "Valid signature
but cannot verify sender" as I think it reads nicer.
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... */
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 7498b0b43b..df92a3f0c2 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -50,7 +50,7 @@ void em_utils_post_to_folder (struct _CamelFolder *folder);
void em_utils_post_to_url (const char *url);
void em_utils_edit_message (struct _CamelMimeMessage *message);
-void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids);
+void em_utils_edit_messages (struct _CamelFolder *folder, GPtrArray *uids, gboolean replace);
void em_utils_forward_attached (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
void em_utils_forward_inline (struct _CamelFolder *folder, GPtrArray *uids, const char *fromuri);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 40af48d870..2779e7b73c 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -359,7 +359,7 @@ em_folder_view_open_selected(EMFolderView *emfv)
if (em_utils_folder_is_drafts(emfv->folder, emfv->folder_uri)
|| em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri)) {
- em_utils_edit_messages (emfv->folder, uids);
+ em_utils_edit_messages (emfv->folder, uids, TRUE);
} else {
/* TODO: have an em_utils_open_messages call? */
@@ -606,7 +606,7 @@ emfv_popup_resend(GtkWidget *w, EMFolderView *emfv)
return;
uids = message_list_get_selected(emfv->list);
- em_utils_edit_messages (emfv->folder, uids);
+ em_utils_edit_messages (emfv->folder, uids, FALSE);
}
static void
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 57c4264a82..6b08aa71fe 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -675,7 +675,7 @@ emp_popup_resend(GtkWidget *w, EMPopupTarget *t)
if (!em_utils_check_user_can_send_mail(t->widget))
return;
- em_utils_edit_messages(t->widget, t->data.select.folder, em_utils_uids_copy(t->data.select.uids));
+ em_utils_edit_messages(t->widget, t->data.select.folder, em_utils_uids_copy(t->data.select.uids), FALSE);
}
static void