2007-01-12 [paul] 2.7.0cvs14
authorPaul Mangan <paul@claws-mail.org>
Fri, 12 Jan 2007 11:58:57 +0000 (11:58 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 12 Jan 2007 11:58:57 +0000 (11:58 +0000)
* src/mimeview.c
check if the mail's signed as
it can change the mail structure
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c

index b617db710aea7c9a1381e3a6aaafbbd10788e9a6..080223af0d7b18dd0529be77b71f5974b15e2afd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-12 [paul]      2.7.0cvs14
+
+       * src/mimeview.c
+               check if the mail's signed as
+               it can change the mail structure
+               Thanks to Colin
+
 2007-01-12 [paul]      2.7.0cvs13
 
        * src/procmime.c
index 5df054d57228e4a550b08e8f31474765775899c1..04b38f1a7b16fd4b455c5a06f6e2cf14dbb9a499 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.105.2.77 -r 1.105.2.78 src/prefs_account.c;  ) > 2.7.0cvs11.patchset
 ( cvs diff -u -r 1.654.2.2292 -r 1.654.2.2293 configure.ac;  ) > 2.7.0cvs12.patchset
 ( cvs diff -u -r 1.49.2.85 -r 1.49.2.86 src/procmime.c;  ) > 2.7.0cvs13.patchset
+( cvs diff -u -r 1.83.2.97 -r 1.83.2.98 src/mimeview.c;  ) > 2.7.0cvs14.patchset
index ebc51831a37b6f9c0843384baba18cd4df12c74b..3332b1b395bda70747425f414575ebdf8631537a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 31c1b88e4908b54063c1d6dde4999bd52edb241f..d0c4cadb07dae822c140343db4d4c918b39f2e7f 100644 (file)
@@ -339,6 +339,17 @@ void mimeview_init(MimeView *mimeview)
                GTK_WIDGET_PTR(mimeview->textview));
 }
 
+static gboolean any_part_is_signed(MimeInfo *mimeinfo)
+{
+       while (mimeinfo) {
+               if (privacy_mimeinfo_is_signed(mimeinfo))
+                       return TRUE;
+               mimeinfo = procmime_mimeinfo_next(mimeinfo);
+       }
+
+       return FALSE;
+}
+
 void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
                           const gchar *file)
 {
@@ -357,6 +368,13 @@ void mimeview_show_message(MimeView *mimeview, MimeInfo *mimeinfo,
        g_signal_handlers_block_by_func(G_OBJECT(ctree), mimeview_selected,
                                        mimeview);
 
+       /* check if the mail's signed - it can change the mail structure */
+       
+       if (any_part_is_signed(mimeinfo))
+               debug_print("signed mail\n");
+
+       mimeview_set_multipart_tree(mimeview, mimeinfo, NULL);
+       icon_list_clear(mimeview);
        icon_list_create(mimeview, mimeinfo);
 
        g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
@@ -2088,7 +2106,7 @@ static void icon_list_clear (MimeView *mimeview)
 {
        GList     *child;
        GtkAdjustment *adj;
-       
+               
        child = gtk_container_children(GTK_CONTAINER(mimeview->icon_vbox));
        for (; child != NULL; child = g_list_next(child)) {
                gtkut_container_remove(GTK_CONTAINER(mimeview->icon_vbox), 
@@ -2172,8 +2190,6 @@ static void icon_list_create(MimeView *mimeview, MimeInfo *mimeinfo)
 {
        GtkRequisition size;
 
-       mimeview_set_multipart_tree(mimeview, mimeinfo, NULL);
-
        g_return_if_fail(mimeinfo != NULL);
 
        while (mimeinfo != NULL) {