Update of /cvsroot/mahogany/M/src/adb
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7889/src/adb

Modified Files:
        Collect.cpp 
Log Message:
removed deprecated address-parsing functions from Message and replaced them 
with Address class methods

Index: Collect.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/Collect.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -b -u -2 -r1.21 -r1.22
--- Collect.cpp 15 May 2005 21:16:51 -0000      1.21
+++ Collect.cpp 23 Jun 2006 23:27:30 -0000      1.22
@@ -411,13 +411,19 @@
 
          // create all entries in this group
+         size_t saved = 0;
          for ( size_t n = 0; n < count; n++ )
          {
-            wxString addr = addresses[selections[n]];
-            wxString name = Message::GetNameFromAddress(addr),
-                     email = Message::GetEMailFromAddress(addr);
+            AddressList_obj addrList(addresses[selections[n]]);
 
-            if ( name.empty() || (name == email) )
+            for ( Address *addr = addrList->GetFirst();
+                  addr;
+                  addr = addrList->GetNext(addr) )
             {
-               name = email.BeforeFirst('@');
+               String name = addr->GetName(),
+                      email = addr->GetEMail();
+
+               if ( name.empty() || name == email )
+               {
+                  name = addr->GetMailbox();
             }
 
@@ -426,7 +432,10 @@
             entry->SetField(AdbField_FullName, name);
             entry->SetField(AdbField_EMail, email);
+
+               saved++;
+            }
          }
 
-         wxLogStatus(parent, _("Saved %u addresses."), count);
+         wxLogStatus(parent, _("Saved %u addresses."), saved);
        }
        //else: cancelled


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to