From 735fd842be7625b7fc4d65832dff8e33f6fb463b Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 6 Mar 2016 17:23:04 +0000 Subject: [PATCH] Get FN by using vCard::GetByPartial instead of vCard::Get. Affects frmContact::SetupContactData(vCard*) and LoadContactData from getcontactinfo.cpp --- source/common/getcontactinfo.cpp | 10 +++++++++- source/frmContact.cpp | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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; -- 2.39.5