From 74e50e7fe9ca9b355afdfaad898e6980560edd6f Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 20 Sep 2015 13:05:12 +0100 Subject: [PATCH] Display results for importing contacts. --- source/import/frmImportResults.cpp | 16 ++++++++++++---- source/import/frmImportResults.h | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/import/frmImportResults.cpp b/source/import/frmImportResults.cpp index 3dc09d4..3280503 100644 --- a/source/import/frmImportResults.cpp +++ b/source/import/frmImportResults.cpp @@ -20,9 +20,11 @@ void frmImportResults::CopyClipboard( wxCommandEvent& event ) wxTextDataObject ResultData; ResultData.SetText(txtResults->GetValue()); - - wxTheClipboard->SetData(&ResultData); + + wxTheClipboard->Clear(); + wxTheClipboard->AddData(&ResultData); wxTheClipboard->Close(); + wxTheClipboard->Flush(); wxMessageBox(_("The results have been copied to the clipboard."), _("Results copied to clipboard")); @@ -39,7 +41,7 @@ void frmImportResults::CloseWindow( wxCommandEvent& event ) this->Close(); } -void frmImportResults::LoadData(std::map *ResultDataInc) +void frmImportResults::LoadData(std::map *ResultDataInc, int ImportCount, int ImportErrorCount) { wxString ResultDataText; @@ -50,5 +52,11 @@ void frmImportResults::LoadData(std::map *ResultDataInc) ResultDataText.Append(iter->second + wxT("\n")); } + + // Display the results in the form. + + txtResults->SetValue(ResultDataText); + lblText->SetLabel(wxString::Format(_("%i contacts imported. %i contacts had errors and could not be imported."), ImportCount, ImportErrorCount)); + +} -} \ No newline at end of file diff --git a/source/import/frmImportResults.h b/source/import/frmImportResults.h index aa7bbab..93fae6a 100644 --- a/source/import/frmImportResults.h +++ b/source/import/frmImportResults.h @@ -20,7 +20,7 @@ class frmImportResults : public frmImportResultsADT public: /** Constructor */ frmImportResults( wxWindow* parent ); - void LoadData(std::map *ResultDataInc); + void LoadData(std::map *ResultDataInc, int ImportCount, int ImportErrorCount); //// end generated class members }; -- 2.39.5