X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Fgetcontactinfo.cpp;h=c9e22561a246ddcdea3e80c8501073a30a41a3a5;hb=b3c6e1e0d266bddfff1b817633edc77c1c6109f6;hp=6c56df3b616e16a0d2c006b4b85727a156758072;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git diff --git a/source/common/getcontactinfo.cpp b/source/common/getcontactinfo.cpp index 6c56df3..c9e2256 100644 --- a/source/common/getcontactinfo.cpp +++ b/source/common/getcontactinfo.cpp @@ -1,3 +1,21 @@ +// getcontactinfo.cpp - Contact Information subroutines. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + #include #include #include @@ -20,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); @@ -104,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. @@ -399,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; } @@ -413,9 +437,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount > 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -424,9 +448,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -435,9 +459,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -446,9 +470,9 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, if (ContactData.PropCount >= 1){ - PageData.append(wxT("\""));")); + TypePageData.append(wxT("\""));")); AddBreak = TRUE; } @@ -457,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("

")); @@ -508,6 +540,8 @@ void LoadContactData(vCard *vCardObj, wxHtmlWindow *HTMLObj, wxString SID, } + PageData.append("
"); + if (DataDisplay == TRUE){ DataLines.Trim(); @@ -1600,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(""));