Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated TEL processing when saving a contact with frmContactEditor
[xestiaab/.git] / source / contacteditor / frmContactEditor-Save.cpp
index 693c14b..893b173 100644 (file)
@@ -770,14 +770,13 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
             }
             
         }
-        
-    }
     
+    }
+
     // Setup the addresses (General, Home, Business).
     
-    //intValue = GeneralAddressList.size();
     ResetSaveProcessData();
-    
+
     for (std::map<int,wxString>::iterator iter = ContactEditorData.GeneralAddressList.begin();
          iter != ContactEditorData.GeneralAddressList.end(); ++iter){
         
@@ -1156,11 +1155,11 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
          iter != ContactEditorData.GeneralTelephoneList.end(); ++iter){
         
         wxString strAddressFinalValue = iter->second;
+       int DataID = iter->first;
         
         ProcessCaptureStrings(&strAddressFinalValue);
         
-       if (ContactEditorData.GeneralTelephoneListDataType.find(iter->first) != 
-               ContactEditorData.GeneralTelephoneListDataType.end()){
+       if (MapDataExists(&DataID, &ContactEditorData.GeneralTelephoneListDataType)){
        
                std::map<int,wxString>::iterator DataTypeIter = ContactEditorData.GeneralTelephoneListDataType.find(iter->first);
 
@@ -1173,11 +1172,19 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
        
        }
                
+       wxString strAddressTypeInfo;
+       
+       if (MapDataExists(&DataID, &ContactEditorData.GeneralTelephoneListTypeInfo)){
+       
+               strAddressTypeInfo = ContactEditorData.GeneralTelephoneListTypeInfo.find(iter->first)->second;
+       
+       }
+       
         ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
                         &iter, &strAddressFinalValue, &ContactData,
                         wxT("ALTID"), &ContactEditorData.GeneralTelephoneListAltID,
                         wxT("PID"), &ContactEditorData.GeneralTelephoneListPID,
-                        wxT("TYPE"), &ContactEditorData.GeneralTelephoneListType,
+                        wxT("TYPE"), &ContactEditorData.GeneralTelephoneListTypeInfo,
                         wxT("PREF"), &ContactEditorData.GeneralTelephoneListPref,
                         wxT(""), &ContactEditorData.GeneralTelephoneListTokens );
         
@@ -1207,12 +1214,12 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
                strAddressFinalValue.insert(0, "tel:");
        
        }
-        
+       
         ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
                         &iter, &strAddressFinalValue, &ContactData,
                         wxT("ALTID"), &ContactEditorData.HomeTelephoneListAltID,
                         wxT("PID"), &ContactEditorData.HomeTelephoneListPID,
-                        wxT("TYPE"), &ContactEditorData.HomeTelephoneListType,
+                        wxT("TYPE"), &ContactEditorData.HomeTelephoneListTypeInfo,
                         wxT("PREF"), &ContactEditorData.HomeTelephoneListPref,
                         wxT(""), &ContactEditorData.HomeTelephoneListTokens );
         
@@ -1242,12 +1249,12 @@ void frmContactEditor::SaveContact( wxCommandEvent& event )
                strAddressFinalValue.insert(0, "tel:");
        
        }
-        
+       
         ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue,
                         &iter, &strAddressFinalValue, &ContactData,
                         wxT("ALTID"), &ContactEditorData.BusinessTelephoneListAltID,
                         wxT("PID"), &ContactEditorData.BusinessTelephoneListPID,
-                        wxT("TYPE"), &ContactEditorData.BusinessTelephoneListType,
+                        wxT("TYPE"), &ContactEditorData.BusinessTelephoneListTypeInfo,
                         wxT("PREF"), &ContactEditorData.BusinessTelephoneListPref,
                         wxT(""), &ContactEditorData.BusinessTelephoneListTokens );
         
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