From: Steve Brokenshire Date: Sun, 20 Sep 2015 12:05:12 +0000 (+0100) Subject: Display results for importing contacts. X-Git-Tag: release-0.05~76 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=74e50e7fe9ca9b355afdfaad898e6980560edd6f;p=xestiaab%2F.git Display results for importing contacts. --- 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 };