Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated TEL processing when saving a contact with frmContactEditor
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 10 Jan 2016 21:44:16 +0000 (21:44 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 10 Jan 2016 21:44:16 +0000 (21:44 +0000)
source/contacteditor/frmContactEditor-Save.cpp

index 0add4b5..893b173 100644 (file)
@@ -1155,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);
 
@@ -1172,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 );
         
@@ -1206,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 );
         
@@ -1241,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