[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [patch] Reply matching forward
From:       David Bishop <tech () bishop ! dhs ! org>
Date:       2003-01-15 21:27:21
[Download RAW message or body]

My boss wants the string at the top of replies to include the complete To: and 
Cc: line of the original email, like forwarding an email creates.  Patch is 
attached to do just that.  It would be more work to make something like %C 
that could be used in the "Phrases" configuration, so we basically cut and 
pasted the Forward Message code, and changed it to "Reply Message".  To see 
how it works, put "Reply Message" in the phrase box.  This brings the two 
actions (reply and forward) into parity and doesn't change any i18n strings, 
thus is eligible for inclusion in 3.1.1, right?  Diff based off of 
KDE_3_1_BRANCH.
-- 
"Yousa steala precious from meesa!" - Jar-Jaromir

D.A.Bishop
["kmailreply.patch" (text/x-diff)]

Index: kmmessage.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmessage.cpp,v
retrieving revision 1.337.2.7
diff -r1.337.2.7 kmmessage.cpp
1044a1045,1049
>   if ( sReplyStr == "Reply Message" )
> 	  sReplyStr = QString::fromUtf8(createReplyBody());
>   if ( sReplyAllStr == "Reply Message" )
> 	  sReplyAllStr = QString::fromUtf8(createReplyBody());
> 
1222a1228,1255
> //-----------------------------------------------------------------------------
> QCString KMMessage::createReplyBody(void)
> {
>   QString s;
>   QCString str;
> 
>   if (sHdrStyle == KMReaderWin::HdrAll) {
>     s = "\n\n----------  " + sReplyStr + "  ----------\n\n";
>     s += headerAsString();
>     str = asQuotedString(s, "", QString::null, false, false);
>     str += "\n-------------------------------------------------------\n";
>   } else {
>     s = "\n\n----------  " + sReplyStr + "  ----------\n\n";
>     s += "Subject: " + subject() + "\n";
>     s += "Date: "
>          + KMime::DateFormatter::formatDate( KMime::DateFormatter::Localized,
>                                              date(), sReplyLanguage, false )
>          + "\n";
>     s += "From: " + from() + "\n";
>     s += "To: " + to() + "\n";
>     if (!cc().isEmpty()) s += "Cc: " + cc() + "\n";
>     s += "\n";
>     str = asQuotedString(s, "", QString::null, false, false);
>     str += "\n-------------------------------------------------------\n";
>   }
> 
>   return str;
> }
Index: kmmessage.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmmessage.h,v
retrieving revision 1.109.2.1
diff -r1.109.2.1 kmmessage.h
138a139,141
>   /** Create the reply body for the message. */
>   virtual QCString createReplyBody(void);
> 

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic