aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-22 16:39:28 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:36 +0800
commit2df4eb2b0c7aa84ac41738a059894b91d79cfc8a (patch)
tree1815566f5fda869eb4f5dc88fed9efa61545b614 /mail/message-list.c
parent04a178dc663af19a2d4843e03161efde21eed6f4 (diff)
downloadgsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar.gz
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar.bz2
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar.lz
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar.xz
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.tar.zst
gsoc2013-evolution-2df4eb2b0c7aa84ac41738a059894b91d79cfc8a.zip
Bug #434972 - Reply does not detect "RE :" subject prefix
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c27
1 files changed, 23 insertions, 4 deletions
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))