Update of /cvsroot/mahogany/M/src/adb
In directory usw-pr-cvs1:/tmp/cvs-serv30191/src/adb

Modified Files:
        Collect.cpp 
Log Message:
don't ask the user twice whether he wants to autocollect an address if it occurs twice 
in the message headers (e.g. Reply-To: and From:) (bug 594)

Index: Collect.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/Collect.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -2 -r1.15 -r1.16
--- Collect.cpp 8 Sep 2002 20:35:36 -0000       1.15
+++ Collect.cpp 8 Sep 2002 20:41:03 -0000       1.16
@@ -73,8 +73,8 @@
    };
 
-   size_t stopAt = WXSIZEOF(addressTypesToCollect);
-   if (senderOnly) {
-      stopAt = 2;
-   }
+   // the email addresses we have already seen
+   wxArrayString addressesSeen;
+
+   const size_t stopAt = senderOnly ? 2 : WXSIZEOF(addressTypesToCollect);
    for ( size_t n = 0; n < stopAt; n++ )
    {
@@ -87,5 +87,10 @@
             addr = addrList->GetNext(addr) )
       {
-         AutoCollectAddress(addr->GetEMail(),
+         const String email = addr->GetEMail();
+         if ( addressesSeen.Index(email) == wxNOT_FOUND )
+         {
+            addressesSeen.Add(email);
+
+            AutoCollectAddress(email,
                             addr->GetName(),
                             autocollectFlag,
@@ -94,4 +99,5 @@
                             groupName,
                             frame);
+         }
       }
 



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to