X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Finterthread_progress_window.cc;h=eb32d3e8faac27f6a144fcf7bf322090c3b033fe;hb=8c68d3581944104d239d532d8e8cca75097f8b02;hp=2f64644d5d195d819ca6145192e30f7262a9c897;hpb=03660573e28dbc3574d5964cc0392832b8f46557;p=ardour.git diff --git a/gtk2_ardour/interthread_progress_window.cc b/gtk2_ardour/interthread_progress_window.cc index 2f64644d5d..eb32d3e8fa 100644 --- a/gtk2_ardour/interthread_progress_window.cc +++ b/gtk2_ardour/interthread_progress_window.cc @@ -22,7 +22,7 @@ #include "gtkmm2ext/utils.h" #include "ardour/import_status.h" #include "interthread_progress_window.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace Gtk; @@ -35,6 +35,8 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i : ArdourDialog (t, true) , _interthread_info (i) { + _interthread_info->cancel = false; + _bar.set_orientation (Gtk::PROGRESS_LEFT_TO_RIGHT); set_border_width (12); @@ -50,7 +52,6 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i set_default_size (200, 100); show_all (); - hide (); Glib::signal_timeout().connect (sigc::mem_fun (*this, &InterthreadProgressWindow::update), 100); } @@ -58,7 +59,8 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i void InterthreadProgressWindow::on_hide () { - if (!_interthread_info->done) { + if (_interthread_info && !_interthread_info->done) { + //catch user pressing 'esc' or WM close _interthread_info->cancel = true; } }