/*
Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ DCP-o-matic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
*/
h->SetFont (subheading_font);
vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL);
_screens = new ScreensPanel (this);
+ /* Hack to stop KDM dialogs that are taller than my laptop screen; this
+ really isn't the right way to fix it...
+ */
+ _screens->SetMaxSize (wxSize (-1, 280));
vertical->Add (_screens, 1, wxEXPAND);
/* Sub-heading: Timing */
+ /// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
h->SetFont (subheading_font);
vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
/* Sub-heading: CPL */
h = new wxStaticText (this, wxID_ANY, _("CPL"));
h->SetFont (subheading_font);
- vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
+ vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP * 2);
_cpl = new KDMCPLPanel (this, film->cpls ());
- vertical->Add (_cpl);
+ vertical->Add (_cpl, 0, wxEXPAND);
/* Sub-heading: Output */
h = new wxStaticText (this, wxID_ANY, _("Output"));
/* Bind */
_screens->ScreensChanged.connect (boost::bind (&KDMDialog::setup_sensitivity, this));
+ _timing->TimingChanged.connect (boost::bind (&KDMDialog::setup_sensitivity, this));
setup_sensitivity ();
wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
if (ok) {
- ok->Enable (!_screens->screens().empty() && sd);
+ ok->Enable (!_screens->screens().empty() && _timing->valid() && sd);
}
}
{
return _output->formulation ();
}
+
+KDMNameFormat
+KDMDialog::name_format () const
+{
+ return _output->name_format ();
+}
+
+int
+KDMDialog::ShowModal ()
+{
+ int const r = wxDialog::ShowModal ();
+ _output->save_kdm_name_format ();
+ return r;
+}