diff options
author | Toni Uhlig <Toni.Uhlig@tq-group.com> | 2017-12-04 16:42:28 +0100 |
---|---|---|
committer | Toni Uhlig <Toni.Uhlig@tq-group.com> | 2017-12-04 16:42:28 +0100 |
commit | 2ddca975244674d457fe2ac07dd62fa3df4374cb (patch) | |
tree | e0cfc76604f32cb26b1d2b142aeb13d253cd317a /src | |
parent | 7cc0baecbee2d0c0c428a2f43c5259fce6ae198e (diff) |
print jobs added by CSV import (StatusBar + StatusLog)
Diffstat (limited to 'src')
-rw-r--r-- | src/UpdateGUI.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/UpdateGUI.cpp b/src/UpdateGUI.cpp index 6176350..5620020 100644 --- a/src/UpdateGUI.cpp +++ b/src/UpdateGUI.cpp @@ -248,7 +248,7 @@ void UpdateGUIFrame::OnUpdateFile(wxCommandEvent& event) void UpdateGUIFrame::OnImportCSV(wxCommandEvent& event) { - int jobid; + size_t jobid, jobcount = 0; std::vector<UpdateFactory*> uf; wxString log; std::vector<std::string> error_list; @@ -264,8 +264,7 @@ void UpdateGUIFrame::OnImportCSV(wxCommandEvent& event) return; } - log = wxString::Format(wxT("CSV File: \"%s\""), openFileDialog.GetPath()); - tLog(RTL_DEFAULT, log); + tLog(RTL_DEFAULT, wxString::Format(wxT("CSV File: \"%s\""), openFileDialog.GetPath())); loadUpdateFactoriesFromCSV(openFileDialog.GetPath(), imgEntry->GetValue(), uf, error_list); for (auto& errstr : error_list) { tLog(RTL_RED, wxString::Format(wxT("CSV read error: \"%s\""), errstr)); @@ -276,8 +275,12 @@ void UpdateGUIFrame::OnImportCSV(wxCommandEvent& event) jobs->AddJob(Job(Job::eID_THREAD_JOB, JobArgs(jobid, *u))); jobid++; delete u; + jobcount++; } - SetStatusText(wxString::Format(wxT("CSV Import %s"), openFileDialog.GetPath())); + + log = wxString::Format(wxT("CSV Import \"%s\": got %u Job(s)"), openFileDialog.GetPath(), jobcount); + tLog(RTL_GREEN, log); + SetStatusText(log); } void UpdateGUIFrame::OnUpdate(wxCommandEvent& event) |