add Last Name placeholder for quoting
authorPaul Mangan <paul@claws-mail.org>
Mon, 25 Mar 2002 10:27:52 +0000 (10:27 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 25 Mar 2002 10:27:52 +0000 (10:27 +0000)
AUTHORS
ChangeLog.claws
configure.in
src/quote_fmt.c
src/quote_fmt_lex.l
src/quote_fmt_parse.y

diff --git a/AUTHORS b/AUTHORS
index 269ad2f60c6d2b6f61528d1fb0b6cffe333bdc54..9304e5eddd9d414bd0b6e6e5337b5c4991beb00f 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -137,3 +137,4 @@ contributors (beside the above; based on Changelog)
        Bob Woodside
        Stefaan Eeckels
        Pascal Jermini
        Bob Woodside
        Stefaan Eeckels
        Pascal Jermini
+       Thorsten Thielen
index c90e57b4f839cdba0fcb95de5ad4618c73da1a7f..86a62dd3358993930f49bc6a840ffe9c9d2b5ff7 100644 (file)
@@ -1,3 +1,12 @@
+2002-03-25 [paul]      0.7.4claws42
+
+       * src/quote_fmt.c
+         src/quote_fmt_lex.l
+         src/quote_fmt_parse.y
+               add Last name (%L) placeholder for quoting. 
+               patch submitted by Thorsten Thielen 
+               <thth@user.sourceforge.net>
+
 2002-03-25 [paul]      0.7.4claws41
 
        * src/utils.c
 2002-03-25 [paul]      0.7.4claws41
 
        * src/utils.c
index 42ef6879b8ffe660b72a6fc110102f38554262bd..2f72a99f95f4e78f52082327daa715bc139ce429 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws41
+EXTRA_VERSION=claws42
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 10c2830ba8ea46c1028a9a03734e08a02714613d..45779cf8ce337f276ddc717c3ecfbadf267c5dc6 100644 (file)
@@ -40,6 +40,7 @@ static gchar *symbol_table[][2] =
        {"%f",          N_("From")}, /* from */
        {"%N",          N_("Full Name of Sender")}, /* full name */
        {"%F",          N_("First Name of Sender")}, /* first name */
        {"%f",          N_("From")}, /* from */
        {"%N",          N_("Full Name of Sender")}, /* full name */
        {"%F",          N_("First Name of Sender")}, /* first name */
+       {"%L",          N_("Last Name of Sender")}, /* last name */
        {"%I",          N_("Initials of Sender")}, /* initial of sender */
        {"%s",          N_("Subject")}, /* subject */ 
        {"%t",          N_("To")}, /* to */ 
        {"%I",          N_("Initials of Sender")}, /* initial of sender */
        {"%s",          N_("Subject")}, /* subject */ 
        {"%t",          N_("To")}, /* to */ 
index cac97e28a05fa7aa764c5e3574c22c3780b9b537..e1a083f6ddc2ee902c62a8a1ea36121b1a573a4d 100644 (file)
@@ -12,6 +12,7 @@
 "%f" /* from */ return SHOW_FROM;
 "%N" /* full name */ return SHOW_FULLNAME;
 "%F" /* first name */ return SHOW_FIRST_NAME;
 "%f" /* from */ return SHOW_FROM;
 "%N" /* full name */ return SHOW_FULLNAME;
 "%F" /* first name */ return SHOW_FIRST_NAME;
+"%L" /* last name */ return SHOW_LAST_NAME;
 "%I" /* initial of sender */ return SHOW_SENDER_INITIAL;
 "%s" /* subject */ return SHOW_SUBJECT;
 "%t" /* to */ return SHOW_TO;
 "%I" /* initial of sender */ return SHOW_SENDER_INITIAL;
 "%s" /* subject */ return SHOW_SUBJECT;
 "%t" /* to */ return SHOW_TO;
index c8d97aae82793b96a7b67548c67a9758f87bbaaa..59b8d04064dc50c7163138210927dc5442c06f49 100644 (file)
@@ -131,7 +131,7 @@ static int isseparator(char ch)
 }
 
 %token SHOW_NEWSGROUPS
 }
 
 %token SHOW_NEWSGROUPS
-%token SHOW_DATE SHOW_FROM SHOW_FULLNAME SHOW_FIRST_NAME
+%token SHOW_DATE SHOW_FROM SHOW_FULLNAME SHOW_FIRST_NAME SHOW_LAST_NAME
 %token SHOW_SENDER_INITIAL SHOW_SUBJECT SHOW_TO SHOW_MESSAGEID
 %token SHOW_PERCENT SHOW_CC SHOW_REFERENCES SHOW_MESSAGE
 %token SHOW_QUOTED_MESSAGE SHOW_BACKSLASH SHOW_TAB
 %token SHOW_SENDER_INITIAL SHOW_SUBJECT SHOW_TO SHOW_MESSAGEID
 %token SHOW_PERCENT SHOW_CC SHOW_REFERENCES SHOW_MESSAGE
 %token SHOW_QUOTED_MESSAGE SHOW_BACKSLASH SHOW_TAB
@@ -222,6 +222,37 @@ special:
                        }
                }
        }
                        }
                }
        }
+       | SHOW_LAST_NAME
+        {
+                /* This probably won't work together very well with Middle
+                 names and the like - thth */
+               if (msginfo->fromname) {
+                       gchar *p;
+                       gchar *str;
+
+                       str = alloca(strlen(msginfo->fromname) + 1);
+                       if (str != NULL) {
+                               strcpy(str, msginfo->fromname);
+                                p = str;
+                                while (*p && !isspace(*p)) p++;
+                                if (*p) {
+                                   /* We found a space. Get first none-space char and
+                                    insert rest of string from there. */
+                                   while (*p && isspace(*p)) p++;
+                                    if (*p) {
+                                       INSERT(p);
+                                   } else {
+                                       /* If there is no none-space char, just insert
+                                        whole fromname. */
+                                       INSERT(str);
+                                   }
+                               } else {
+                                   /* If there is no space, just insert whole fromname. */
+                                   INSERT(str);
+                               }
+                       }
+               }
+       }
        | SHOW_SENDER_INITIAL
        {
 #define MAX_SENDER_INITIAL 20
        | SHOW_SENDER_INITIAL
        {
 #define MAX_SENDER_INITIAL 20