aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-09-18 05:17:11 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-09-18 05:17:11 +0800
commita36a1bb70b6ebcb51ac39304370c89bda63e11b9 (patch)
tree3fe9416a1c93915d912c74d3771d3a7ce3c0696d
parent24baa21ccffe91c4cf00bdd7064eaad605217f13 (diff)
downloadgsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar.gz
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar.bz2
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar.lz
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar.xz
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.tar.zst
gsoc2013-evolution-a36a1bb70b6ebcb51ac39304370c89bda63e11b9.zip
** Merge in mail-refactor-2-branch
2003-09-17 Not Zed <NotZed@Ximian.com> ** Merge in mail-refactor-2-branch svn path=/trunk/; revision=22601
-rw-r--r--composer/ChangeLog19
-rw-r--r--composer/e-msg-composer.c48
-rw-r--r--composer/listener.c2
3 files changed, 31 insertions, 38 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 785024898a..a3531effbb 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,7 @@
+2003-09-17 Not Zed <NotZed@Ximian.com>
+
+ ** Merge in mail-refactor-2-branch
+
2003-09-15 Ettore Perazzoli <ettore@ximian.com>
* e-msg-composer-hdrs.c (header_new_recipient): Make the entry
@@ -21,6 +25,21 @@
evolution-composer-entries.xml here for the non-control entries' UI.
(composer_entry_focus_out_event_cb): Remove the menu items.
+2003-09-10 Not Zed <NotZed@Ximian.com>
+
+ * listener.c (impl_event): We want to use decode to stream for
+ attachment parts.
+
+2003-09-08 Not Zed <NotZed@Ximian.com>
+
+ * e-msg-composer.c (autosave_load_draft): ugh, direct linking to
+ evolution-mail suckage. Should these callbacks just be handled
+ internally?
+ (handle_multipart_encrypted, handle_multipart_signed)
+ (handle_multipart_alternative, handle_multipart)
+ (e_msg_composer_new_with_message): Use new em_utils stuff for
+ message formatting.
+
2003-08-22 Antonio Xu <antonio.xu@sun.com>
* e-msg-composer-attachment.c (): Connect response signal to
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 8d2698c5eb..18d8eb4a1f 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -85,9 +85,8 @@
#include <camel/camel-stream-filter.h>
#include <camel/camel-mime-filter-charset.h>
-#include "mail/mail-callbacks.h"
+#include "mail/em-utils.h"
#include "mail/mail-crypto.h"
-#include "mail/mail-format.h"
#include "mail/mail-tools.h"
#include "mail/mail-ops.h"
#include "mail/mail-mt.h"
@@ -1352,10 +1351,10 @@ autosave_load_draft (const char *filename)
autosave_save_draft (composer);
g_signal_connect (GTK_OBJECT (composer), "send",
- G_CALLBACK (composer_send_cb), NULL);
+ G_CALLBACK (em_utils_composer_send_cb), NULL);
g_signal_connect (GTK_OBJECT (composer), "save-draft",
- G_CALLBACK (composer_save_draft_cb), NULL);
+ G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
gtk_widget_show (GTK_WIDGET (composer));
}
@@ -2407,7 +2406,7 @@ static void
composer_finalise (GObject *object)
{
EMsgComposer *composer;
-
+
composer = E_MSG_COMPOSER (object);
if (composer->extra_hdr_names) {
@@ -2454,7 +2453,7 @@ destroy (GtkObject *object)
{
EMsgComposer *composer;
CORBA_Environment ev;
-
+
composer = E_MSG_COMPOSER (object);
CORBA_exception_init (&ev);
@@ -3342,10 +3341,7 @@ handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int
handle_multipart (composer, multipart, depth);
}
} else if (header_content_type_is (content_type, "text", "*")) {
- char *text;
-
- if ((text = mail_get_message_body (content, FALSE, FALSE)))
- e_msg_composer_set_pending_body (composer, text);
+ e_msg_composer_set_pending_body(composer, em_utils_part_to_html(mime_part));
} else {
e_msg_composer_attach (composer, mime_part);
}
@@ -3399,10 +3395,7 @@ handle_multipart_encrypted (EMsgComposer *composer, CamelMultipart *multipart, i
handle_multipart (composer, multipart, depth);
}
} else if (header_content_type_is (content_type, "text", "*")) {
- char *text;
-
- if ((text = mail_get_message_body (content, FALSE, FALSE)))
- e_msg_composer_set_pending_body (composer, text);
+ e_msg_composer_set_pending_body(composer, em_utils_part_to_html(mime_part));
} else {
e_msg_composer_attach (composer, mime_part);
}
@@ -3457,14 +3450,8 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
}
}
- if (text_part) {
- CamelDataWrapper *contents;
- char *text;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (text_part));
- if ((text = mail_get_message_body (contents, FALSE, FALSE)))
- e_msg_composer_set_pending_body (composer, text);
- }
+ if (text_part)
+ e_msg_composer_set_pending_body(composer, em_utils_part_to_html(text_part));
}
static void
@@ -3502,12 +3489,7 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
}
} else if (depth == 0 && i == 0) {
/* Since the first part is not multipart/alternative, then this must be the body */
- char *text;
-
- text = mail_get_message_body (content, FALSE, FALSE);
-
- if (text)
- e_msg_composer_set_pending_body (composer, text);
+ e_msg_composer_set_pending_body(composer, em_utils_part_to_html(mime_part));
} else if (camel_mime_part_get_content_id (mime_part) ||
camel_mime_part_get_content_location (mime_part)) {
/* special in-line attachment */
@@ -3775,15 +3757,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
handle_multipart (new, multipart, 0);
}
} else {
- /* We either have a text/plain or a text/html part */
- CamelDataWrapper *contents;
- char *text;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (message));
- text = mail_get_message_body (contents, FALSE, FALSE);
-
- if (text)
- e_msg_composer_set_pending_body (new, text);
+ e_msg_composer_set_pending_body(new, em_utils_part_to_html((CamelMimePart *)message));
}
/* We wait until now to set the body text because we need to ensure that
diff --git a/composer/listener.c b/composer/listener.c
index a026769d01..0d0dc2f652 100644
--- a/composer/listener.c
+++ b/composer/listener.c
@@ -235,7 +235,7 @@ impl_event (PortableServer_Servant _servant,
ba = g_byte_array_new ();
cstream = camel_stream_mem_new_with_byte_array (ba);
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
- camel_data_wrapper_write_to_stream (wrapper, cstream);
+ camel_data_wrapper_decode_to_stream (wrapper, cstream);
bonobo_stream_client_write (e->stream, ba->data, ba->len, ev);