2011-08-28 [paul] 3.7.10cvs2
authorPaul Mangan <paul@claws-mail.org>
Sun, 28 Aug 2011 16:14:39 +0000 (16:14 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 28 Aug 2011 16:14:39 +0000 (16:14 +0000)
* 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
PATCHSETS
configure.ac
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index 39fb073..e0ae078 100644 (file)
--- 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
index 3a7fb46..800ad97 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index f18ff4d..79d8145 100644 (file)
@@ -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=
 
index 8e18713..7783640 100644 (file)
@@ -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,
index 1d339ac..e5660bf 100644 (file)
@@ -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 */
index 0128ed6..3d2f5f8 100644 (file)
@@ -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)");         
                }
        }