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

List:       kmail-devel
Subject:    Re: [PATCH] Improved Reply-All behaviour
From:       Dirk Mueller <mueller () kde ! org>
Date:       2003-09-12 0:56:45
[Download RAW message or body]

On Friday 12 September 2003 00:50, Ingo Klöcker wrote:

> Veto! I already told you on IRC that I want to have the mailing list
> address in To and the From address in CC if I'm replying-all to a
> mailing-list message. Why? Because in my logic I reply to the
> mailing-list and just CC the sender because he's not subscribed and
> therefore asked me to CC him.

Ok, I improved the patch to implement this behaviour. So you can actually see 
now if you replied to a mail on a mailing list that was CC'ed to you if you 
were replying to it in the mailing list folder or in your inbox. Cute. 

> Another reason is that with the above change I wouldn't be able to
> easily see whether I replied in private only or if I also sent the
> reply to the mailing list because in the recipient column in the
> message list only the To recipients are shown.

Hmm, that really depends on your personal taste on what you consider more 
important. I don't particularly care in that case. 

Here's the fixed patch. 


-- 
> Looking for a KDE-related EMail-Alias ? Get one at kdemail.net for FREE! <

["kmmessage.diff" (text/x-diff)]

Index: kmmessage.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmmessage.cpp,v
retrieving revision 1.423
diff -u -5 -d -p -b -r1.423 kmmessage.cpp
--- kmmessage.cpp	11 Sep 2003 22:50:52 -0000	1.423
+++ kmmessage.cpp	12 Sep 2003 00:55:56 -0000
@@ -1,5 +1,6 @@
+// -*- c-basic-offset: 2 -*-
 // kmmessage.cpp
 
 // if you do not want GUI elements in here then set ALLOW_GUI to 0.
 #include <config.h>
 
@@ -1021,10 +1022,14 @@ KMMessage* KMMessage::createReply( bool 
       if( !mailingListPostAddress.isEmpty() )
         recipients = stripAddressFromAddressList( mailingListPostAddress,
                                                   recipients );
     }
 
+    // if it is a mailing list, add the posting address
+    if ( !mailingListPostAddress.isEmpty() )
+      recipients += mailingListPostAddress;
+
     // add From address if appropriate
     if ( !from().isEmpty() ) {
       if ( !mailingListPostAddress.isEmpty() ) {
         // in case of replying to a mailing list message add the From address
         // to the list of CC recipients if it's not already there
@@ -1042,29 +1047,20 @@ KMMessage* KMMessage::createReply( bool 
         kdDebug(5006) << "Added " << from() << " to the list of recipients"
                       << endl;
       }
     }
 
-    // add only new addresses from the To header to the list of recipients
-    if( !to().isEmpty() ) {
-      QStringList list = splitEmailAddrList( to() );
-      for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
-        if( !addressIsInAddressList( *it, recipients ) ) {
-          recipients += *it;
-          kdDebug(5006) << "Added " << *it << " to the list of recipients"
-                        << endl;
-        }
-      }
-    }
-
     // strip all my addresses from the list of recipients
     toStr = stripMyAddressesFromAddressList( recipients ).join(", ");
 
-    // the same for the cc field
-    if( !cc().isEmpty() ) {
-      // add only new addresses from the CC header to the list of CC recipients
-      QStringList list = splitEmailAddrList( cc() );
+    // merge To header and CC header into a list of CC recipients
+    if( !cc().isEmpty() || !to().isEmpty() ) {
+      QStringList list;
+      if (!to().isEmpty())
+        list += splitEmailAddrList(to());
+      if (!cc().isEmpty())
+        list += splitEmailAddrList(cc());
       for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
         if(    !addressIsInAddressList( *it, recipients )
             && !addressIsInAddressList( *it, ccRecipients ) ) {
           ccRecipients += *it;
           kdDebug(5006) << "Added " << *it << " to the list of CC recipients"


_______________________________________________
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