From 37f727d780b69645f7811e255bca2cdbba40138a Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Sun, 28 Aug 2011 16:14:39 +0000 Subject: [PATCH] 2011-08-28 [paul] 3.7.10cvs2 * src/prefs_common.c * src/prefs_common.h * src/summaryview.c add new hidden option to control the display in the From column in the Message List: 0 (default): show name, 1: show address, 2: show name + address --- ChangeLog | 9 +++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/prefs_common.c | 2 ++ src/prefs_common.h | 8 ++++++++ src/summaryview.c | 26 ++++++++++++++++++++------ 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 39fb07351..e0ae07868 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-08-28 [paul] 3.7.10cvs2 + + * src/prefs_common.c + * src/prefs_common.h + * src/summaryview.c + add new hidden option to control the display in the From + column in the Message List: 0 (default): show name, + 1: show address, 2: show name + address + 2011-08-27 [paul] 3.7.10cvs1 * po/POTFILES.in diff --git a/PATCHSETS b/PATCHSETS index 3a7fb469d..800ad97fd 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -4205,3 +4205,4 @@ ( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 claws-mail.desktop; ) > 3.7.9cvs51.patchset ( cvs diff -u -r 1.9.2.22 -r 1.9.2.23 po/cs.po; cvs diff -u -r 1.42.2.54 -r 1.42.2.55 po/fr.po; cvs diff -u -r 1.5.2.19 -r 1.5.2.20 po/hu.po; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 po/lt.po; cvs diff -u -r 1.50.2.41 -r 1.50.2.42 po/pt_BR.po; cvs diff -u -r 1.2.2.33 -r 1.2.2.34 po/sk.po; ) > 3.7.9cvs52.patchset ( cvs diff -u -r 1.53.2.37 -r 1.53.2.38 po/POTFILES.in; cvs diff -u -r 1.4.2.38 -r 1.4.2.39 src/common/ssl_certificate.c; cvs diff -u -r 1.1.4.114 -r 1.1.4.115 src/etpan/imap-thread.c; cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/etpan/nntp-thread.c; ) > 3.7.10cvs1.patchset +( cvs diff -u -r 1.204.2.201 -r 1.204.2.202 src/prefs_common.c; cvs diff -u -r 1.103.2.132 -r 1.103.2.133 src/prefs_common.h; cvs diff -u -r 1.395.2.429 -r 1.395.2.430 src/summaryview.c; ) > 3.7.10cvs2.patchset diff --git a/configure.ac b/configure.ac index f18ff4dd8..79d81451f 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=10 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=1 +EXTRA_VERSION=2 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/prefs_common.c b/src/prefs_common.c index 8e1871361..7783640ba 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -803,6 +803,8 @@ static PrefParam param[] = { NULL, NULL, NULL}, {"nextunreadmsg_dialog", "1", &prefs_common.next_unread_msg_dialog, P_ENUM, NULL, NULL, NULL}, + {"summary_from_show", "0", &prefs_common.summary_from_show, P_ENUM, + NULL, NULL, NULL}, {"pixmap_theme_path", DEFAULT_PIXMAP_THEME, &SPECIFIC_PREFS.pixmap_theme_path, P_STRING, diff --git a/src/prefs_common.h b/src/prefs_common.h index 1d339ac51..e5660bf69 100644 --- a/src/prefs_common.h +++ b/src/prefs_common.h @@ -95,6 +95,13 @@ typedef enum OPENMSG_WHEN_VIEW_VISIBLE } ShowMsgPolicy; +typedef enum +{ + SHOW_NAME, + SHOW_ADDR, + SHOW_BOTH +} SummaryFromShow; + struct _PrefsCommon { #ifdef MAEMO @@ -357,6 +364,7 @@ struct _PrefsCommon EntryAction summary_select_prio[SUMMARY_OPEN_ACTIONS-1]; NextUnreadMsgDialogShow next_unread_msg_dialog; + SummaryFromShow summary_from_show; gboolean add_address_by_click; gchar *pixmap_theme_path; int hover_timeout; /* msecs mouse hover timeout */ diff --git a/src/summaryview.c b/src/summaryview.c index 0128ed6ca..3d2f5f801 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -3208,9 +3208,16 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[], } if (!prefs_common.use_addr_book) { - from_text = msginfo->fromname ? - msginfo->fromname : - _("(No From)"); + if (prefs_common.summary_from_show == SHOW_NAME) + from_text = msginfo->fromname; + else if (prefs_common.summary_from_show == SHOW_BOTH) + from_text = msginfo->from; + else { + from_text = msginfo->from; + extract_address(from_text); + } + if (!from_text) + _("(No From)"); } else { gchar *tmp = summary_complete_address(msginfo->from); if (tmp) { @@ -3218,9 +3225,16 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[], g_free(tmp); from_text = buf; } else { - from_text = (msginfo->fromname) ? - msginfo->fromname: - _("(No From)"); + if (prefs_common.summary_from_show == SHOW_NAME) + from_text = msginfo->fromname; + else if (prefs_common.summary_from_show == SHOW_BOTH) + from_text = msginfo->from; + else { + from_text = msginfo->from; + extract_address(from_text); + } + if (!from_text) + _("(No From)"); } } -- 2.25.1