[Users] To-arrow

H.Merijn Brand h.m.brand at xs4all.nl
Tue Nov 4 15:57:57 CET 2014


On Tue, 4 Nov 2014 14:24:26 +0100, Johan Vromans <jvromans at squirrel.nl>
wrote:

> Hi,
> 
> When I send mail to someone, and keep a copy, Claws is very friendly to
> not show the recipient instead of the sender (because that's me). To
> indicate it is showing a recipient, the address is prefixed with "-->".
> 
> Is it possible to configure Claws to use something more 21st-century
> like, e.g. "→" or "➥" ? A hidden config setting, maybe?

A complete patch making this configurable by adding to_self, like
--8<---
enable_swap_from=1
to_self=→
-->8---
to the [Common] section of ~/.claws-mail/clawsrc

No doc changes yet. Just a proof of concept to make users even more
happy than they already are

diff --git a/src/prefs_common.c b/src/prefs_common.c
index 25ac2be..7320d79 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1064,6 +1064,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"enable_swap_from", "FALSE", &prefs_common.swap_from, P_BOOL,
         NULL, NULL, NULL},
+       {"to_self", "FALSE", &prefs_common.to_self, P_STRING,
+        NULL, NULL, NULL},
        {"use_stripes_everywhere", "TRUE", &prefs_common.use_stripes_everywhere, P_BOOL,
         NULL, NULL, NULL},
        {"use_stripes_in_summaries", "TRUE", &prefs_common.use_stripes_in_summaries, P_BOOL,
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 465a490..abd1d12 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -221,6 +221,7 @@ struct _PrefsCommon
        gboolean show_searchbar;
        gboolean expand_thread;
        gboolean swap_from;
+       gchar *to_self;
        gboolean use_addr_book;
        gchar *date_format;
        gboolean *msgview_date_format;
diff --git a/src/summaryview.c b/src/summaryview.c
index dacbc66..23a01fe 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -3382,6 +3382,8 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
        if (!should_swap) {
                text[col_pos[S_COL_FROM]] = from_text;
        } else {
+               static gchar *to_self = NULL;
+
                if (prefs_common.use_addr_book) {
                        gchar *tmp = summary_complete_address(to_text);
                        if (tmp) {
@@ -3392,7 +3394,12 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
                                to_text = to_text ? to_text : _("(No From)");
                        }
                }
-               snprintf(tmp2, BUFFSIZE-1, "--> %s", to_text);
+
+               if (to_self == NULL) { /* first time through */
+                   to_self = prefs_common.to_self && *prefs_common.to_self ?
+                       prefs_common.to_self : "-->";
+               }
+               snprintf(tmp2, BUFFSIZE-1, "%s %s", to_self, to_text);
                tmp2[BUFFSIZE-1]='\0';
                text[col_pos[S_COL_FROM]] = tmp2;
        }


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.21   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20141104/f5e48906/attachment.sig>


More information about the Users mailing list