massive changes to waf build scripts so that nearly everything "should" be working...
[ardour.git] / gtk2_ardour / export_dialog.cc
index 86263c8d3f18d89fd2141171fd0404395e375a2d..fd39aca3355e105b1303a408cfa48a155bfcf17b 100644 (file)
 
 #include <sigc++/signal.h>
 
-#include <pbd/filesystem.h>
+#include "pbd/filesystem.h"
 
-#include <ardour/export_status.h>
-#include <ardour/export_handler.h>
+#include "ardour/export_status.h"
+#include "ardour/export_handler.h"
 
 using namespace ARDOUR;
 using namespace PBD;
@@ -115,9 +115,11 @@ ExportDialog::init ()
        /* Buttons */
        
        cancel_button = add_button (Gtk::Stock::CANCEL, RESPONSE_CANCEL);
-       rt_export_button = add_button (_("Realtime export"), RESPONSE_RT);
+       rt_export_button = add_button (_("Realtime Export"), RESPONSE_RT);
        fast_export_button = add_button (_("Fast Export"), RESPONSE_FAST);
        
+       list_files_button.set_name ("PaddedButton");
+       
        cancel_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::close_dialog));
        rt_export_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::export_rt));
        fast_export_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportDialog::export_fw));
@@ -137,14 +139,14 @@ ExportDialog::init_gui ()
        get_vbox()->pack_start (*preset_align, false, false, 0);
        
        Gtk::Alignment * timespan_align = Gtk::manage (new Gtk::Alignment());
-       Gtk::Label * timespan_label = Gtk::manage (new Gtk::Label (_("Time Span"), Gtk::ALIGN_LEFT));
+       timespan_label = Gtk::manage (new Gtk::Label (_("Time Span"), Gtk::ALIGN_LEFT));
        timespan_align->add (*timespan_selector);
        timespan_align->set_padding (0, 12, 18, 0);
        get_vbox()->pack_start (*timespan_label, false, false, 0);
        get_vbox()->pack_start (*timespan_align, false, false, 0);
        
        Gtk::Alignment * channels_align = Gtk::manage (new Gtk::Alignment());
-       Gtk::Label * channels_label = Gtk::manage (new Gtk::Label (_("Channels"), Gtk::ALIGN_LEFT));
+       channels_label = Gtk::manage (new Gtk::Label (_("Channels"), Gtk::ALIGN_LEFT));
        channels_align->add (*channel_selector);
        channels_align->set_padding (0, 12, 18, 0);
        get_vbox()->pack_start (*channels_label, false, false, 0);
@@ -166,8 +168,8 @@ void
 ExportDialog::init_components ()
 {
        preset_selector.reset (new ExportPresetSelector ());
-       timespan_selector.reset (new ExportTimespanSelectorMultiple ());
-       channel_selector.reset (new PortExportChannelSelector ());
+       timespan_selector.reset (new ExportTimespanSelectorMultiple (session, profile_manager));
+       channel_selector.reset (new PortExportChannelSelector (session, profile_manager));
        file_notebook.reset (new ExportFileNotebook ());
 }
 
@@ -196,8 +198,8 @@ ExportDialog::close_dialog ()
 void
 ExportDialog::sync_with_manager ()
 {
-       timespan_selector->set_state (profile_manager->get_timespans().front(), session);
-       channel_selector->set_state (profile_manager->get_channel_configs().front(), session);
+       timespan_selector->sync_with_manager();
+       channel_selector->sync_with_manager();
        file_notebook->sync_with_manager ();
 
        update_warnings ();
@@ -232,7 +234,7 @@ ExportDialog::update_warnings ()
        if (!warnings->conflicting_filenames.empty()) {
                list_files_hbox.show ();
                for (std::list<Glib::ustring>::iterator it = warnings->conflicting_filenames.begin(); it != warnings->conflicting_filenames.end(); ++it) {
-                       ustring::size_type pos = it->find_last_of ("/");
+                       Glib::ustring::size_type pos = it->find_last_of ("/");
                        list_files_string += "\n" + it->substr (0, pos + 1) + "<b>" + it->substr (pos + 1) + "</b>";
                }
        }
@@ -361,8 +363,8 @@ void
 ExportRangeDialog::init_components ()
 {
        preset_selector.reset (new ExportPresetSelector ());
-       timespan_selector.reset (new ExportTimespanSelectorSingle (range_id));
-       channel_selector.reset (new PortExportChannelSelector ());
+       timespan_selector.reset (new ExportTimespanSelectorSingle (session, profile_manager, range_id));
+       channel_selector.reset (new PortExportChannelSelector (session, profile_manager));
        file_notebook.reset (new ExportFileNotebook ());
 }
 
@@ -374,8 +376,8 @@ void
 ExportSelectionDialog::init_components ()
 {
        preset_selector.reset (new ExportPresetSelector ());
-       timespan_selector.reset (new ExportTimespanSelectorSingle (X_("selection")));
-       channel_selector.reset (new PortExportChannelSelector ());
+       timespan_selector.reset (new ExportTimespanSelectorSingle (session, profile_manager, X_("selection")));
+       channel_selector.reset (new PortExportChannelSelector (session, profile_manager));
        file_notebook.reset (new ExportFileNotebook ());
 }
 
@@ -385,13 +387,21 @@ ExportRegionDialog::ExportRegionDialog (PublicEditor & editor, ARDOUR::AudioRegi
   track (track)
 {}
 
+void
+ExportRegionDialog::init_gui ()
+{
+       ExportDialog::init_gui ();
+       
+       channels_label->set_text (_("Source"));
+}
+
 void
 ExportRegionDialog::init_components ()
 {
        Glib::ustring loc_id = profile_manager->set_single_range (region.position(), region.position() + region.length(), region.name());
 
        preset_selector.reset (new ExportPresetSelector ());
-       timespan_selector.reset (new ExportTimespanSelectorSingle (loc_id));
-       channel_selector.reset (new RegionExportChannelSelector (region, track));
+       timespan_selector.reset (new ExportTimespanSelectorSingle (session, profile_manager, loc_id));
+       channel_selector.reset (new RegionExportChannelSelector (session, profile_manager, region, track));
        file_notebook.reset (new ExportFileNotebook ());
 }