minor fixes/changes based on comparison with existing bindings
[ardour.git] / gtk2_ardour / export_range_markers_dialog.cc
index 1184294a6712e6f5fd6314f80ade182486650ba9..df612a340d1a6df22e3fd1544eb04e61a1bda64f 100644 (file)
@@ -22,8 +22,8 @@
 
 #include <sstream>
 
-#include <ardour/audioengine.h>
-#include <ardour/sndfile_helpers.h>
+#include "ardour/audioengine.h"
+#include "ardour/sndfile_helpers.h"
 
 #include "ardour_ui.h"
 #include "export_range_markers_dialog.h"
@@ -54,7 +54,7 @@ ExportRangeMarkersDialog::browse_action () const
 }
        
 void 
-ExportRangeMarkersDialog::export_audio_data ()
+ExportRangeMarkersDialog::export_data ()
 {
        getSession().locations()->apply(*this, &ExportRangeMarkersDialog::process_range_markers_export);
 }
@@ -81,9 +81,7 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
                        spec.start_frame = currentLocation->start();
                        spec.end_frame = currentLocation->end();
 
-                       getSession().request_locate(spec.start_frame, false);
-
-                       if (getSession().start_audio_export(spec)){
+                       if (getSession().start_export(spec)){
                                // if export fails                      
                                return;
                        }
@@ -100,6 +98,8 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
                        }
                        
                        current_range_marker_index++;
+                       
+                       getSession().stop_export (spec);
                }
        }
        
@@ -131,7 +131,6 @@ ExportRangeMarkersDialog::get_target_filepath(string path, string filename, stri
        return target_filepath;
 }
 
-
 bool
 ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
 {
@@ -148,10 +147,10 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
        
        if ( (stat (filepath.c_str(), &statbuf) != 0) || 
                (!S_ISDIR (statbuf.st_mode)) ) {
-                       string txt = _("Please select an existing target directory. Files are not allowed!");
-                       MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
-                       msg.run();
-                       return false;
+               string txt = _("Please select an existing target directory. Files are not allowed!");
+               MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
+               msg.run();
+               return false;
        }
        
        // directory needs to exist and be writable
@@ -166,7 +165,6 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
        return true;
 }
 
-
 void
 ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locations)
 {