* src/compose.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 18 Jul 2003 22:42:05 +0000 (22:42 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Fri, 18 Jul 2003 22:42:05 +0000 (22:42 +0000)
* src/common/utils.c
honour #240 "Better SUBJECT handling" by cleaning the prefix
for both forwarding as replying

ChangeLog.claws
configure.ac
src/common/utils.c
src/compose.c

index 1330c0a7320cb15e90f51da92200544f90532048..b5d2840dbb64c27d4126443e290e638e1860bacc 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-19 [alfons]    0.9.3claws26
+
+       * src/compose.c
+       * src/common/utils.c
+               honour #240 "Better SUBJECT handling" by cleaning the prefix
+               for both forwarding as replying
+
 2003-07-18 [christoph] 0.9.3claws25
 
        * configure.ac
index ab1ab5842bc18b29d2708ccf70ed02efc5523c54..491500415b455784db7808e30950c23a96051a7b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=25
+EXTRA_VERSION=26
 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws${EXTRA_VERSION}
 
 dnl set $target
index eab6c969aaa637025ef90b11bb0756c3b0259c64..dd29497363e6b1d8a5128160499a639f7992daf6 100644 (file)
@@ -3297,7 +3297,8 @@ int subject_get_reply_prefix_length(const gchar *subject)
                "Antw\\:",                      /* "Antw:" (Dutch / German Outlook) */
                "Aw\\:",                        /* "Aw:"   (German) */
                "Antwort\\:",                   /* "Antwort:" (German Lotus Notes) */
-               "Res\\:"                        /* "Res:" (Brazilian Outlook) */
+               "Res\\:",                       /* "Res:" (Brazilian Outlook) */
+               "Fw\\:"                         /* "Fw:" Forward */
                /* add more */
        };
        const int REPLY_PREFIXES = sizeof reply_prefixes / sizeof reply_prefixes[0];
index 4d8c21a8f840cb96f6db96bf17d9ce0ec048e2e2..976f71db01ca0f994df88406b9f17f275dec0f78 100644 (file)
@@ -1038,9 +1038,17 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
                compose->fwdinfo = procmsg_msginfo_copy(msginfo);
 
        if (msginfo->subject && *msginfo->subject) {
-               gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), "Fw: ");
-               gtk_entry_append_text(GTK_ENTRY(compose->subject_entry),
-                                     msginfo->subject);
+               gchar *buf, *buf2, *p;
+
+               buf = p = g_strdup(msginfo->subject);
+               p += subject_get_reply_prefix_length(p);
+               memmove(buf, p, strlen(p) + 1);
+
+               buf2 = g_strdup_printf("Fw: %s", buf);
+               gtk_entry_set_text(GTK_ENTRY(compose->subject_entry), buf2);
+               
+               g_free(buf);
+               g_free(buf2);
        }
 
        text = GTK_STEXT(compose->text);