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

index 893b173..7662418 100644 (file)
@@ -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<int,wxString>::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<int,wxString>::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<int,wxString>::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<int,wxString>::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<int,wxString>::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,
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