From: Steve Brokenshire Date: Sun, 6 Mar 2016 17:23:04 +0000 (+0000) Subject: Get FN by using vCard::GetByPartial instead of vCard::Get. X-Git-Tag: release-0.10~6 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=735fd842be7625b7fc4d65832dff8e33f6fb463b Get FN by using vCard::GetByPartial instead of vCard::Get. Affects frmContact::SetupContactData(vCard*) and LoadContactData from getcontactinfo.cpp --- diff --git a/source/common/getcontactinfo.cpp b/source/common/getcontactinfo.cpp index c9e2256..dfd357f 100644 --- a/source/common/getcontactinfo.cpp +++ b/source/common/getcontactinfo.cpp @@ -133,11 +133,19 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, // Name (Display As) + ArrayvCardOutData FNList; + FNList = vCardObj->GetByPartial(wxT("FN")); + PageData.append(wxT("")); PageData.append(wxT("")); PageData.append(wxT("")); PageData.append(wxT("
")); PageData.append(wxT("

")); - PageData.append(vCardObj->Get(wxT("FN"))); + + if (FNList.PropCount > 0){ + FNList.PropValues[0].Trim(); + PageData.append(FNList.PropValues[0]); + } + PageData.append(wxT("

")); PageData.append(wxT("
")); diff --git a/source/frmContact.cpp b/source/frmContact.cpp index 2bd4585..ed8f2fb 100644 --- a/source/frmContact.cpp +++ b/source/frmContact.cpp @@ -114,6 +114,13 @@ bool frmContact::SetupContactData(vCard *vCardObj){ SessionID = wxString::Format(wxT("%i"), rand() % 32768); LoadContactData(vCardObj, htmContactData, SessionID, OldSessionID, MemoryFSListPtr); SetTitle(vCardObj->Get(wxT("FN"))); + ArrayvCardOutData FNList; + FNList = vCardObj->GetByPartial(wxT("FN")); + + if (FNList.PropCount > 0){ + FNList.PropValues[0].Trim(); + SetTitle(FNList.PropValues[0]); + } WindowData *WData = new WindowData;