Make a copy of the value returned by gettext(). Otherwise a following call will overwrite the previous result.

This commit is contained in:
Moritz Bunkus 2009-03-25 23:35:07 +01:00
parent c298400e46
commit ceebc5be3f
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2009-03-25 Moritz Bunkus <moritz@bunkus.org>
* mmg: bug fix: The job manager's status output was garbled if mmg
was run with another language as English.
* mmg: bug fix: The progress bar for each individual job in the
job dialog wasn't updated if mmg was run with another language as
English.

View File

@ -243,7 +243,7 @@ job_run_dialog::on_end_process(wxProcessEvent &evt) {
int ndx = jobs_to_start[current_job];
int exit_code = evt.GetExitCode();
const wxChar *status;
wxString status;
if (abort) {
jobs[ndx].status = JOBS_ABORTED;
@ -261,8 +261,7 @@ job_run_dialog::on_end_process(wxProcessEvent &evt) {
jobs[ndx].finished_on = wxGetUTCTime();
wxString format = Z("Finished job ID %d on %s: status '%s'");
add_to_log(wxString::Format(format, jobs[ndx].id, format_date_time(jobs[ndx].finished_on).c_str(), status));
add_to_log(wxString::Format(Z("Finished job ID %d on %s: status '%s'"), jobs[ndx].id, format_date_time(jobs[ndx].finished_on).c_str(), status.c_str()));
mdlg->save_job_queue();
delete process;