From 70e176f79dde254653ccdbd1ffad99e7d0b2abe1 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Mon, 26 Aug 2002 18:34:12 +0000 Subject: Oops, we were overwriting 'multipart' with our child multipart. Fixes 2002-08-26 Peter Williams * e-msg-composer.c (handle_multipart): Oops, we were overwriting 'multipart' with our child multipart. Fixes 29399. (handle_multipart_alternative): Here too. svn path=/trunk/; revision=17864 --- composer/ChangeLog | 6 ++++++ composer/e-msg-composer.c | 26 +++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 79e4f81f18..b9564cfd23 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2002-08-26 Peter Williams + + * e-msg-composer.c (handle_multipart): Oops, we were overwriting + 'multipart' with our child multipart. Fixes 29399. + (handle_multipart_alternative): Here too. + 2002-08-22 Jeffrey Stedfast Fixes bug #29016 diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index e04fddafa2..4c6e186c95 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2041,7 +2041,7 @@ setup_ui (EMsgComposer *composer) container = bonobo_ui_container_new (); bonobo_ui_container_set_win (container, BONOBO_WINDOW (composer)); - + composer->uic = bonobo_ui_component_new_default (); bonobo_ui_component_set_container (composer->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container))); @@ -3232,17 +3232,19 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart, content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); if (CAMEL_IS_MULTIPART (content)) { - multipart = CAMEL_MULTIPART (content); + CamelMultipart *child_mp; + + child_mp = CAMEL_MULTIPART (content); if (CAMEL_IS_MULTIPART_SIGNED (content)) { /* handle the signed content and configure the composer to sign outgoing messages */ - handle_multipart_signed (composer, multipart, depth + 1); + handle_multipart_signed (composer, child_mp, depth + 1); } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ - handle_multipart_encrypted (composer, multipart, depth + 1); + handle_multipart_encrypted (composer, child_mp, depth + 1); } else { /* depth doesn't matter so long as we don't pass 0 */ - handle_multipart (composer, multipart, depth + 1); + handle_multipart (composer, child_mp, depth + 1); } } else if (header_content_type_is (content_type, "text", "html")) { /* text/html is preferable, so once we find it we're done... */ @@ -3281,25 +3283,27 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth) CamelContentType *content_type; CamelDataWrapper *content; CamelMimePart *mime_part; - + mime_part = camel_multipart_get_part (multipart, i); content_type = camel_mime_part_get_content_type (mime_part); content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); if (CAMEL_IS_MULTIPART (content)) { - multipart = CAMEL_MULTIPART (content); + CamelMultipart *child_mp; + + child_mp = CAMEL_MULTIPART (content); if (CAMEL_IS_MULTIPART_SIGNED (content)) { /* handle the signed content and configure the composer to sign outgoing messages */ - handle_multipart_signed (composer, multipart, depth + 1); + handle_multipart_signed (composer, child_mp, depth + 1); } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ - handle_multipart_encrypted (composer, multipart, depth + 1); + handle_multipart_encrypted (composer, child_mp, depth + 1); } else if (header_content_type_is (content_type, "multipart", "alternative")) { - handle_multipart_alternative (composer, multipart, depth + 1); + handle_multipart_alternative (composer, child_mp, depth + 1); } else { /* depth doesn't matter so long as we don't pass 0 */ - handle_multipart (composer, multipart, depth + 1); + handle_multipart (composer, child_mp, depth + 1); } } else if (depth == 0 && i == 0) { /* Since the first part is not multipart/alternative, then this must be the body */ -- cgit v1.2.3