Ticket #90 (new Feature)

Opened 7 years ago

Last modified 6 years ago

Add an option to strip localized Re: from subjects when replying

Reported by: Hagedorn@… Owned by: somebody
Priority: minor Milestone:
Component: Application Version: v4.0.6
Severity: Other Keywords:
Cc: Operating System: All
OS Version:

Description

This is something that has been discussed a few times over the years, but it's bugging me more and more :-)

Too many people use Microsoft Outlook and Outlook Express in localized versions. Those versions don't strip "Re:"'s and add (for the German version) "Aw:"'s. Mulberry adds a new "Re:" when replying, so after going back and forth a few times you get this:

Subject: Aw: Re: Aw: Re: Aw: Mittwoch und so

What I'd like to have is a custom option to recognize localized "Re:"'s

Attachments

Mulberry.diff (10.2 KB) - added by hgd 6 years ago.
Patch that uses preferences

Change History

comment:1 Changed 7 years ago by daboo

Milestone Release deleted

comment:2 Changed 6 years ago by hgd

As my first patch I have resolved this in the most naive way:

Index: Mulberry/Sources_Common/Automation/CActionManager.cp
===================================================================
--- Mulberry/Sources_Common/Automation/CActionManager.cp        (revision 94)
+++ Mulberry/Sources_Common/Automation/CActionManager.cp        (working copy)
@@ -985,9 +985,11 @@
        const char* osubject = msgs.front()->GetEnvelope()->GetSubject();
        if (osubject)
        {
-               if (((osubject[0]!='R') && (osubject[0]!='r')) ||
+               if ((((osubject[0]!='R') && (osubject[0]!='r')) ||
                        ((osubject[1]!='E') && (osubject[1]!='e')) ||
-                       (osubject[2]!=':'))
+                       (osubject[2]!=':')) && (((osubject[0]!='A') && (osubject[0]!='a')) ||
+                                                                       ((osubject[1]!='W') && (osubject[1]!='w')) ||
+                                                                       (osubject[2]!=':')))
                        subject += osubject;
                else
                        subject = osubject;
Index: Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp
===================================================================
--- Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp   (revision 94)
+++ Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp   (working copy)
@@ -405,8 +405,10 @@
                const char* subject = theEnv->GetSubject();
                if (subject)
                {
-                       if (((subject[0]!='R') && (subject[0]!='r')) ||
+                       if ((((subject[0]!='R') && (subject[0]!='r')) ||
                                ((subject[1]!='E') && (subject[1]!='e')) ||
+                                (subject[2]!=':')) && ((subject[0]!='A') && (subject[0]!='a')) ||
+                               ((subject[1]!='W') && (subject[1]!='w')) ||
                                (subject[2]!=':'))
                        {
                                theTxt = "Re: ";

That's good enough for me, but obviously this should be an option of some kind.

comment:3 Changed 6 years ago by hgd

I'm sorry, my parentheses didn't line up correctly ... Here's a corrected version:

Index: Mulberry/Sources_Common/Automation/CActionManager.cp
===================================================================
--- Mulberry/Sources_Common/Automation/CActionManager.cp        (revision 94)
+++ Mulberry/Sources_Common/Automation/CActionManager.cp        (working copy)
@@ -985,9 +985,11 @@
        const char* osubject = msgs.front()->GetEnvelope()->GetSubject();
        if (osubject)
        {
-               if (((osubject[0]!='R') && (osubject[0]!='r')) ||
+               if ((((osubject[0]!='R') && (osubject[0]!='r')) ||
                        ((osubject[1]!='E') && (osubject[1]!='e')) ||
-                       (osubject[2]!=':'))
+                       (osubject[2]!=':')) && (((osubject[0]!='A') && (osubject[0]!='a')) ||
+                                                                       ((osubject[1]!='W') && (osubject[1]!='w')) ||
+                                                                       (osubject[2]!=':')))
                        subject += osubject;
                else
                        subject = osubject;
Index: Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp
===================================================================
--- Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp   (revision 94)
+++ Mulberry/Sources_Common/Application/Letter/CLetterWindowCommon.cp   (working copy)
@@ -405,9 +405,11 @@
                const char* subject = theEnv->GetSubject();
                if (subject)
                {
-                       if (((subject[0]!='R') && (subject[0]!='r')) ||
+                       if ((((subject[0]!='R') && (subject[0]!='r')) ||
                                ((subject[1]!='E') && (subject[1]!='e')) ||
-                               (subject[2]!=':'))
+                                (subject[2]!=':')) && (((subject[0]!='A') && (subject[0]!='a')) ||
+                               ((subject[1]!='W') && (subject[1]!='w')) ||
+                               (subject[2]!=':')))
                        {
                                theTxt = "Re: ";
                                theTxt += subject;

Changed 6 years ago by hgd

Patch that uses preferences

Note: See TracTickets for help on using tickets.