add some more hand-holding language to the startup assistant
[ardour.git] / gtk2_ardour / export_range_markers_dialog.cc
index f5c6c916d1ad2c1b9c6b5eff0a8aefdda820970d..c6bf578a329dc947c1b796c09ee2c13d73b13090 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <sstream>
 
+#include "pbd/filesystem.h"
+
 #include "ardour/audioengine.h"
 #include "ardour/sndfile_helpers.h"
 
@@ -74,7 +76,7 @@ ExportRangeMarkersDialog::process_range_markers_export(Locations::LocationList&
                        string filepath = get_target_filepath(
                                get_selected_file_name(),
                                currentLocation->name(),
-                               sndfile_file_ending_from_string(get_selected_header_format()));
+                               get_selected_header_format());
 
                        initSpec(filepath);
 
@@ -155,7 +157,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
 
        // directory needs to exist and be writable
        string dirpath = Glib::path_get_dirname (filepath);
-       if (::access (dirpath.c_str(), W_OK) != 0) {
+       if (!exists_and_writable (sys::path (dirpath))) {
                string txt = _("Cannot write file in: ") + dirpath;
                MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
                msg.run();
@@ -171,7 +173,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
        // flush vector
        range_markers_durations_aggregated.resize(0);
 
-       nframes_t duration_before_current_location = 0;
+       framecnt_t duration_before_current_location = 0;
        Locations::LocationList::iterator locationIter;
 
        for (locationIter = locations.begin(); locationIter != locations.end(); ++locationIter) {
@@ -180,7 +182,7 @@ ExportRangeMarkersDialog::init_progress_computing(Locations::LocationList& locat
                if(currentLocation->is_range_marker()){
                        range_markers_durations_aggregated.push_back (duration_before_current_location);
 
-                       nframes_t duration = currentLocation->end() - currentLocation->start();
+                       framecnt_t duration = currentLocation->end() - currentLocation->start();
 
                        range_markers_durations.push_back (duration);
                        duration_before_current_location += duration;