talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit b5a178c4cb37d82fe89ee7ab47c35cb28030e07e
parent 4e7adaef1e4cd08d245a105bdca1a89cd811792e
Author: Paweł Pękala <c0rn@gazeta.pl>
Date:   Sat,  5 Feb 2011 11:32:20 +0000

2011-02-05 [pawel]	3.7.8cvs48

	* manual/advanced.xml
		Document new hidden pref
	* src/folder.c
		Dont treat mimeparts referenced by others as
		real attachments
	* src/mimeview.c
	* src/prefs_common.c
	* src/prefs_common.h
		Add ability to hide inline attachments referenced
		by other mimeparts in MimeView. To enable this
		feature set show_inline_attachments=0 in your clawsrc

Diffstat:
MChangeLog | 14++++++++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Mmanual/advanced.xml | 11++++++++++-
Msrc/folder.c | 2++
Msrc/mimeview.c | 6+++++-
Msrc/prefs_common.c | 2++
Msrc/prefs_common.h | 1+
8 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,17 @@ +2011-02-05 [pawel] 3.7.8cvs48 + + * manual/advanced.xml + Document new hidden pref + * src/folder.c + Dont treat mimeparts referenced by others as + real attachments + * src/mimeview.c + * src/prefs_common.c + * src/prefs_common.h + Add ability to hide inline attachments referenced + by other mimeparts in MimeView. To enable this + feature set show_inline_attachments=0 in your clawsrc + 2011-01-25 [colin] 3.7.8cvs47 * src/matcher.c diff --git a/PATCHSETS b/PATCHSETS @@ -4121,3 +4121,4 @@ ( cvs diff -u -r 1.56.2.66 -r 1.56.2.67 src/pop.c; ) > 3.7.8cvs45.patchset ( cvs diff -u -r 1.382.2.566 -r 1.382.2.567 src/compose.c; cvs diff -u -r 1.204.2.199 -r 1.204.2.200 src/prefs_common.c; cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/common/md5.c; cvs diff -u -r 1.4.2.36 -r 1.4.2.37 src/common/ssl_certificate.c; ) > 3.7.8cvs46.patchset ( cvs diff -u -r 1.75.2.67 -r 1.75.2.68 src/matcher.c; cvs diff -u -r 1.49.2.137 -r 1.49.2.138 src/procmime.c; cvs diff -u -r 1.17.2.24 -r 1.17.2.25 src/procmime.h; cvs diff -u -r 1.15.2.59 -r 1.15.2.60 src/summary_search.c; cvs diff -u -r 1.36.2.189 -r 1.36.2.190 src/common/utils.c; cvs diff -u -r 1.20.2.74 -r 1.20.2.75 src/common/utils.h; ) > 3.7.8cvs47.patchset +( cvs diff -u -r 1.1.2.55 -r 1.1.2.56 manual/advanced.xml; cvs diff -u -r 1.213.2.198 -r 1.213.2.199 src/folder.c; cvs diff -u -r 1.83.2.164 -r 1.83.2.165 src/mimeview.c; cvs diff -u -r 1.204.2.200 -r 1.204.2.201 src/prefs_common.c; cvs diff -u -r 1.103.2.131 -r 1.103.2.132 src/prefs_common.h; ) > 3.7.8cvs48.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=47 +EXTRA_VERSION=48 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/manual/advanced.xml b/manual/advanced.xml @@ -712,7 +712,16 @@ </para> </listitem> </varlistentry> - <varlistentry> + <varlistentry> + <term><literal>show_inline_attachments</literal></term> + <listitem> + <para> + 0 or 1. Show inline attachments in MimeView. + Default is 1, turned on. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><literal>skip_ssl_cert_check</literal></term> <listitem> <para> diff --git a/src/folder.c b/src/folder.c @@ -2800,6 +2800,7 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data) strcmp(mimeinfo->subtype, "pkcs7-signature")))) { procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT); } else if (mimeinfo->disposition == DISPOSITIONTYPE_UNKNOWN && + mimeinfo->id == NULL && mimeinfo->type != MIMETYPE_TEXT && mimeinfo->type != MIMETYPE_MULTIPART) { if (!mimeinfo->subtype @@ -2808,6 +2809,7 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data) strcmp(mimeinfo->subtype, "pkcs7-signature"))) procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT); } else if (mimeinfo->disposition == DISPOSITIONTYPE_INLINE && + mimeinfo->id == NULL && (strcmp(mimeinfo->subtype, "pgp-signature") && strcmp(mimeinfo->subtype, "x-pkcs7-signature") && strcmp(mimeinfo->subtype, "pkcs7-signature")) && diff --git a/src/mimeview.c b/src/mimeview.c @@ -1362,7 +1362,8 @@ skip: if (node) { partinfo = gtk_cmctree_node_get_row_data(ctree, node); - if (partinfo->type == MIMETYPE_MULTIPART) + if (partinfo->type == MIMETYPE_MULTIPART || + (!prefs_common.show_inline_attachments && partinfo->id)) goto skip; gtk_sctree_unselect_all(GTK_SCTREE(ctree)); gtk_sctree_select(GTK_SCTREE(ctree), node); @@ -2226,6 +2227,9 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo) GtkTooltips *tips = mimeview->tooltips; #endif + if (!prefs_common.show_inline_attachments && mimeinfo->id) + return; + vbox = mimeview->icon_vbox; mimeview->icon_count++; button = gtk_event_box_new(); diff --git a/src/prefs_common.c b/src/prefs_common.c @@ -756,6 +756,8 @@ static PrefParam param[] = { &SPECIFIC_PREFS.mime_textviewer, P_STRING, NULL, NULL, NULL}, {"mime_open_command", "gedit '%s'", &SPECIFIC_PREFS.mime_open_cmd, P_STRING, NULL, NULL, NULL}, + {"show_inline_attachments", "TRUE", + &prefs_common.show_inline_attachments, P_BOOL, NULL, NULL, NULL}, /* Interface */ #ifndef GENERIC_UMPC diff --git a/src/prefs_common.h b/src/prefs_common.h @@ -334,6 +334,7 @@ struct _PrefsCommon gchar *attach_load_dir; GList *mime_open_cmd_history; + gboolean show_inline_attachments; /* Addressbook */ gboolean addressbook_use_editaddress_dialog;