From f58d287adc218779c572e83a11f705a1a3d30642 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 15 Jul 2002 20:44:25 +0000 Subject: added save_html_object_data parameter, use gtkhtml command to save object 2002-07-15 Radek Doulik * e-msg-composer.c (build_message): added save_html_object_data parameter, use gtkhtml command to save object data when wanted svn path=/trunk/; revision=17466 --- composer/ChangeLog | 5 +++++ composer/e-msg-composer.c | 20 +++++++++++++++----- composer/e-msg-composer.h | 3 ++- 3 files changed, 22 insertions(+), 6 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 8991bf8137..28e5b175a0 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2002-07-15 Radek Doulik + + * e-msg-composer.c (build_message): added save_html_object_data + parameter, use gtkhtml command to save object data when wanted + 2002-07-08 Peter Williams * Makefile.am (INCLUDES): Fix cflags for ebook header namespacing. diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index bb93d5e60a..769d8afbbd 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -320,7 +320,7 @@ add_inlined_images (EMsgComposer *composer, CamelMultipart *multipart) * composed in `composer'. */ static CamelMimeMessage * -build_message (EMsgComposer *composer) +build_message (EMsgComposer *composer, gboolean save_html_object_data) { EMsgComposerAttachmentBar *attachment_bar = E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar); @@ -389,9 +389,19 @@ build_message (EMsgComposer *composer) header_content_type_unref (type); if (composer->send_html) { + CORBA_Environment ev; clear_current_images (composer); - + + if (save_html_object_data) { + CORBA_exception_init (&ev); + GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "save-data-on", &ev); + } data = get_text (composer->persist_stream_interface, "text/html"); + if (save_html_object_data) { + GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "save-data-off", &ev); + CORBA_exception_free (&ev); + } + if (!data) { /* The component has probably died */ camel_object_unref (CAMEL_OBJECT (new)); @@ -3772,11 +3782,11 @@ e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer, * Return value: A pointer to the new CamelMimeMessage object **/ CamelMimeMessage * -e_msg_composer_get_message (EMsgComposer *composer) +e_msg_composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) { g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL); - return build_message (composer); + return build_message (composer, save_html_object_data); } CamelMimeMessage * @@ -3802,7 +3812,7 @@ e_msg_composer_get_message_draft (EMsgComposer *composer) old_smime_encrypt = composer->smime_encrypt; composer->smime_encrypt = FALSE; - msg = e_msg_composer_get_message (composer); + msg = e_msg_composer_get_message (composer, TRUE); composer->send_html = old_send_html; composer->pgp_sign = old_pgp_sign; diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 9b005f8307..eef14da595 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -141,7 +141,8 @@ CamelMimePart *e_msg_composer_add_inline_image_from_file (EMsgCo const char *filename); void e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer, CamelMimePart *part); -CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer); +CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer, + gboolean save_html_object_data); CamelMimeMessage *e_msg_composer_get_message_draft (EMsgComposer *composer); void e_msg_composer_show_sig_file (EMsgComposer *composer); gboolean e_msg_composer_get_send_html (EMsgComposer *composer); -- cgit