summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d1e9749)
to write metadata to the "create in folder" directory, which throws
an uncaught exception if the specified directory is unwriteable.
If we have a name then DoM tries to create the directory with that name,
which fails more elegantly and with a nicer error.
Backported-from-commit:
50aaa3789864c7330ee92e7e89ad5b6cc2155a82
Backported-from-branch: 2.15.x
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
+
+ _name->Bind (wxEVT_TEXT, bind(&FilmNameLocationDialog::setup_sensitivity, this));
+ setup_sensitivity ();
+}
+
+
+void
+FilmNameLocationDialog::setup_sensitivity ()
+{
+ wxButton* ok = dynamic_cast<wxButton *>(FindWindowById(wxID_OK, this));
+ if (ok) {
+ ok->Enable (!_name->GetValue().IsEmpty());
+ }
void
FilmNameLocationDialog::use_template_clicked ()
{
void
FilmNameLocationDialog::use_template_clicked ()
{
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
private:
void use_template_clicked ();
private:
void use_template_clicked ();
+ void setup_sensitivity ();
wxTextCtrl* _name;
#ifdef DCPOMATIC_USE_OWN_PICKER
wxTextCtrl* _name;
#ifdef DCPOMATIC_USE_OWN_PICKER