+2001-12-27 [darko] 0.6.6claws26
+
+ * src/filtering.c
+ * src/mbox_folder.c
+ * src/messageview.c
+ * src/mh.c
+ * src/procheader.[ch]
+ * src/procmsg.h
+ * src/stock_pixmap.[ch]
+ * src/summaryview.c
+ Show key icon for encrypted mails in summary view
+
+ * src/pixmaps/clip.xpm
+ * src/pixmaps/clipkey.xpm
+ * src/pixmaps/key.xpm
+ New/modified icons for the above
+
2001-12-27 [melvin] 0.6.6claws25
* src/prefs_common.c
MICRO_VERSION=6
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws25
+EXTRA_VERSION=claws26
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl
return;
}
- msginfo = procheader_parse(filename, msgflags, TRUE);
+ msginfo = procheader_parse(filename, msgflags, TRUE, FALSE);
g_free(filename);
}
}
- msginfo = procheader_file_parse(fp, flags, FALSE);
+ msginfo = procheader_file_parse(fp, flags, FALSE, FALSE);
if (!msginfo) return NULL;
* in any case, checking tmpmsginfo->flags for MSG_UNREAD
* fixes the return-receipt-request bug */
- tmpmsginfo = procheader_parse(file, msginfo->flags, TRUE);
+ tmpmsginfo = procheader_parse(file, msginfo->flags, TRUE, TRUE);
+ if (MSG_IS_MIME(tmpmsginfo->flags))
+ MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME);
if (prefs_common.return_receipt
&& (tmpmsginfo->dispositionnotificationto
MSG_SET_TMP_FLAGS(flags, MSG_DRAFT);
}
- msginfo = procheader_parse(file, flags, FALSE);
+ msginfo = procheader_parse(file, flags, FALSE, FALSE);
if (!msginfo) return NULL;
msginfo->msgnum = atoi(file);
/* XPM */
static char * clip_xpm[] = {
-"6 12 2 1",
+"11 12 2 1",
" c None",
". c #000000",
-" ... ",
-" . .",
-" . .",
-".. ..",
-".. ..",
-".. ..",
-".. ..",
-". .. .",
-". .",
-". .",
-" .... ",
-" "};
+" ... ",
+" . . ",
+" . . ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" .. .. ",
+" . .. . ",
+" . . ",
+" . . ",
+" .... ",
+" "};
--- /dev/null
+/* XPM */
+static char * clipkey_xpm[] = {
+"11 12 3 1",
+"o c #040204",
+". c #fcfe04",
+" c None",
+" ooo ",
+" o o ",
+" o o ",
+" oo oo ",
+" oo oo ",
+" oo oooo ",
+" oo o...o",
+" ooooo....o",
+"o.......o.o",
+" o.o.o....o",
+" ooooo...o",
+" ooo "};
--- /dev/null
+/* XPM */
+static char * key_xpm[] = {
+"11 12 3 1",
+"o c #040204",
+". c #fcfe04",
+" c None",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ooo ",
+" o...o",
+" ooooo....o",
+"o.......o.o",
+" o.o.o....o",
+" o o o...o",
+" ooo "};
H_RETURN_RECEIPT_TO = 16
};
-MsgInfo *procheader_parse(const gchar *file, MsgFlags flags, gboolean full)
+MsgInfo *procheader_parse(const gchar *file, MsgFlags flags,
+ gboolean full, gboolean decrypted)
{
FILE *fp;
MsgInfo *msginfo;
return NULL;
}
- msginfo = procheader_file_parse(fp, flags, full);
+ msginfo = procheader_file_parse(fp, flags, full, decrypted);
fclose(fp);
#define ALLOW_HEADER_HINT
MsgInfo *procheader_file_parse(FILE * fp, MsgFlags flags,
- gboolean full)
+ gboolean full, gboolean decrypted)
{
static HeaderEntry hentry_full[] = {{"Date:", NULL, FALSE},
{"From:", NULL, TRUE},
else
MSG_SET_PERM_FLAGS(msginfo->flags, MSG_NEW | MSG_UNREAD);
+ if (decrypted)
+ MSG_UNSET_TMP_FLAGS(msginfo->flags, MSG_MIME);
+
msginfo->inreplyto = NULL;
while ((hnum = procheader_get_one_field(buf, sizeof(buf), fp, hentry))
}
break;
case H_CONTENT_TYPE:
- if (!strncasecmp(hp, "multipart", 9))
+ if (decrypted) {
+ if (!strncasecmp(hp, "multipart", 9) &&
+ strncasecmp(hp, "multipart/signed", 16)) {
+ MSG_SET_TMP_FLAGS(msginfo->flags,
+ MSG_MIME);
+ }
+ }
+ else if (!strncasecmp(hp, "multipart/encrypted", 19)) {
+ MSG_SET_TMP_FLAGS(msginfo->flags,
+ MSG_ENCRYPTED);
+ }
+ else if (!strncasecmp(hp, "multipart", 9))
MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME);
break;
#ifdef ALLOW_HEADER_HINT
HeaderEntry hentry[]);
MsgInfo *procheader_parse (const gchar *file,
MsgFlags flags,
- gboolean full);
-MsgInfo *procheader_file_parse(FILE * fp, MsgFlags flags,
- gboolean full);
+ gboolean full,
+ gboolean decrypted);
+MsgInfo *procheader_file_parse (FILE *fp,
+ MsgFlags flags,
+ gboolean full,
+ gboolean decrypted);
gchar *procheader_get_fromname (const gchar *str);
MSG_CACHED = 1 << 31
} MsgTmpFlags;
-#define MSG_CACHED_FLAG_MASK (MSG_MIME)
+#define MSG_CACHED_FLAG_MASK (MSG_MIME | MSG_ENCRYPTED)
#define MSG_SET_FLAGS(msg, flags) { (msg) |= (flags); }
#define MSG_UNSET_FLAGS(msg, flags) { (msg) &= ~(flags); }
#include "pixmaps/checkbox_off.xpm"
#include "pixmaps/checkbox_on.xpm"
#include "pixmaps/clip.xpm"
+#include "pixmaps/clipkey.xpm"
#include "pixmaps/complete.xpm"
#include "pixmaps/continue.xpm"
#include "pixmaps/deleted.xpm"
#include "pixmaps/inbox.xpm"
#include "pixmaps/interface.xpm"
#include "pixmaps/jpilot.xpm"
+#include "pixmaps/key.xpm"
#include "pixmaps/ldap.xpm"
#include "pixmaps/linewrap.xpm"
#include "pixmaps/mark.xpm"
{checkbox_off_xpm , NULL, NULL},
{checkbox_on_xpm , NULL, NULL},
{clip_xpm , NULL, NULL},
+ {clipkey_xpm , NULL, NULL},
{complete_xpm , NULL, NULL},
{continue_xpm , NULL, NULL},
{deleted_xpm , NULL, NULL},
{inbox_xpm , NULL, NULL},
{interface_xpm , NULL, NULL},
{jpilot_xpm , NULL, NULL},
+ {key_xpm , NULL, NULL},
{ldap_xpm , NULL, NULL},
{linewrap_xpm , NULL, NULL},
{mark_xpm , NULL, NULL},
STOCK_PIXMAP_CHECKBOX_OFF,
STOCK_PIXMAP_CHECKBOX_ON,
STOCK_PIXMAP_CLIP,
+ STOCK_PIXMAP_CLIP_KEY,
STOCK_PIXMAP_COMPLETE,
STOCK_PIXMAP_CONTINUE,
STOCK_PIXMAP_DELETED,
STOCK_PIXMAP_INBOX,
STOCK_PIXMAP_INTERFACE,
STOCK_PIXMAP_JPILOT,
+ STOCK_PIXMAP_KEY,
STOCK_PIXMAP_LDAP,
STOCK_PIXMAP_LINEWRAP,
STOCK_PIXMAP_MARK,
#define SUMMARY_COL_MARK_WIDTH 10
#define SUMMARY_COL_UNREAD_WIDTH 13
#define SUMMARY_COL_LOCKED_WIDTH 13
-#define SUMMARY_COL_MIME_WIDTH 10
+#define SUMMARY_COL_MIME_WIDTH 11
static GdkFont *boldfont;
static GdkFont *smallfont;
static GdkPixmap *clipxpm;
static GdkBitmap *clipxpmmask;
+static GdkPixmap *keyxpm;
+static GdkBitmap *keyxpmmask;
+static GdkPixmap *clipkeyxpm;
+static GdkBitmap *clipkeyxpmmask;
static void summary_free_msginfo_func (GtkCTree *ctree,
GtkCTreeNode *node,
&lockedxpm, &lockedxpmmask);
stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_IGNORETHREAD,
&ignorethreadxpm, &ignorethreadxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_KEY,
+ &clipkeyxpm, &clipkeyxpmmask);
+ stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_KEY,
+ &keyxpm, &keyxpmmask);
if (!small_style) {
small_style = gtk_style_copy
{
GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
MsgInfo *msginfo;
+ MsgFlags flags;
gchar *filename;
if (!new_window && summaryview->displayed == row) return;
summary_status_show(summaryview);
}
+ flags = msginfo->flags;
+
if (new_window) {
MessageView *msgview;
gtkut_ctree_node_move_if_on_the_edge(ctree, row);
}
- if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)) {
+ if (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags) ||
+ (MSG_IS_MIME(msginfo->flags) - MSG_IS_MIME(flags) != 0)) {
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW | MSG_UNREAD);
CHANGE_FLAGS(msginfo);
summary_set_row_marks(summaryview, row);
gtk_ctree_node_set_text(ctree, row, col_pos[S_COL_LOCKED], NULL);
}
- if (MSG_IS_MIME(flags)) {
+ if (MSG_IS_MIME(flags) && MSG_IS_ENCRYPTED(flags)) {
+ gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
+ clipkeyxpm, clipkeyxpmmask);
+ } else if (MSG_IS_ENCRYPTED(flags)) {
+ gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
+ keyxpm, keyxpmmask);
+ } else if (MSG_IS_MIME(flags)) {
gtk_ctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
clipxpm, clipxpmmask);
} else {