Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated TEL support in ContactDataObject
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 10 Jan 2016 21:38:47 +0000 (21:38 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 10 Jan 2016 21:38:47 +0000 (21:38 +0000)
source/contacteditor/cdo/ContactDataObject.cpp

index 667c8df..e715a2d 100644 (file)
@@ -2082,6 +2082,7 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
                        TypeSplitLength.insert(std::make_pair(intSplitsFound, intSplitSize));                                                           
                
                        int intTypeSeek = 0;
+                       bool TypeFound = FALSE;
                
                        for (std::map<int, int>::iterator typeiter = TypeSplitPoints.begin(); 
                        typeiter != TypeSplitPoints.end(); ++typeiter){
@@ -2101,17 +2102,22 @@ void ContactDataObject::ProcessTelephone(wxString PropertySeg1, wxString Propert
                                
                                }
 
-                               if (TypePropertyName == wxT("home")){
+                               if (TypePropertyName == wxT("home") && TypeFound == FALSE){
                                
                                        PropType = PROPERTY_HOME;
+                                       TelTypeUI.Append("home");
+                                       intTypeSeek++;
+                                       TypeFound = TRUE;
                                
-                               } else if (TypePropertyName == wxT("work")){
+                               } else if (TypePropertyName == wxT("work") && TypeFound == FALSE){
                                
                                        PropType = PROPERTY_WORK;
-                                                                       
+                                       TelTypeUI.Append("work");
+                                       intTypeSeek++;
+                                       TypeFound = TRUE;
+                                               
                                }
                                
-                               
                                if (TypePropertyName == wxT("text")){
                                
                                        TelTypeUI.Append(_("text"));
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy