2005-05-24 [colin] 1.9.11cvs8
authorColin Leroy <colin@colino.net>
Tue, 24 May 2005 16:26:43 +0000 (16:26 +0000)
committerColin Leroy <colin@colino.net>
Tue, 24 May 2005 16:26:43 +0000 (16:26 +0000)
* src/summaryview.c
Fix bug #688 f) read/unread marker not
changed on first click
Also, optimize summary_status_show()
calls
* src/folder.c
* src/inc.c
* src/procmime.c
Fix bug #688 b) and c) wrt message
attachments and signature
* src/stock_pixmap.c
* src/stock_pixmap.h
* src/stock_pixmap.c
* src/stock_pixmap.h
* src/Makefile.am
* src/pixmaps/clip_gpg_signed.xpm
Add clip/signed icon

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/Makefile.am
src/folder.c
src/inc.c
src/pixmaps/clip_gpg_signed.xpm [new file with mode: 0644]
src/procmime.c
src/stock_pixmap.c
src/stock_pixmap.h
src/summaryview.c

index 053a7ebd42f80b9ba35ee47acd677af8b4d53b9d..5d7931a74285c3dbde2432e9959d58648e69a2d3 100644 (file)
@@ -1,3 +1,23 @@
+2005-05-24 [colin]     1.9.11cvs8
+
+       * src/summaryview.c
+               Fix bug #688 f) read/unread marker not
+               changed on first click
+               Also, optimize summary_status_show()
+               calls
+       * src/folder.c
+       * src/inc.c
+       * src/procmime.c
+               Fix bug #688 b) and c) wrt message
+               attachments and signature
+       * src/stock_pixmap.c
+       * src/stock_pixmap.h
+       * src/stock_pixmap.c
+       * src/stock_pixmap.h
+       * src/Makefile.am
+       * src/pixmaps/clip_gpg_signed.xpm
+               Add clip/signed icon
+
 2005-05-24 [colin]     1.9.11cvs7
 
        * src/folder_item_prefs.c
index f9244f6b0cd2801557dc7ded4a4abd6d655ca9d7..4323d230cff5988a0da0e485ff742ee3c15d1e0e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.35 -r 1.207.2.36 src/folderview.c; ) > 1.9.11cvs5.patchset
 ( cvs diff -u -r 1.207.2.36 -r 1.207.2.37 src/folderview.c; cvs diff -u -r 1.204.2.37 -r 1.204.2.38 src/prefs_common.c; cvs diff -u -r 1.103.2.16 -r 1.103.2.17 src/prefs_common.h; cvs diff -u -r 1.17.2.13 -r 1.17.2.14 src/alertpanel.c; cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/alertpanel.h; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpmime/sgpgme.c; ) > 1.9.11cvs6.patchset
 ( cvs diff -u -r 1.2.2.6 -r 1.2.2.7 src/folder_item_prefs.c; ) > 1.9.11cvs7.patchset
+( cvs diff -u -r 1.155.2.21 -r 1.155.2.22 src/Makefile.am; cvs diff -u -r 1.213.2.25 -r 1.213.2.26 src/folder.c; cvs diff -u -r 1.149.2.24 -r 1.149.2.25 src/inc.c; cvs diff -u -r 1.49.2.39 -r 1.49.2.40 src/procmime.c; cvs diff -u -r 1.25.2.11 -r 1.25.2.12 src/stock_pixmap.c; cvs diff -u -r 1.18.2.7 -r 1.18.2.8 src/stock_pixmap.h; cvs diff -u -r 1.395.2.68 -r 1.395.2.69 src/summaryview.c; cvs diff -u -r 0 -r 1 src/pixmaps/clip_gpg_signed.xpm; ) > 1.9.11cvs8.patchset
index f6feb4f4cb640ff2cbf42f6dd8a43fd82adb3229..e0ba7c1f41af8746fb896916bf0a9c4fb85dac5f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index dab83fd41d771f7ac108976825100e0d68a7d6e9..50b881444253c10afe2e89b601cd2d8fb8da9808 100644 (file)
@@ -271,6 +271,7 @@ EXTRA_DIST = \
        pixmaps/check_spelling.xpm \
        pixmaps/clipkey.xpm \
        pixmaps/clip.xpm \
+       pixmaps/clip_gpg_signed.xpm \
        pixmaps/close.xpm \
        pixmaps/complete.xpm \
        pixmaps/continue.xpm \
index c67f32fb62103349ced181258226d2458898807d..660dee1f259afae724ee1c83dc9511709f3fb732 100644 (file)
@@ -2086,13 +2086,15 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data)
 {
        MsgInfo *msginfo = data;
        MimeInfo *mimeinfo = node->data;
-
+printf("setting mime flags\n");
        if (mimeinfo->disposition == DISPOSITIONTYPE_ATTACHMENT) {
                procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
        } else if (mimeinfo->disposition == DISPOSITIONTYPE_UNKNOWN && 
                 mimeinfo->type != MIMETYPE_TEXT &&
                 mimeinfo->type != MIMETYPE_MULTIPART) {
-               procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
+               if (!mimeinfo->subtype 
+               ||  strcmp(mimeinfo->subtype, "pgp-signature"))
+                       procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
        }
 
        /* don't descend below top level message for signed and encrypted info */
index 64514b96a434e5aa997e26addaa49a2512f4ae48..d4b5de3b58b82fafed42a767bfddca1c4035258c 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -636,8 +636,12 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                /* process messages */
                folder_item_update_freeze();
                for(msglist_element = msglist; msglist_element != NULL; msglist_element = msglist_element->next) {
+                       gchar *filename;
                        msginfo = (MsgInfo *) msglist_element->data;
-                       if (!pop3_session->ac_prefs->filter_on_recv || !procmsg_msginfo_filter(msginfo))
+                       filename = folder_item_fetch_msg(processing, msginfo->msgnum);
+                       g_free(filename);
+                       if (!pop3_session->ac_prefs->filter_on_recv || 
+                           !procmsg_msginfo_filter(msginfo))
                                folder_item_move_msg(inbox, msginfo);
                        procmsg_msginfo_free(msginfo);
                }
diff --git a/src/pixmaps/clip_gpg_signed.xpm b/src/pixmaps/clip_gpg_signed.xpm
new file mode 100644 (file)
index 0000000..2279375
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * clip_gpg_signed_xpm[] = {
+"11 12 21 1",
+"      c None",
+".     c #000000",
+"+     c #D39C0A",
+"@     c #E4AB0B",
+"#     c #DA7D25",
+"$     c #E4B600",
+"%     c #E96B00",
+"&     c #DA2D01",
+"*     c #E9AD00",
+"=     c #E94500",
+"-     c #B11E04",
+";     c #E99400",
+">     c #E02F00",
+",     c #E97800",
+"'     c #CA2B04",
+")     c #E55902",
+"!     c #E9CE07",
+"~     c #D64707",
+"{     c #E9CF16",
+"]     c #C86B37",
+"^     c #E6CF8D",
+"           ",
+"    ...    ",
+"   .   .+@#",
+"   .   .$%&",
+"  ..  ..*=-",
+"  ..  ..;> ",
+"  ..  ..,' ",
+"  ..  ..)  ",
+"  . ..!.~  ",
+"  .   {.]  ",
+"  .   ^.   ",
+"   ....    "};
index 5f3bb008bd9a4cf57baec89391ffe56c6cdb031f..a5249e1f4a02b7b6f75dd5f80d35cb82ebe9a69c 100644 (file)
@@ -332,8 +332,12 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                while ((ftell(infp) < readend) && (fgets(buf, sizeof(buf), infp) != NULL)) {
                        len = base64_decoder_decode(decoder, buf, outbuf);
                        if (len < 0) {
-                               g_warning("Bad BASE64 content\n");
-                               break;
+                               g_warning("Bad BASE64 content.\n");
+                               fwrite(_("[Error decoding BASE64]\n"),
+                                       sizeof(gchar),
+                                       strlen(_("[Error decoding BASE64]\n")),
+                                       tmpfp);
+                               continue;
                        }
                        fwrite(outbuf, sizeof(gchar), len, tmpfp);
                }
index 5bbdcf409e4b3de7937efb7af71fb4063f12a6e5..34444fa7fd360387912ea1d3a047cb1cf947b68f 100644 (file)
@@ -93,6 +93,7 @@
 #include "pixmaps/notice_error.xpm"
 #include "pixmaps/notice_note.xpm"
 #include "pixmaps/quicksearch.xpm"
+#include "pixmaps/clip_gpg_signed.xpm"
 #include "pixmaps/gpg_signed.xpm"
 #include "pixmaps/drafts_close.xpm"
 #include "pixmaps/drafts_open.xpm"
@@ -162,6 +163,7 @@ static StockPixmapData pixmaps[] =
        {check_spelling_xpm                     , NULL, NULL, "check_spelling", NULL},
        {clip_xpm                               , NULL, NULL, "clip", NULL},
        {clipkey_xpm                            , NULL, NULL, "clipkey", NULL},
+       {clip_gpg_signed_xpm                    , NULL, NULL, "clip_gpg_signed", NULL},
        {close_xpm                              , NULL, NULL, "close", NULL},
        {complete_xpm                           , NULL, NULL, "complete", NULL},
        {continue_xpm                           , NULL, NULL, "continue", NULL},
index 3e187d0965e482b1b986c48e7af8d8601b9677f4..3a9a4a51f9300c50d9c2573faac361f235ec685a 100644 (file)
@@ -35,6 +35,7 @@ typedef enum
        STOCK_PIXMAP_CHECK_SPELLING,
        STOCK_PIXMAP_CLIP,
        STOCK_PIXMAP_CLIP_KEY,
+       STOCK_PIXMAP_CLIP_GPG_SIGNED,
        STOCK_PIXMAP_CLOSE,
        STOCK_PIXMAP_COMPLETE,
        STOCK_PIXMAP_CONTINUE,
index b5a60c96840f6f8e5b0577a7bcb6250dece5465a..b61792b334dc95e89fb3fbe6ad2c6f379dc9cb91 100644 (file)
@@ -124,6 +124,8 @@ static GdkPixmap *clipkeyxpm;
 static GdkBitmap *clipkeyxpmmask;
 static GdkPixmap *gpgsignedxpm;
 static GdkBitmap *gpgsignedxpmmask;
+static GdkPixmap *clipgpgsignedxpm;
+static GdkBitmap *clipgpgsignedxpmmask;
 
 static void summary_free_msginfo_func  (GtkCTree               *ctree,
                                         GtkCTreeNode           *node,
@@ -640,6 +642,8 @@ void summary_init(SummaryView *summaryview)
                         &keyxpm, &keyxpmmask);
        stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED,
                         &gpgsignedxpm, &gpgsignedxpmmask);
+       stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED,
+                        &clipgpgsignedxpm, &clipgpgsignedxpmmask);
 
        font_desc = pango_font_description_from_string(NORMAL_FONT);
        gtk_widget_modify_font(summaryview->ctree, font_desc);
@@ -1819,7 +1823,7 @@ static void summary_status_show(SummaryView *summaryview)
        off_t sel_size = 0;
        MsgInfo *msginfo;
        gchar *name;
-
+       
        if (!summaryview->folder_item) {
                gtk_label_set_text(GTK_LABEL(summaryview->statlabel_folder), "");
                gtk_label_set_text(GTK_LABEL(summaryview->statlabel_select), "");
@@ -2427,7 +2431,7 @@ static void summary_display_msg_full(SummaryView *summaryview,
                gtkut_ctree_node_move_if_on_the_edge(ctree, row);
        }
 
-       if (val == 0) {
+       if (val == 0 && MSG_IS_UNREAD(msginfo->flags)) {
                if (prefs_common.mark_as_read_delay) {
                        MarkAsReadData *data = g_new0(MarkAsReadData, 1);
                        data->summaryview = summaryview;
@@ -2687,7 +2691,10 @@ static void summary_set_row_marks(SummaryView *summaryview, GtkCTreeNode *row)
                gtk_ctree_node_set_text(ctree, row, col_pos[S_COL_LOCKED], NULL);
        }
 
-       if (MSG_IS_SIGNED(flags)) {
+       if (MSG_IS_WITH_ATTACHMENT(flags) && MSG_IS_SIGNED(flags)) {
+               gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
+                                         clipgpgsignedxpm, clipgpgsignedxpmmask);
+       } else if (MSG_IS_SIGNED(flags)) {
                gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
                                          gpgsignedxpm, gpgsignedxpmmask);
        } else if (MSG_IS_WITH_ATTACHMENT(flags) && MSG_IS_ENCRYPTED(flags)) {
@@ -4572,8 +4579,13 @@ static void summary_selected(GtkCTree *ctree, GtkCTreeNode *row,
                             gint column, SummaryView *summaryview)
 {
        MsgInfo *msginfo;
+       gboolean marked_unread = FALSE;
 
-       summary_status_show(summaryview);
+       if (column == -1 && GTK_CLIST(ctree)->selection
+        && GTK_CLIST(ctree)->selection->next) {
+               /* multiple selection */
+               summary_status_show(summaryview);
+       }
 
        if (GTK_CLIST(ctree)->selection &&
            GTK_CLIST(ctree)->selection->next) {
@@ -4606,12 +4618,11 @@ static void summary_selected(GtkCTree *ctree, GtkCTreeNode *row,
                        summary_status_show(summaryview);
                } else if (!MSG_IS_REPLIED(msginfo->flags) &&
                         !MSG_IS_FORWARDED(msginfo->flags)) {
-                       summary_mark_row_as_unread(summaryview, row);
-                       summary_status_show(summaryview);
+                       marked_unread = TRUE;
                } else if (MSG_IS_REPLIED(msginfo->flags)) {
                        summary_find_answers(summaryview, msginfo);
                        return;
-               }
+               } 
                break;
        case S_COL_LOCKED:
                if (MSG_IS_LOCKED(msginfo->flags)) {
@@ -4631,9 +4642,18 @@ static void summary_selected(GtkCTree *ctree, GtkCTreeNode *row,
                summaryview->display_msg = FALSE;
                if (summaryview->displayed != row) {
                        summary_display_msg(summaryview, row);
+                       if (marked_unread) {
+                               summary_mark_row_as_unread(summaryview, row);
+                               summary_status_show(summaryview);
+                       } 
                        return;
                }
        }
+       
+       if (marked_unread) {
+               summary_mark_row_as_unread(summaryview, row);
+               summary_status_show(summaryview);
+       } 
 
        summary_set_menu_sensitive(summaryview);
        toolbar_main_set_sensitive(summaryview->mainwin);
@@ -5213,6 +5233,7 @@ void summary_reflect_prefs_pixmap_theme(SummaryView *summaryview)
        stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP_KEY, &clipkeyxpm, &clipkeyxpmmask);
        stock_pixmap_gdk(ctree, STOCK_PIXMAP_KEY, &keyxpm, &keyxpmmask);
        stock_pixmap_gdk(ctree, STOCK_PIXMAP_GPG_SIGNED, &gpgsignedxpm, &gpgsignedxpmmask);
+       stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED, &clipgpgsignedxpm, &clipgpgsignedxpmmask);
 
        pixmap = stock_pixmap_widget(summaryview->hbox, STOCK_PIXMAP_DIR_OPEN);
        gtk_box_pack_start(GTK_BOX(summaryview->hbox), pixmap, FALSE, FALSE, 4);