From: Steve Brokenshire Date: Wed, 6 Jan 2016 18:08:13 +0000 (+0000) Subject: Improved TEL support. X-Git-Tag: release-0.09~93 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=4f6b7ab45dcd3662217501c23a94bbe97a060509;p=xestiaab%2F.git Improved TEL support. --- diff --git a/source/contacteditor/frmContactEditor-Save.cpp b/source/contacteditor/frmContactEditor-Save.cpp index 65e8715..64baede 100644 --- a/source/contacteditor/frmContactEditor-Save.cpp +++ b/source/contacteditor/frmContactEditor-Save.cpp @@ -1075,8 +1075,20 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) ProcessCaptureStrings(&strAddressFinalValue); - strAddressFinalValue.insert(0, wxT("tel:")); - + if (ContactEditorData.GeneralTelephoneListDataType.find(iter->first) != + ContactEditorData.GeneralTelephoneListDataType.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.GeneralTelephoneListDataType.find(iter->first); + + strAddressFinalValue.insert(0, ":"); + strAddressFinalValue.insert(0, DataTypeIter->second); + + } else { + + strAddressFinalValue.insert(0, "tel:"); + + } + ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, &iter, &strAddressFinalValue, &ContactData, wxT("ALTID"), &ContactEditorData.GeneralTelephoneListAltID, @@ -1098,7 +1110,19 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) ProcessCaptureStrings(&strAddressFinalValue); - strAddressFinalValue.insert(0, wxT("tel:")); + if (ContactEditorData.HomeTelephoneListDataType.find(iter->first) != + ContactEditorData.HomeTelephoneListDataType.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.HomeTelephoneListDataType.find(iter->first); + + strAddressFinalValue.insert(0, ":"); + strAddressFinalValue.insert(0, DataTypeIter->second); + + } else { + + strAddressFinalValue.insert(0, "tel:"); + + } ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, &iter, &strAddressFinalValue, &ContactData, @@ -1121,7 +1145,19 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) ProcessCaptureStrings(&strAddressFinalValue); - strAddressFinalValue.insert(0, wxT("tel:")); + if (ContactEditorData.BusinessTelephoneListDataType.find(iter->first) != + ContactEditorData.BusinessTelephoneListDataType.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.BusinessTelephoneListDataType.find(iter->first); + + strAddressFinalValue.insert(0, ":"); + strAddressFinalValue.insert(0, DataTypeIter->second); + + } else { + + strAddressFinalValue.insert(0, "tel:"); + + } ProcessSaveData(wxT("TEL"), &strValue2, &boolValue2, &boolValue, &iter, &strAddressFinalValue, &ContactData,