From f4531bfb1b4334e3501173cfee7444b86fba4082 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 4 Aug 2015 21:25:25 +0100 Subject: [PATCH] Disable '2D version of 3D content' ISDCF metadata checkbox with 3D content (part of #652). --- ChangeLog | 5 +++++ src/lib/film.cc | 5 +++++ src/wx/config_dialog.cc | 2 +- src/wx/dcp_panel.cc | 2 +- src/wx/isdcf_metadata_dialog.cc | 15 ++++++++++----- src/wx/isdcf_metadata_dialog.h | 8 ++++---- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c01b76dd..581e0d211 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-04 Carl Hetherington + + * Disable "2D version of 3D content" ISDCF metadata + checkbutton with 3D content (part of #652). + 2015-07-30 c.hetherington * Allow recreation of the certificate chain and key diff --git a/src/lib/film.cc b/src/lib/film.cc index 4de7a12a5..405d8cc9b 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -781,6 +781,11 @@ Film::set_three_d (bool t) { _three_d = t; signal_changed (THREE_D); + + if (_three_d && _isdcf_metadata.two_d_version_of_three_d) { + _isdcf_metadata.two_d_version_of_three_d = false; + signal_changed (ISDCF_METADATA); + } } void diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 652f8dacb..aabaa0fba 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -455,7 +455,7 @@ private: void edit_isdcf_metadata_clicked () { - ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, Config::instance()->default_isdcf_metadata ()); + ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, Config::instance()->default_isdcf_metadata (), false); d->ShowModal (); Config::instance()->set_default_isdcf_metadata (d->isdcf_metadata ()); d->Destroy (); diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index b38476dd7..31c019c93 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -501,7 +501,7 @@ DCPPanel::edit_isdcf_button_clicked () return; } - ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, _film->isdcf_metadata ()); + ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, _film->isdcf_metadata (), _film->three_d ()); d->ShowModal (); _film->set_isdcf_metadata (d->isdcf_metadata ()); d->Destroy (); diff --git a/src/wx/isdcf_metadata_dialog.cc b/src/wx/isdcf_metadata_dialog.cc index 47d159cb9..65f3b53ff 100644 --- a/src/wx/isdcf_metadata_dialog.cc +++ b/src/wx/isdcf_metadata_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,16 +17,17 @@ */ +#include "isdcf_metadata_dialog.h" +#include "wx_util.h" +#include "lib/film.h" #include #include #include -#include "lib/film.h" -#include "isdcf_metadata_dialog.h" -#include "wx_util.h" using boost::shared_ptr; -ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm) +/** @param threed true if the film is in 3D */ +ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bool threed) : TableDialog (parent, _("ISDCF name"), 2, true) { add (_("Content version"), true); @@ -68,6 +69,10 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm) _two_d_version_of_three_d = add (new wxCheckBox (this, wxID_ANY, _("2D version of content available in 3D"))); add_spacer (); + if (threed) { + _two_d_version_of_three_d->Enable (false); + } + add (_("Mastered luminance (e.g. 14fl)"), true); _mastered_luminance = add (new wxTextCtrl (this, wxID_ANY)); diff --git a/src/wx/isdcf_metadata_dialog.h b/src/wx/isdcf_metadata_dialog.h index 516f83231..db34a7fca 100644 --- a/src/wx/isdcf_metadata_dialog.h +++ b/src/wx/isdcf_metadata_dialog.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,10 +17,10 @@ */ +#include "table_dialog.h" +#include "lib/isdcf_metadata.h" #include #include -#include "lib/isdcf_metadata.h" -#include "table_dialog.h" class wxSpinCtrl; class Film; @@ -28,7 +28,7 @@ class Film; class ISDCFMetadataDialog : public TableDialog { public: - ISDCFMetadataDialog (wxWindow *, ISDCFMetadata); + ISDCFMetadataDialog (wxWindow *, ISDCFMetadata, bool threed); ISDCFMetadata isdcf_metadata () const; -- 2.30.2