Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Improved TEL support.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Jan 2016 18:08:13 +0000 (18:08 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 6 Jan 2016 18:08:13 +0000 (18:08 +0000)
source/contacteditor/frmContactEditor-Save.cpp

index 65e8715..64baede 100644 (file)
@@ -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<int,wxString>::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<int,wxString>::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<int,wxString>::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,
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