diff options
author | Vojtech Kral <vojtech@kral.hk> | 2018-12-19 20:43:03 +0300 |
---|---|---|
committer | Vojtech Kral <vojtech@kral.hk> | 2018-12-19 20:49:34 +0300 |
commit | 3b2c28fa89994230b86a0eb6e681d3ab670e3e6e (patch) | |
tree | 10c5c6ba8529d30296521bf3450f200f4df07d86 /src/slic3r/GUI/PrintHostDialogs.cpp | |
parent | c40b8aba2410e09984d9025c383e10287955e7a6 (diff) |
Printhost: Polish error handling, bugfixes
Diffstat (limited to 'src/slic3r/GUI/PrintHostDialogs.cpp')
-rw-r--r-- | src/slic3r/GUI/PrintHostDialogs.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp index 8ac8615a8..586fe3d83 100644 --- a/src/slic3r/GUI/PrintHostDialogs.cpp +++ b/src/slic3r/GUI/PrintHostDialogs.cpp @@ -102,7 +102,7 @@ PrintHostQueueDialog::PrintHostQueueDialog(wxWindow *parent) job_list->AppendTextColumn("Filename", wxDATAVIEW_CELL_INERT); auto *btnsizer = new wxBoxSizer(wxHORIZONTAL); - auto *btn_cancel = new wxButton(this, wxID_DELETE, _(L("Cancel selected"))); + auto *btn_cancel = new wxButton(this, wxID_DELETE, _(L("Cancel selected"))); // TODO: enable based on status ("show error" for failed jobs) auto *btn_close = new wxButton(this, wxID_CANCEL, _(L("Close"))); btnsizer->Add(btn_cancel, 0, wxRIGHT, SPACING); btnsizer->AddStretchSpacer(); @@ -140,7 +140,13 @@ void PrintHostQueueDialog::on_error(Event &evt) { wxCHECK_RET(evt.job_id < job_list->GetItemCount(), "Out of bounds access to job list"); - // TODO + job_list->SetValue(wxVariant(0), evt.job_id, 1); + job_list->SetValue(wxVariant(_(L("Error"))), evt.job_id, 2); + + // TODO: keep the error for repeated display + + auto errormsg = wxString::Format("%s\n%s", _(L("Error uploading to print host:")), evt.error); + GUI::show_error(nullptr, std::move(errormsg)); } |