Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added KIND to the SaveString function of ContactDataObject
[xestiaab/.git] / source / contacteditor / cdo / ContactDataObject-Save.cpp
index 2a436cb..73fb904 100644 (file)
@@ -41,10 +41,45 @@ ContactSaveStatus ContactDataObject::SaveString(wxString *SaveData){
        SaveData->Append(wxT("//KW\n"));
        
 #endif
+
+       wxString ProcessData = "";
+
+       // Process UID.
+
+       if (UIDToken.size() > 0){
+               
+               ProcessData.Append("UID:");
+               ProcessData.Append(UIDToken);
+               ProcessData.Append("\n");
+               SaveData->Append(ProcessData);
+               ProcessData.clear();
+               
+       }
        
-       // Process FN.
+       // Process KIND.
        
-       wxString ProcessData = "";
+       switch(ContactKind){
+
+               case CONTACTKIND_NONE:
+                       break;
+               case CONTACTKIND_INDIVIDUAL:
+                       SaveData->Append("KIND:individual\n");
+                       break;
+               case CONTACTKIND_GROUP:
+                       SaveData->Append("KIND:group\n");
+                       break;
+               case CONTACTKIND_ORGANISATION:
+                       SaveData->Append("KIND:org\n");
+                       break;
+               case CONTACTKIND_LOCATION:
+                       SaveData->Append("KIND:location\n");
+                       break;
+               default:
+                       break;
+               
+       }
+
+       // Process FN.
        
        for (std::map<int, wxString>::iterator FNIter = FullNamesList.begin();
                FNIter != FullNamesList.end(); FNIter++){
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