Tempo ramps - redraw correctly when changing meter lock style.
[ardour.git] / gtk2_ardour / export_dialog.cc
index 96870428efba03bf2f9c9374168fa31f9136baf0..26e2b9a68887628f64560848f7f491f453784ffc 100644 (file)
 #include "ardour/audioregion.h"
 #include "ardour/export_status.h"
 #include "ardour/export_handler.h"
+#include "ardour/profile.h"
 
 #include "export_dialog.h"
+#include "export_report.h"
 #include "gui_thread.h"
 #include "nag.h"
 
@@ -186,7 +188,7 @@ ExportDialog::notify_errors (bool force)
 void
 ExportDialog::close_dialog ()
 {
-       if (status->running) {
+       if (status->running ()) {
                status->abort();
        }
 
@@ -299,7 +301,7 @@ ExportDialog::do_export ()
 void
 ExportDialog::show_progress ()
 {
-       status->running = true;
+       export_notebook.set_sensitive (false);
 
        cancel_button->set_label (_("Stop Export"));
        export_button->set_sensitive (false);
@@ -312,7 +314,7 @@ ExportDialog::show_progress ()
 
        gtk_main_iteration ();
 
-       while (status->running) {
+       while (status->running ()) {
                if (gtk_events_pending()) {
                        gtk_main_iteration ();
                } else {
@@ -320,19 +322,27 @@ ExportDialog::show_progress ()
                }
        }
 
-       if (!status->aborted()) {
+       status->finish ();
 
-               NagScreen* ns = NagScreen::maybe_nag (_("export"));
+       if (!status->aborted() && status->result_map.size() > 0) {
+               hide();
+               ExportReport er (_session, status);
+               er.run();
+       }
 
-               if (ns) {
-                       ns->nag ();
-                       delete ns;
+       if (!status->aborted()) {
+               hide();
+               if (!ARDOUR::Profile->get_mixbus()) {
+                       NagScreen* ns = NagScreen::maybe_nag (_("export"));
+                       if (ns) {
+                               ns->nag ();
+                               delete ns;
+                       }
                }
        } else {
                notify_errors ();
        }
-
-       status->finish ();
+       export_notebook.set_sensitive (true);
 }
 
 gint