Use ISDCF name as a default export filename (#1584).
[dcpomatic.git] / src / wx / export_dialog.cc
index 68d3706ff7f4b48725535da50951555964348551..804200596c9535911c1b361b6313429980da7e4d 100644 (file)
@@ -25,6 +25,7 @@
 #include <wx/filepicker.h>
 #include <boost/bind.hpp>
 
+using std::string;
 using boost::bind;
 
 #define FORMATS 2
@@ -46,10 +47,10 @@ wxString format_extensions[] = {
 
 ExportFormat formats[] = {
        EXPORT_FORMAT_PRORES,
-       EXPORT_FORMAT_H264,
+       EXPORT_FORMAT_H264_AAC
 };
 
-ExportDialog::ExportDialog (wxWindow* parent)
+ExportDialog::ExportDialog (wxWindow* parent, string name)
        : TableDialog (parent, _("Export film"), 2, 1, true)
 {
        add (_("Format"), true);
@@ -73,6 +74,7 @@ ExportDialog::ExportDialog (wxWindow* parent)
 
        add (_("Output file"), true);
        _file = new FilePickerCtrl (this, _("Select output file"), format_filters[0], false);
+       _file->SetPath (name);
        add (_file);
 
        for (int i = 0; i < FORMATS; ++i) {
@@ -143,5 +145,5 @@ void
 ExportDialog::file_changed ()
 {
        wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
-       ok->Enable (true);
+       ok->Enable (_file->GetPath().Length() > 0);
 }