Fix yet another oversight for the windows icon file update
[ardour.git] / gtk2_ardour / interthread_progress_window.cc
index e63bf629a9e4d012b27ab41dbe0c28503f948d11..c74f12914f3d37a62720e16edee0f44d6af56d09 100644 (file)
@@ -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;
@@ -50,11 +50,21 @@ InterthreadProgressWindow::InterthreadProgressWindow (ARDOUR::InterThreadInfo* i
 
        set_default_size (200, 100);
        show_all ();
-        hide ();
+       hide ();
+       _interthread_info->cancel = false; // override on_hide
 
        Glib::signal_timeout().connect (sigc::mem_fun (*this, &InterthreadProgressWindow::update), 100);
 }
 
+void
+InterthreadProgressWindow::on_hide ()
+{
+       if (_interthread_info && !_interthread_info->done) {
+               //catch user pressing 'esc' or WM close
+               _interthread_info->cancel = true;
+       }
+}
+
 void
 InterthreadProgressWindow::cancel_clicked ()
 {