summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-04-12 22:51:00 +0100
committerCarl Hetherington <cth@carlh.net>2018-04-12 22:54:51 +0100
commitaa97e44d334f3e2a1924059e10407aae85519eba (patch)
tree282a5810ff1b2fffbb69af2695e445fa09763e3e
parentc07b9340d12e6b724719ad6fd885102ab1a6d84e (diff)
Disable OK in export dialogue until a filename has been specified (#1260).
-rw-r--r--ChangeLog8
-rw-r--r--src/wx/export_dialog.cc14
-rw-r--r--src/wx/export_dialog.h3
3 files changed, 23 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2813785bf..02029d714 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-04-12 Carl Hetherington <cth@carlh.net>
+
+ * Prevent error when starting export without specifying a filename (#1260).
+
+2018-04-11 Carl Hetherington <cth@carlh.net>
+
+ * Fix 3D DCP handling in the player.
+
2018-04-10 Carl Hetherington <cth@carlh.net>
* Fix disappearing subtitles when they are added from text files
diff --git a/src/wx/export_dialog.cc b/src/wx/export_dialog.cc
index 712ef4a7e..9f6207e66 100644
--- a/src/wx/export_dialog.cc
+++ b/src/wx/export_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -21,6 +21,7 @@
#include "export_dialog.h"
#include "file_picker_ctrl.h"
#include "wx_util.h"
+#include <wx/filepicker.h>
#include <boost/bind.hpp>
using boost::bind;
@@ -61,8 +62,12 @@ ExportDialog::ExportDialog (wxWindow* parent)
_format->SetSelection (0);
_format->Bind (wxEVT_CHOICE, bind (&ExportDialog::format_changed, this));
+ _file->Bind (wxEVT_FILEPICKER_CHANGED, bind (&ExportDialog::file_changed, this));
layout ();
+
+ wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+ ok->Enable (false);
}
void
@@ -91,3 +96,10 @@ ExportDialog::mixdown_to_stereo () const
{
return _mixdown->GetValue ();
}
+
+void
+ExportDialog::file_changed ()
+{
+ wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+ ok->Enable (true);
+}
diff --git a/src/wx/export_dialog.h b/src/wx/export_dialog.h
index 0406c562f..1bc323a14 100644
--- a/src/wx/export_dialog.h
+++ b/src/wx/export_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -36,6 +36,7 @@ public:
private:
void format_changed ();
+ void file_changed ();
wxChoice* _format;
wxCheckBox* _mixdown;