From 9a87e12840aee2d9f0b457ffce720aa4e7b9909c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 11 Oct 2003 11:26:45 +0000 Subject: [PATCH] Fixed the "abort" button under Windows. --- ChangeLog | 5 +++++ src/mmg/mux_dialog.cpp | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92afc9e6d..2fb968c15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-11 Moritz Bunkus + + * mmg: bug fix: The 'abort' button was doing nothing under + Windows. + 2003-10-06 Moritz Bunkus * mmg: bug fix: Audio, video and subtitle track selection was diff --git a/src/mmg/mux_dialog.cpp b/src/mmg/mux_dialog.cpp index 817f8c93d..3ca5d8e44 100644 --- a/src/mmg/mux_dialog.cpp +++ b/src/mmg/mux_dialog.cpp @@ -37,10 +37,11 @@ mux_dialog::mux_dialog(wxWindow *parent): wxDialog(parent, -1, "mkvmerge is running", wxDefaultPosition, #ifdef SYS_WINDOWS - wxSize(500, 560), wxCAPTION) { + wxSize(500, 560), #else - wxSize(500, 520), wxCAPTION) { + wxSize(500, 520), #endif + wxCAPTION) { char c; long value; wxString line, tmp; @@ -183,7 +184,11 @@ void mux_dialog::on_save_log(wxCommandEvent &evt) { } void mux_dialog::on_abort(wxCommandEvent &evt) { - wxKill(pid); +#if defined(SYS_WINDOWS) + wxKill(pid, wxSIGKILL); +#else + wxKill(pid, wxSIGTERM); +#endif } mux_process::mux_process(mux_dialog *mdlg): @@ -197,7 +202,13 @@ void mux_process::OnTerminate(int pid, int status) { s.Printf("mkvmerge %s with a return code of %d. %s\n", (status != 0) && (status != 1) ? "FAILED" : "finished", status, status == 0 ? "Everything went fine." : - status == 1 ? "There were warnings." : "There were ERRORs."); + status == 1 ? "There were warnings" +#if defined(SYS_WINDOWS) + ", or the process was terminated." +#else + "." +#endif + : status == 2 ? "There were ERRORs." : ""); dlg->update_window(s); }