X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2FfrmMain.cpp;h=228c7a6c28bb1c9493af3a4fd55afeba761db1df;hp=c32e61dca8975ce2dc1ad5f5437fabe7392a7dc7;hb=555c893cfd58230b494c33bbfedc1daaf9ca3a77;hpb=0275a73f31efad4ca385a93be173b2cc6921d18d diff --git a/source/frmMain.cpp b/source/frmMain.cpp index c32e61d..228c7a6 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -737,8 +737,6 @@ void frmMain::LoadContactList( wxTreeEvent& event ) // Split the name into sections. - vCardDataString = Person.Get(wxT("N")); - vCardName NameData = Person.GetName(); vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname; @@ -1715,19 +1713,40 @@ void frmMain::UpdateContactList(wxCommandEvent& event){ // First Name, Last Name. - lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname); + if (ucd->ContactNameArray.Forename == wxT("") && ucd->ContactNameArray.Surname == wxT("")) + { + lstContacts->SetItem(longSelected, 0, ucd->ContactName); + } + else + { + lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Forename + wxT(" ") + ucd->ContactNameArray.Surname); + } } else if (SortMode == 2){ // Last Name, First Name. - - lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename); + + if (ucd->ContactNameArray.Forename == wxT("") && ucd->ContactNameArray.Surname == wxT("")) + { + lstContacts->SetItem(longSelected, 0, wxT(", ") + ucd->ContactName); + } + else + { + lstContacts->SetItem(longSelected, 0, ucd->ContactNameArray.Surname + wxT(", ") + ucd->ContactNameArray.Forename); + } } else if (SortMode == 3){ // Nickname. - lstContacts->SetItem(longSelected, 0, ucd->ContactNickname); + if (ucd->ContactNickname == wxT("")) + { + lstContacts->SetItem(longSelected, 0, _("(no nickname)")); + } + else + { + lstContacts->SetItem(longSelected, 0, ucd->ContactNickname); + } } else if (SortMode == 4){