[Users] To-arrow patch
H.Merijn Brand
h.m.brand at xs4all.nl
Mon Oct 12 08:42:00 CEST 2015
On Sun, 11 Oct 2015 21:08:16 +0200, Johan Vromans
<jvromans at squirrel.nl> wrote:
> Hi,
>
> The attached patch adds a [Common] setting "to_arrow" where the user can
> choose what arrow prefix she wants for mail that is sent by herself. This
> is used in the "From" column of the summary view. Currently a "-->" is
> shown before the name of the recipient. This patch makes it easy to change
> this to e.g. a more modern "➜" glyph.
>
> Is this feature worthy for inclusion?
>
> -- Johan
In my private git clone as below. Looks exactly the same :)
Date: Tue Nov 4 15:59:06 2014 +0100
Add to_self configuration variable
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 59f3a1e..15818cb 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1070,6 +1070,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 2daf079..2b3ecf6 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -222,6 +222,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 6a2b654..8765cce 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -3420,6 +3420,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) {
@@ -3430,7 +3432,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/20151012/1780563e/attachment.sig>
More information about the Users
mailing list