new cs translation from Pavel Frich
[ardour.git] / gtk2_ardour / editor_export_audio.cc
index 59109c508eac545a8575614386b45c418a982b33..3fb4a4b3276ead27ffe8fdc7a1efdf60e182d02e 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <gtkmm/messagedialog.h>
 
+#include "gtkmm2ext/choice.h"
+
 #include "export_dialog.h"
 #include "editor.h"
 #include "public_editor.h"
@@ -57,7 +59,15 @@ using namespace Gtk;
 void
 Editor::export_audio ()
 {
-       ExportDialog dialog (*this, _("Export"));
+       ExportDialog dialog (*this, _("Export"), X_("ExportProfile"));
+       dialog.set_session (_session);
+       dialog.run();
+}
+
+void
+Editor::stem_export ()
+{
+       StemExportDialog dialog (*this);
        dialog.set_session (_session);
        dialog.run();
 }
@@ -135,22 +145,21 @@ Editor::write_region_selection (RegionSelection& regions)
 }
 
 void
-Editor::bounce_region_selection ()
+Editor::bounce_region_selection (bool with_processing)
 {
+       /* no need to check for bounceable() because this operation never puts
+        * its results back in the playlist (only in the region list).
+        */
+
        for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
 
                boost::shared_ptr<Region> region ((*i)->region());
                RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
-               Track* track = dynamic_cast<Track*>(rtv->route().get());
+               boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track> (rtv->route());
 
                InterThreadInfo itt;
 
-               boost::shared_ptr<Region> r = track->bounce_range (region->position(), region->position() + region->length(), itt);
-               cerr << "Result of bounce of "
-                    << region->name() << " len = " << region->length()
-                    << " was "
-                    << r->name() << " len = " << r->length()
-                    << endl;
+               boost::shared_ptr<Region> r = track->bounce_range (region->position(), region->position() + region->length(), itt, with_processing);
        }
 }
 
@@ -195,7 +204,7 @@ Editor::write_region (string path, boost::shared_ptr<AudioRegion> region)
 
                                path = s;
 
-                               if (::access (path.c_str(), F_OK) != 0) {
+                               if (!Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
                                        break;
                                }
                        }
@@ -334,7 +343,7 @@ Editor::write_audio_range (AudioPlaylist& playlist, const ChanCount& count, list
                                          legalize_for_path(playlist.name()).c_str(), cnt, n);
                        }
 
-                       if (::access (s, F_OK) != 0) {
+                       if (!Glib::file_test (s, Glib::FILE_TEST_EXISTS)) {
                                break;
                        }
                }