drop pgp-signature when reediting queued signed messages
authorColin Leroy <colin@colino.net>
Mon, 23 Sep 2002 21:28:42 +0000 (21:28 +0000)
committerColin Leroy <colin@colino.net>
Mon, 23 Sep 2002 21:28:42 +0000 (21:28 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 748241f..52d3295 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-23 [colin]     0.83claws15
+
+       * src/compose.c
+               Drop pgp-signature when reediting a signed queued
+               message
+
 2002-09-23 [melvin]    0.8.3claws14
 
        * po/fr.po
index 94b6eed..caf6fe9 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws12
+EXTRA_VERSION=claws15
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b50e1f2..201f04a 100644 (file)
@@ -2043,6 +2043,7 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo)
                procmime_mimeinfo_free_all(mimeinfo);
                return;
        }
+
        if (IS_FIRST_PART_TEXT(child))
                child = child->next;
 
@@ -2053,11 +2054,17 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo)
                        child = procmime_mimeinfo_next(child);
                        continue;
                }
-
+               if(child->parent && child->parent->parent
+               && !strcasecmp(child->parent->parent->content_type, "multipart/signed")
+               && child->mime_type == MIME_TEXT) {
+                       /* this is the main text part of a signed message */
+                       child = procmime_mimeinfo_next(child);
+                       continue;
+               }
                outfile = procmime_get_tmp_file_name(child);
                if (procmime_get_part(outfile, infile, child) < 0)
                        g_warning(_("Can't get the part of multipart message."));
-               else
+               else if (compose->mode != COMPOSE_REEDIT || strcmp(child->content_type, "application/pgp-signature"))
                        compose_attach_append
                                (compose, outfile,
                                 child->filename ? child->filename : child->name,