From: Steve Brokenshire Date: Mon, 28 Dec 2015 20:18:53 +0000 (+0000) Subject: Using ContactDataObject for N. X-Git-Tag: release-0.09~138 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=10578374729faf0e812c1953dee1b539a48ce091;p=xestiaab%2F.git Using ContactDataObject for N. --- diff --git a/source/contacteditor/frmContactEditor-Load.cpp b/source/contacteditor/frmContactEditor-Load.cpp index 2217c94..4049a22 100644 --- a/source/contacteditor/frmContactEditor-Load.cpp +++ b/source/contacteditor/frmContactEditor-Load.cpp @@ -155,6 +155,12 @@ bool frmContactEditor::LoadContact(wxString Filename){ // Process the Gender (GENDER) (frmContactEditor-LoadGender.cpp) LoadGender(&ContactEditorData.Gender, &ContactEditorData.GenderDetails); + + // Process the Name (N) (frmContactEditor-LoadName.cpp) + + LoadName(&ContactEditorData.NameTitle, &ContactEditorData.NameForename, + &ContactEditorData.NameSurname, &ContactEditorData.NameOtherNames, + &ContactEditorData.NameSuffix); for (std::map::iterator iter = ContactFileLines.begin(); iter != ContactFileLines.end(); ++iter){ @@ -275,13 +281,13 @@ bool frmContactEditor::LoadContact(wxString Filename){ LoadFN(wxSPropertySeg1, wxSPropertySeg2, &FNCount, &FNProcessed, &ContactData); - } else if (wxSProperty == wxT("N") && NameProcessed == FALSE){ + }/* else if (wxSProperty == wxT("N") && NameProcessed == FALSE){ // See frmContactEditor-LoadName.cpp LoadN(wxSPropertySeg1, wxSPropertySeg2, &NameProcessed, &ContactData); - } else if (wxSProperty == wxT("NICKNAME")){ + }*/ else if (wxSProperty == wxT("NICKNAME")){ // See frmContactEditor-LoadNickname.cpp diff --git a/source/contacteditor/frmContactEditor-LoadName.cpp b/source/contacteditor/frmContactEditor-LoadName.cpp index 689c50e..c6c5b21 100644 --- a/source/contacteditor/frmContactEditor-LoadName.cpp +++ b/source/contacteditor/frmContactEditor-LoadName.cpp @@ -231,6 +231,18 @@ void frmContactEditor::LoadFN(wxString wxSPropertySeg1, wxString wxSPropertySeg2 } +void frmContactEditor::LoadName(wxString *NameTitle, wxString *NameForename, + wxString *NameSurname, wxString *NameOtherNames, + wxString *NameSuffix){ + + txtTitle->SetValue(*NameTitle); + txtForename->SetValue(*NameForename); + txtSurname->SetValue(*NameSurname); + txtOtherNames->SetValue(*NameOtherNames); + txtSuffix->SetValue(*NameSuffix); + +} + void frmContactEditor::LoadN(wxString wxSPropertySeg1, wxString wxSPropertySeg2, bool *NameProcessed, vCard *ContactData){ diff --git a/source/contacteditor/frmContactEditor.h b/source/contacteditor/frmContactEditor.h index 7ea6461..0457889 100644 --- a/source/contacteditor/frmContactEditor.h +++ b/source/contacteditor/frmContactEditor.h @@ -643,6 +643,9 @@ class frmContactEditor : public frmContactEditorADT void LoadBirthday(wxString *BirthdayData, bool *BirthdayText); void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText); void LoadKind(ContactKindType *KindType); + void LoadName(wxString *NameTitle, wxString *NameForename, + wxString *NameSurname, wxString *NameOtherNames, + wxString *NameSuffix); int intValueSeek = 1; bool IsGroup = FALSE;