aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-22 16:39:28 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-22 16:39:28 +0800
commit7745ae29860377c3b44b47ed3929b7a881d10fe7 (patch)
tree701a1dec023f1e484287da5e0ce6051a4ec87b13 /mail
parent065755c13c934634aeee08477ae4ed6a7d4a816e (diff)
downloadgsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar.gz
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar.bz2
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar.lz
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar.xz
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.tar.zst
gsoc2013-evolution-7745ae29860377c3b44b47ed3929b7a881d10fe7.zip
Bug #434972 - Reply does not detect "RE :" subject prefix
Diffstat (limited to 'mail')
-rw-r--r--mail/em-composer-utils.c4
-rw-r--r--mail/message-list.c27
2 files changed, 26 insertions, 5 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 3f0c4b155a..40609f0f24 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1966,8 +1966,10 @@ reply_get_composer (EShell *shell,
/* Set the subject of the new message. */
if ((subject = (gchar *) camel_mime_message_get_subject (message))) {
- if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
+ if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0 && g_ascii_strncasecmp (subject, "Re : ", 5) != 0)
subject = g_strdup_printf ("Re: %s", subject);
+ else if (g_ascii_strncasecmp (subject, "Re : ", 5) == 0)
+ subject = g_strdup_printf ("Re: %s", subject + 5);
else
subject = g_strdup (subject);
} else {
diff --git a/mail/message-list.c b/mail/message-list.c
index 3bc5915f14..8f38fac7bf 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -486,10 +486,19 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, gint c
if (col == COL_SUBJECT_NORM) {
const guchar *subject;
+ gboolean found_re = TRUE;
subject = (const guchar *) string;
- while (!g_ascii_strncasecmp ((gchar *)subject, "Re:", 3)) {
- subject += 3;
+ while (found_re) {
+ found_re = FALSE;
+
+ if (g_ascii_strncasecmp ((gchar *) subject, "Re:", 3) == 0) {
+ found_re = TRUE;
+ subject += 3;
+ } else if (g_ascii_strncasecmp ((gchar *) subject, "Re :", 4)) {
+ found_re = TRUE;
+ subject += 4;
+ }
/* jump over any spaces */
while (*subject && isspace ((gint) *subject))
@@ -1475,10 +1484,20 @@ get_trimmed_subject (CamelMessageInfo *info)
}
do {
+ gboolean found_re = TRUE;
+
found_mlist = FALSE;
- while (!g_ascii_strncasecmp ((gchar *) subject, "Re:", 3)) {
- subject += 3;
+ while (found_re) {
+ found_re = FALSE;
+
+ if (g_ascii_strncasecmp ((gchar *) subject, "Re:", 3) == 0) {
+ found_re = TRUE;
+ subject += 3;
+ } else if (g_ascii_strncasecmp ((gchar *) subject, "Re :", 4) == 0) {
+ found_re = TRUE;
+ subject += 4;
+ }
/* jump over any spaces */
while (*subject && isspace ((gint) *subject))