[前][次][番号順一覧][スレッド一覧]

sylpheed-jp:3055

From: Kazuhiro NISHIYAMA <Kazuhiro NISHIYAMA <zn@xxxxxxxxxx>>
Date: Thu, 14 Jul 2005 19:44:53 +0900
Subject: [sylpheed-jp:03055] multipart/signedとmultipart/encryptedのアイコン

西山和広です。

multipart/signedとmultipart/encryptedの時もクリップのアイコンに
なっていて添付と区別が付かないので、別のアイコンを表示するように
してほしいです。

# とりあえずパッチの中のアイコンは適当にアルファベットそのままですが。


=== src/procheader.c
==================================================================
--- src/procheader.c   (/sylpheed/trunk)   (revision 644)
+++ src/procheader.c   (/sylpheed/local)   (revision 644)
@@ -586,6 +586,11 @@
 		case H_CONTENT_TYPE:
 			if (!g_ascii_strncasecmp(hp, "multipart", 9)) {
 				MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME);
+				if (!g_strncasecmp(hp, "multipart/encrypted", 19)) {
+					MSG_SET_TMP_FLAGS(msginfo->flags, MSG_ENCRYPTED);
+				} else if (!g_strncasecmp(hp, "multipart/signed", 16)) {
+					MSG_SET_TMP_FLAGS(msginfo->flags, MSG_SIGNED);
+				}
 			} else if (!charset) {
 				procmime_scan_content_type_str
 					(hp, NULL, &charset, NULL, NULL);
=== src/procmsg.h
==================================================================
--- src/procmsg.h   (/sylpheed/trunk)   (revision 644)
+++ src/procmsg.h   (/sylpheed/local)   (revision 644)
@@ -94,7 +94,7 @@
 #define MSG_INVALID		(1U << 30)
 #define MSG_RECEIVED		(1U << 31)
 
-#define MSG_CACHED_FLAG_MASK	(MSG_MIME)
+#define MSG_CACHED_FLAG_MASK	(MSG_MIME | MSG_ENCRYPTED | MSG_SIGNED)
 
 typedef guint32 MsgTmpFlags;
 
=== src/stock_pixmap.c
==================================================================
--- src/stock_pixmap.c   (/sylpheed/trunk)   (revision 644)
+++ src/stock_pixmap.c   (/sylpheed/local)   (revision 644)
@@ -30,6 +30,8 @@
 #include "pixmaps/book.xpm"
 #include "pixmaps/category.xpm"
 #include "pixmaps/clip.xpm"
+#include "pixmaps/encrypted.xpm"
+#include "pixmaps/signed.xpm"
 #include "pixmaps/complete.xpm"
 #include "pixmaps/continue.xpm"
 #include "pixmaps/deleted.xpm"
@@ -93,6 +95,8 @@
 	{book_xpm	 , NULL, NULL},
 	{category_xpm	 , NULL, NULL},
 	{clip_xpm	 , NULL, NULL},
+	{encrypted_xpm	 , NULL, NULL},
+	{signed_xpm	 , NULL, NULL},
 	{complete_xpm	 , NULL, NULL},
 	{continue_xpm	 , NULL, NULL},
 	{deleted_xpm	 , NULL, NULL},
=== src/stock_pixmap.h
==================================================================
--- src/stock_pixmap.h   (/sylpheed/trunk)   (revision 644)
+++ src/stock_pixmap.h   (/sylpheed/local)   (revision 644)
@@ -29,6 +29,8 @@
 	STOCK_PIXMAP_BOOK,
 	STOCK_PIXMAP_CATEGORY,
 	STOCK_PIXMAP_CLIP,
+	STOCK_PIXMAP_ENCRYPTED,
+	STOCK_PIXMAP_SIGNED,
 	STOCK_PIXMAP_COMPLETE,
 	STOCK_PIXMAP_CONTINUE,
 	STOCK_PIXMAP_DELETED,
=== src/summaryview.c
==================================================================
--- src/summaryview.c   (/sylpheed/trunk)   (revision 644)
+++ src/summaryview.c   (/sylpheed/local)   (revision 644)
@@ -110,6 +110,8 @@
 static GdkPixbuf *forwarded_pixbuf;
 
 static GdkPixbuf *clip_pixbuf;
+static GdkPixbuf *encrypted_pixbuf;
+static GdkPixbuf *signed_pixbuf;
 
 static GList *summary_get_selected_rows	(SummaryView		*summaryview);
 static void summary_selection_list_free	(SummaryView		*summaryview);
@@ -533,6 +535,10 @@
 			 &forwarded_pixbuf);
 	stock_pixbuf_gdk(summaryview->treeview, STOCK_PIXMAP_CLIP,
 			 &clip_pixbuf);
+	stock_pixbuf_gdk(summaryview->treeview, STOCK_PIXMAP_ENCRYPTED,
+			 &encrypted_pixbuf);
+	stock_pixbuf_gdk(summaryview->treeview, STOCK_PIXMAP_SIGNED,
+			 &signed_pixbuf);
 
 	font_desc = pango_font_description_new();
 	size = pango_font_description_get_size
@@ -1868,8 +1874,15 @@
 	else if (MSG_IS_FORWARDED(flags))
 		unread_pix = forwarded_pixbuf;
 
-	if (MSG_IS_MIME(flags))
-		mime_pix = clip_pixbuf;
+	if (MSG_IS_MIME(flags)) {
+		if (MSG_IS_ENCRYPTED(flags)) {
+			mime_pix = encrypted_pixbuf;
+		} else if (MSG_IS_SIGNED(flags)) {
+			mime_pix = signed_pixbuf;
+		} else {
+			mime_pix = clip_pixbuf;
+		}
+	}
 
 	if (prefs_common.bold_unread && MSG_IS_UNREAD(flags))
 		use_bold = TRUE;
=== src/pixmaps/signed.xpm
==================================================================
--- src/pixmaps/signed.xpm   (/sylpheed/trunk)   (revision 644)
+++ src/pixmaps/signed.xpm   (/sylpheed/local)   (revision 644)
@@ -0,0 +1,17 @@
+/* XPM */
+static char * signed_xpm[] = {
+"6 12 2 1",
+" 	c None",
+".	c #000000",
+"  ..  ",
+" .... ",
+"..  ..",
+"..   .",
+"..    ",
+" ...  ",
+"  ... ",
+"    ..",
+".   ..",
+"..  ..",
+" .... ",
+"  ..  "};
=== src/pixmaps/encrypted.xpm
==================================================================
--- src/pixmaps/encrypted.xpm   (/sylpheed/trunk)   (revision 644)
+++ src/pixmaps/encrypted.xpm   (/sylpheed/local)   (revision 644)
@@ -0,0 +1,17 @@
+/* XPM */
+static char * encrypted_xpm[] = {
+"6 12 2 1",
+" 	c None",
+".	c #000000",
+"      ",
+" .... ",
+" .... ",
+" .    ",
+" .    ",
+" .... ",
+" .... ",
+" .    ",
+" .    ",
+" .... ",
+" .... ",
+"      "};
=== src/pixmaps/Makefile.am
==================================================================
--- src/pixmaps/Makefile.am   (/sylpheed/trunk)   (revision 644)
+++ src/pixmaps/Makefile.am   (/sylpheed/local)   (revision 644)
@@ -44,6 +44,8 @@
 	stock_sylpheed.png \
 	sylpheed-logo.png \
 	clip.xpm \
+	encrypted.xpm \
+	signed.xpm \
 	deleted.xpm \
 	dir-close.xpm \
 	dir-open.xpm \

Property changes on: 
___________________________________________________________________
Name: svk:merge
 +ee746299-78ed-0310-b773-934348b2243d:/trunk:433


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)


[前][次][番号順一覧][スレッド一覧]