Use ISDCF name as a default export filename (#1584).
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2019 15:49:46 +0000 (16:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2019 15:49:46 +0000 (16:49 +0100)
src/tools/dcpomatic.cc
src/wx/export_dialog.cc
src/wx/export_dialog.h

index d3cd2b06b64284c9ec2ed7aa57cd8b4e2ef89eed..331e2995af5d45edc116b0fd5c464994dcb22a10 100644 (file)
@@ -908,7 +908,7 @@ private:
 
        void jobs_export ()
        {
-               ExportDialog* d = new ExportDialog (this);
+               ExportDialog* d = new ExportDialog (this, _film->isdcf_name(true));
                if (d->ShowModal() == wxID_OK) {
                        shared_ptr<TranscodeJob> job (new TranscodeJob (_film));
                        job->set_encoder (
index e90686216665a498336fbc8f8e39c07a690b74b3..804200596c9535911c1b361b6313429980da7e4d 100644 (file)
@@ -25,6 +25,7 @@
 #include <wx/filepicker.h>
 #include <boost/bind.hpp>
 
+using std::string;
 using boost::bind;
 
 #define FORMATS 2
@@ -49,7 +50,7 @@ ExportFormat formats[] = {
        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) {
index 509cd60e9221b6f31ea780257c3e4a7ef6bfbf10..3314e22da16773fc828126f57a6a212385123d76 100644 (file)
@@ -28,7 +28,7 @@ class FilePickerCtrl;
 class ExportDialog : public TableDialog
 {
 public:
-       explicit ExportDialog (wxWindow* parent);
+       explicit ExportDialog (wxWindow* parent, std::string name);
 
        boost::filesystem::path path () const;
        ExportFormat format () const;