From 915fb6f01794ecfe134e719d90da21add857844b Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 10 Jan 2016 21:45:38 +0000 Subject: [PATCH] Updated IMPP support when saving a contact in frmContactEditor --- .../contacteditor/frmContactEditor-Save.cpp | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/source/contacteditor/frmContactEditor-Save.cpp b/source/contacteditor/frmContactEditor-Save.cpp index 893b173..7662418 100644 --- a/source/contacteditor/frmContactEditor-Save.cpp +++ b/source/contacteditor/frmContactEditor-Save.cpp @@ -1101,10 +1101,28 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) intValue2 = iter->first; + wxString strIMFinalValue = iter->second; + + ProcessCaptureStrings(&strIMFinalValue); + + if (ContactEditorData.GeneralIMListTypeInfo.find(iter->first) != + ContactEditorData.GeneralIMListTypeInfo.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.GeneralIMListTypeInfo.find(iter->first); + + strIMFinalValue.insert(0, ":"); + strIMFinalValue.insert(0, DataTypeIter->second); + + } else { + + strIMFinalValue.insert(0, "none:"); + + } + // Process Alternative ID. ProcessSaveData(wxT("IMPP"), &strValue2, &boolValue2, &boolValue, - &iter, &ContactEditorData.GeneralIMList, &ContactData, + &iter, &strIMFinalValue, &ContactData, wxT("ALTID"), &ContactEditorData.GeneralIMListAltID, wxT("PID"), &ContactEditorData.GeneralIMListPID, wxT("MEDIATYPE"), &ContactEditorData.GeneralIMListMediatype, @@ -1120,6 +1138,24 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) for (std::map::iterator iter = ContactEditorData.HomeIMList.begin(); iter != ContactEditorData.HomeIMList.end(); ++iter){ + wxString strIMFinalValue = iter->second; + + ProcessCaptureStrings(&strIMFinalValue); + + if (ContactEditorData.HomeIMListTypeInfo.find(iter->first) != + ContactEditorData.HomeIMListTypeInfo.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.HomeIMListTypeInfo.find(iter->first); + + strIMFinalValue.insert(0, ":"); + strIMFinalValue.insert(0, DataTypeIter->second); + + } else { + + strIMFinalValue.insert(0, "none:"); + + } + ProcessSaveData(wxT("IMPP;TYPE=home"), &strValue2, &boolValue2, &boolValue, &iter, &ContactEditorData.HomeIMList, &ContactData, wxT("ALTID"), &ContactEditorData.HomeIMListAltID, @@ -1137,6 +1173,24 @@ void frmContactEditor::SaveContact( wxCommandEvent& event ) for (std::map::iterator iter = ContactEditorData.BusinessIMList.begin(); iter != ContactEditorData.BusinessIMList.end(); ++iter){ + wxString strIMFinalValue = iter->second; + + ProcessCaptureStrings(&strIMFinalValue); + + if (ContactEditorData.BusinessIMListTypeInfo.find(iter->first) != + ContactEditorData.BusinessIMListTypeInfo.end()){ + + std::map::iterator DataTypeIter = ContactEditorData.BusinessIMListTypeInfo.find(iter->first); + + strIMFinalValue.insert(0, ":"); + strIMFinalValue.insert(0, DataTypeIter->second); + + } else { + + strIMFinalValue.insert(0, "none:"); + + } + ProcessSaveData(wxT("IMPP;TYPE=work"), &strValue2, &boolValue2, &boolValue, &iter, &ContactEditorData.BusinessIMList, &ContactData, wxT("ALTID"), &ContactEditorData.BusinessIMListAltID, -- 2.39.5