Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Get FN by using vCard::GetByPartial instead of vCard::Get.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 6 Mar 2016 17:23:04 +0000 (17:23 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 6 Mar 2016 17:23:04 +0000 (17:23 +0000)
Affects frmContact::SetupContactData(vCard*) and LoadContactData from
getcontactinfo.cpp

source/common/getcontactinfo.cpp
source/frmContact.cpp

index c9e2256..dfd357f 100644 (file)
@@ -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("<table style=\"background: #cccccc; width: 100%\">"));
        PageData.append(wxT("<tr>"));
        PageData.append(wxT("<td style=\"width:100%\">"));
        PageData.append(wxT("<h2>"));
-       PageData.append(vCardObj->Get(wxT("FN")));
+       
+       if (FNList.PropCount > 0){
+               FNList.PropValues[0].Trim();
+               PageData.append(FNList.PropValues[0]);
+       }
+       
        PageData.append(wxT("</h2>"));
        PageData.append(wxT("</td>"));
        PageData.append(wxT("<td style=\"width: 200px;\">"));
index 2bd4585..ed8f2fb 100644 (file)
@@ -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;
 
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