From 36bf10ada85e05f1f9a2d8cb9b7d17c213d63f62 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 24 Feb 2016 11:42:53 +0000 Subject: [PATCH] Formatted contact information page so header is displayed better. --- source/common/getcontactinfo.cpp | 60 +++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/source/common/getcontactinfo.cpp b/source/common/getcontactinfo.cpp index b783d8b..c9e2256 100644 --- a/source/common/getcontactinfo.cpp +++ b/source/common/getcontactinfo.cpp @@ -38,6 +38,8 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, // Show message to user that the contact information is loading. + HTMLObj->SetBorders(0); + wxString PageData; wxFileSystem::AddHandler(new wxMemoryFSHandler); @@ -122,20 +124,23 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, PageData.append(wxT("")); PageData.append(wxT("Contact Information")); PageData.append(wxT("")); + + // Process the CSS section. + PageData.append(wxT("")); // Process the data in the vCard object. // Name (Display As) - PageData.append(wxT("")); + PageData.append(wxT("
")); PageData.append(wxT("")); - PageData.append(wxT("")); - PageData.append(wxT("
")); + PageData.append(wxT("")); PageData.append(wxT("

")); PageData.append(vCardObj->Get(wxT("FN"))); PageData.append(wxT("

")); PageData.append(wxT("
")); + PageData.append(wxT("")); // Define common variables for ADR. @@ -417,12 +422,13 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, ContactData = vCardObj->GetByPartial(wxT("PHOTO")); bool AddBreak = FALSE; + wxString TypePageData; if (ContactData.PropCount > 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -431,9 +437,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount > 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -442,9 +448,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -453,9 +459,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -464,9 +470,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -475,13 +481,21 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } + if (!TypePageData.IsEmpty()){ + + PageData.append("
"); + PageData.append(TypePageData); + PageData.append("
"); + + } + if (AddBreak == TRUE){ PageData.append(wxT("

")); @@ -526,6 +540,8 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, } + PageData.append("
"); + if (DataDisplay == TRUE){ DataLines.Trim(); @@ -1618,6 +1634,8 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, // Display the HTML document on the screen. + PageData.append("
"); + PageData.append(wxT("")); PageData.append(wxT("")); -- 2.39.5