Apply patch from mantis 2761 from tinram to add padding and make a string translatable.
[ardour.git] / gtk2_ardour / export_dialog.cc
index c533e4489e0c4c0cdcc24c177cfa231ff9341c07..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;
@@ -168,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 ());
 }
 
@@ -198,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 ();
@@ -234,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>";
                }
        }
@@ -363,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 ());
 }
 
@@ -376,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 ());
 }
 
@@ -401,7 +401,7 @@ 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 ());
 }