use-htmlmail-instead-of-clip-cached.diff

Kentaro HAYASHI, 08/22/2012 10:26 AM

Download (5.03 KB)

View differences:

sylpheed.rev/libsylph/procheader.c 2012-08-22 10:05:17.497631581 +0900
611 611
	gint hnum;
612 612
	gchar *from = NULL, *to = NULL, *subject = NULL, *cc = NULL;
613 613
	gchar *charset = NULL;
614
	MimeInfo *mimeinfo;
614 615

  
615 616
	hentry = full ? hentry_full : hentry_short;
616 617

  
......
688 689
		case H_CONTENT_TYPE:
689 690
			if (!g_ascii_strncasecmp(hp, "multipart", 9)) {
690 691
				MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME);
692
				mimeinfo = procmime_scan_message(msginfo);
693
				while (mimeinfo) {
694
					if (mimeinfo->mime_type != MIME_TEXT &&
695
					    mimeinfo->mime_type != MIME_TEXT_HTML &&
696
					    mimeinfo->mime_type != MIME_MULTIPART) {
697
						break;
698
					} else {
699
						mimeinfo = procmime_mimeinfo_next(mimeinfo);
700
					}
701
				}
702
				if (!mimeinfo) {
703
					MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME_HTMLMAIL);
704
				}
691 705
			} else if (!charset) {
692 706
				procmime_scan_content_type_str
693 707
					(hp, NULL, &charset, NULL, NULL);
sylpheed.rev/libsylph/procmsg.h 2012-08-22 10:05:17.501631581 +0900
89 89
#define MSG_IMAP		(1U << 19)
90 90
#define MSG_NEWS		(1U << 20)
91 91
#define MSG_SIGNED		(1U << 21)
92
#define MSG_MIME_HTMLMAIL	(1U << 26 | MSG_MIME)
92 93
#define MSG_FLAG_CHANGED	(1U << 27)
93 94
#define MSG_CACHED		(1U << 28)
94 95
#define MSG_MIME		(1U << 29)
......
136 137
#define MSG_IS_MIME(msg)		(((msg).tmp_flags & MSG_MIME) != 0)
137 138
#define MSG_IS_INVALID(msg)		(((msg).tmp_flags & MSG_INVALID) != 0)
138 139
#define MSG_IS_RECEIVED(msg)		(((msg).tmp_flags & MSG_RECEIVED) != 0)
140
#define MSG_IS_MIME_HTMLMAIL(msg)	(((msg).tmp_flags & MSG_MIME_HTMLMAIL) != 0)
139 141

  
140 142
#define WRITE_CACHE_DATA_INT(n, fp)		\
141 143
{						\
sylpheed.rev/src/icons/htmlmail.xpm 2012-08-22 10:05:17.513631581 +0900
1
/* XPM */
2
static char *htmlmail_xpm[] = {
3
"8 12 28 1",
4
" 	c None",
5
"B	c #000000",
6
"C	c #474747",
7
"D	c #F5F5F5",
8
"E	c #323232",
9
"F	c #F4F4F4",
10
"G	c #C1C1C1",
11
"H	c #EAEAEA",
12
"I	c #EBEBEB",
13
"J	c #AAAAAA",
14
"K	c #3D3D3D",
15
"L	c #EFEFEF",
16
"M	c #F3F3F3",
17
"N	c #3F3F3F",
18
"O	c #464646",
19
"P	c #BDBDBD",
20
"Q	c #D6D6D6",
21
"R	c #A0A0A0",
22
"S	c #F2F2F2",
23
"T	c #BABABA",
24
"U	c #E9E9E9",
25
"V	c #8C8C8C",
26
"W	c #BFBFBF",
27
"X	c #DADADA",
28
"Y	c #CDCDCD",
29
"Z	c #A7A7A7",
30
"a	c #D3D3D3",
31
"b	c #282828",
32
"        ",
33
"        ",
34
"        ",
35
" BBBBBB ",
36
"BBDDDDBB",
37
"BDCLDCDB",
38
"BDDCCDDB",
39
"BDCGGCDB",
40
"BCDDDDCB",
41
" BBBBBB ",
42
"        ",
43
"        "
44
};
sylpheed.rev/src/stock_pixmap.c 2012-08-22 10:05:17.509631581 +0900
34 34
#include "icons/deleted.xpm"
35 35
#include "icons/error.xpm"
36 36
#include "icons/forwarded.xpm"
37
#include "icons/htmlmail.xpm"
37 38
#include "icons/interface.xpm"
38 39
#include "icons/jpilot.xpm"
39 40
#include "icons/ldap.xpm"
......
110 111
	{error_xpm	 , NULL, NULL},
111 112
	{forwarded_xpm	 , NULL, NULL},
112 113
	{NULL, NULL, NULL, NULL, group, sizeof(group), "group", 0},
114
	{htmlmail_xpm	 , NULL, NULL},
113 115
	{interface_xpm	 , NULL, NULL},
114 116
	{jpilot_xpm	 , NULL, NULL},
115 117
	{ldap_xpm	 , NULL, NULL},
sylpheed.rev/src/stock_pixmap.h 2012-08-22 10:05:17.509631581 +0900
38 38
	STOCK_PIXMAP_ERROR,
39 39
	STOCK_PIXMAP_FORWARDED,
40 40
	STOCK_PIXMAP_GROUP,
41
	STOCK_PIXMAP_HTMLMAIL,
41 42
	STOCK_PIXMAP_INTERFACE,
42 43
	STOCK_PIXMAP_JPILOT,
43 44
	STOCK_PIXMAP_LDAP,
sylpheed.rev/src/summaryview.c 2012-08-22 10:05:17.505631581 +0900
139 139
static GdkPixbuf *forwarded_pixbuf;
140 140

  
141 141
static GdkPixbuf *clip_pixbuf;
142
static GdkPixbuf *htmlmail_pixbuf;
142 143

  
143 144
static void summary_clear_list_full	(SummaryView		*summaryview,
144 145
					 gboolean		 is_refresh);
......
624 625
			 &forwarded_pixbuf);
625 626
	stock_pixbuf_gdk(summaryview->treeview, STOCK_PIXMAP_CLIP,
626 627
			 &clip_pixbuf);
628
	stock_pixbuf_gdk(summaryview->treeview, STOCK_PIXMAP_HTMLMAIL,
629
			 &htmlmail_pixbuf);
627 630

  
628 631
	font_desc = pango_font_description_new();
629 632
	size = pango_font_description_get_size
......
2473 2476
	else if (MSG_IS_FORWARDED(flags))
2474 2477
		unread_pix = forwarded_pixbuf;
2475 2478

  
2476
	if (MSG_IS_MIME(flags))
2477
		mime_pix = clip_pixbuf;
2479
	if (MSG_IS_MIME(flags)) {
2480
		if (MSG_IS_MIME_HTMLMAIL(flags)) {
2481
			mime_pix = htmlmail_pixbuf;
2482
		} else {
2483
			mime_pix = clip_pixbuf;
2484
		}
2485
	}
2478 2486

  
2479 2487
	if (prefs_common.bold_unread) {
2480 2488
		if (MSG_IS_UNREAD(flags))