diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-08-12 01:59:54 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-08-12 01:59:54 +0800 |
commit | 15aaf53b7dc1a328f28d402f74186b993ac39eec (patch) | |
tree | 7eacfacc2271c8178c8ee824e74cab255fd3ace0 /composer/e-msg-composer.c | |
parent | b328a21e7c026aaa9cdd5e332ed7e39e0003d8eb (diff) | |
download | gsoc2013-evolution-15aaf53b7dc1a328f28d402f74186b993ac39eec.tar.gz gsoc2013-evolution-15aaf53b7dc1a328f28d402f74186b993ac39eec.tar.zst gsoc2013-evolution-15aaf53b7dc1a328f28d402f74186b993ac39eec.zip |
don't set the rawtext bit anymore.
2003-07-16 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (attach_to_multipart): don't set
the rawtext bit anymore.
* e-msg-composer.c (build_message): Convert the plain part's
content stream from UTF-8 to whatever charset we want.
svn path=/trunk/; revision=22172
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index ce29cf35f1..a7021fcba5 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -406,10 +406,22 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) stream = camel_stream_mem_new_with_byte_array (data); + /* convert the stream to the appropriate charset */ + if (charset && strcasecmp (charset, "UTF-8") != 0) { + CamelStreamFilter *filter_stream; + CamelMimeFilterCharset *filter; + + filter_stream = camel_stream_filter_new_with_stream (stream); + camel_object_unref (stream); + + stream = (CamelStream *) filter_stream; + filter = camel_mime_filter_charset_new_convert ("UTF-8", charset); + camel_stream_filter_add (filter_stream, (CamelMimeFilter *) filter); + camel_object_unref (filter); + } + /* construct the content object */ plain = camel_data_wrapper_new (); - plain->rawtext = FALSE; - camel_data_wrapper_construct_from_stream (plain, stream); camel_object_unref (stream); @@ -438,7 +450,6 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) } html = camel_data_wrapper_new (); - html->rawtext = FALSE; stream = camel_stream_mem_new_with_byte_array (data); camel_data_wrapper_construct_from_stream (html, stream); @@ -1398,14 +1409,14 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent) if (match != NULL) { GtkWidget *dialog; - dialog = gtk_message_dialog_new(parent, - GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - _("Ximian Evolution has found unsaved files from a previous session.\n" - "Would you like to try to recover them?")); + dialog = gtk_message_dialog_new (parent, + GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, + _("Ximian Evolution has found unsaved files from a previous session.\n" + "Would you like to try to recover them?")); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); - load = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES; - gtk_widget_destroy(dialog); + load = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES; + gtk_widget_destroy (dialog); } while (match != NULL) { |