From: Colin Leroy Date: Tue, 24 May 2005 16:26:43 +0000 (+0000) Subject: 2005-05-24 [colin] 1.9.11cvs8 X-Git-Tag: rel_1_9_12~104 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e3a30c031889c5055a5a7f75c10235760a580f26 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 --- diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 053a7ebd4..5d7931a74 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -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 diff --git a/PATCHSETS b/PATCHSETS index f9244f6b0..4323d230c 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -496,3 +496,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index f6feb4f4c..e0ba7c1f4 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/Makefile.am b/src/Makefile.am index dab83fd41..50b881444 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/folder.c b/src/folder.c index c67f32fb6..660dee1f2 100644 --- a/src/folder.c +++ b/src/folder.c @@ -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 */ diff --git a/src/inc.c b/src/inc.c index 64514b96a..d4b5de3b5 100644 --- 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 index 000000000..22793754d --- /dev/null +++ b/src/pixmaps/clip_gpg_signed.xpm @@ -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", +" ", +" ... ", +" . .+@#", +" . .$%&", +" .. ..*=-", +" .. ..;> ", +" .. ..,' ", +" .. ..) ", +" . ..!.~ ", +" . {.] ", +" . ^. ", +" .... "}; diff --git a/src/procmime.c b/src/procmime.c index 5f3bb008b..a5249e1f4 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -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); } diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c index 5bbdcf409..34444fa7f 100644 --- a/src/stock_pixmap.c +++ b/src/stock_pixmap.c @@ -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}, diff --git a/src/stock_pixmap.h b/src/stock_pixmap.h index 3e187d096..3a9a4a51f 100644 --- a/src/stock_pixmap.h +++ b/src/stock_pixmap.h @@ -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, diff --git a/src/summaryview.c b/src/summaryview.c index b5a60c968..b61792b33 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -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);