aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2002-07-16 04:44:25 +0800
committerRadek Doulik <rodo@src.gnome.org>2002-07-16 04:44:25 +0800
commitf58d287adc218779c572e83a11f705a1a3d30642 (patch)
tree81948c7c31c3b86dd2892b08f8046d1b76851b69
parente538df8df12dc91d0f1974f91c537da291085c1e (diff)
downloadgsoc2013-evolution-f58d287adc218779c572e83a11f705a1a3d30642.tar.gz
gsoc2013-evolution-f58d287adc218779c572e83a11f705a1a3d30642.tar.zst
gsoc2013-evolution-f58d287adc218779c572e83a11f705a1a3d30642.zip
added save_html_object_data parameter, use gtkhtml command to save object
2002-07-15 Radek Doulik <rodo@ximian.com> * 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
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c20
-rw-r--r--composer/e-msg-composer.h3
3 files changed, 22 insertions, 6 deletions
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 <rodo@ximian.com>
+
+ * 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 <peterw@ximian.com>
* 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);