*/
-#include "dcp_panel.h"
-#include "wx_util.h"
-#include "isdcf_metadata_dialog.h"
#include "audio_dialog.h"
-#include "focus_manager.h"
#include "check_box.h"
-#include "static_text.h"
#include "check_box.h"
+#include "dcp_panel.h"
#include "dcpomatic_button.h"
-#include "markers_dialog.h"
+#include "dcpomatic_spin_ctrl.h"
+#include "focus_manager.h"
#include "interop_metadata_dialog.h"
+#include "markers_dialog.h"
#include "smpte_metadata_dialog.h"
+#include "static_text.h"
+#include "wx_util.h"
#include "lib/ratio.h"
#include "lib/config.h"
#include "lib/dcp_content_type.h"
FocusManager::instance()->add(_name);
_use_isdcf_name = new CheckBox (_panel, _("Use ISDCF name"));
- _edit_isdcf_button = new Button (_panel, _("Details..."));
_copy_isdcf_name_button = new Button (_panel, _("Copy as name"));
/* wxST_ELLIPSIZE_MIDDLE works around a bug in GTK2 and/or wxWidgets, see
_name->Bind (wxEVT_TEXT, boost::bind (&DCPPanel::name_changed, this));
_use_isdcf_name->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::use_isdcf_name_toggled, this));
- _edit_isdcf_button->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::edit_isdcf_button_clicked, this));
_copy_isdcf_name_button->Bind(wxEVT_BUTTON, boost::bind (&DCPPanel::copy_isdcf_name_button_clicked, this));
_dcp_content_type->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::dcp_content_type_changed, this));
_encrypted->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::encrypted_toggled, this));
auto name_sizer = new wxBoxSizer (wxHORIZONTAL);
name_sizer->Add (_name_label, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_X_GAP);
- name_sizer->Add (_name, 1, wxALIGN_CENTER_VERTICAL);
- _grid->Add (name_sizer, wxGBPosition(r, 0), wxGBSpan(1, 2), wxEXPAND);
+ name_sizer->Add (_name, 1, wxRIGHT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_X_GAP);
+ _grid->Add (name_sizer, wxGBPosition(r, 0), wxGBSpan(1, 2), wxRIGHT | wxEXPAND, DCPOMATIC_DIALOG_BORDER);
++r;
int flags = wxALIGN_CENTER_VERTICAL;
_grid->Add (_use_isdcf_name, wxGBPosition (r, 0), wxDefaultSpan, flags);
{
- wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- s->Add (_edit_isdcf_button, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP);
- s->Add (_copy_isdcf_name_button, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_X_GAP);
+ auto s = new wxBoxSizer (wxHORIZONTAL);
+ s->Add (_copy_isdcf_name_button, 0, wxLEFT, DCPOMATIC_SIZER_X_GAP);
_grid->Add (s, wxGBPosition (r, 1), wxDefaultSpan, wxEXPAND);
}
++r;
- _grid->Add (_dcp_name, wxGBPosition(r, 0), wxGBSpan (1, 2), wxALIGN_CENTER_VERTICAL | wxEXPAND);
+ _grid->Add (_dcp_name, wxGBPosition(r, 0), wxGBSpan(1, 2), wxALIGN_CENTER_VERTICAL | wxEXPAND);
++r;
add_label_to_sizer (_grid, _dcp_content_type_label, true, wxGBPosition (r, 0));
}
_interop_metadata_dialog = new InteropMetadataDialog (_panel, _film);
+ _interop_metadata_dialog->setup ();
_interop_metadata_dialog->Show ();
} else {
if (_smpte_metadata_dialog) {
}
_smpte_metadata_dialog = new SMPTEMetadataDialog (_panel, _film);
+ _smpte_metadata_dialog->setup ();
_smpte_metadata_dialog->Show ();
}
}
}
}
setup_dcp_name ();
- _edit_isdcf_button->Enable (_film->use_isdcf_name ());
break;
}
- case Film::Property::ISDCF_METADATA:
- setup_dcp_name ();
- break;
case Film::Property::VIDEO_FRAME_RATE:
{
bool done = false;
break;
case Film::Property::CONTENT_VERSIONS:
case Film::Property::VERSION_NUMBER:
+ case Film::Property::RELEASE_TERRITORY:
+ case Film::Property::RATINGS:
+ case Film::Property::FACILITY:
+ case Film::Property::STUDIO:
+ case Film::Property::TEMP_VERSION:
+ case Film::Property::PRE_RELEASE:
+ case Film::Property::RED_BAND:
+ case Film::Property::TWO_D_VERSION_OF_THREE_D:
+ case Film::Property::CHAIN:
+ case Film::Property::LUMINANCE:
setup_dcp_name ();
break;
default:
film_changed (Film::Property::RESOLUTION);
film_changed (Film::Property::ENCRYPTED);
film_changed (Film::Property::J2K_BANDWIDTH);
- film_changed (Film::Property::ISDCF_METADATA);
film_changed (Film::Property::VIDEO_FRAME_RATE);
film_changed (Film::Property::AUDIO_CHANNELS);
film_changed (Film::Property::SEQUENCE);
{
_name->Enable (_generally_sensitive);
_use_isdcf_name->Enable (_generally_sensitive);
- _edit_isdcf_button->Enable (_generally_sensitive);
_dcp_content_type->Enable (_generally_sensitive);
_copy_isdcf_name_button->Enable (_generally_sensitive);
_encrypted->Enable (_generally_sensitive);
_film->set_use_isdcf_name (_use_isdcf_name->GetValue ());
}
-void
-DCPPanel::edit_isdcf_button_clicked ()
-{
- if (!_film) {
- return;
- }
-
- auto d = new ISDCFMetadataDialog (_panel, _film->isdcf_metadata (), _film->three_d ());
- d->ShowModal ();
- _film->set_isdcf_metadata (d->isdcf_metadata ());
- d->Destroy ();
-}
-
void
DCPPanel::setup_dcp_name ()
{
_resolution_label = create_label (panel, _("Resolution"), true);
_resolution = new wxChoice (panel, wxID_ANY);
+#ifdef __WXGTK3__
+ int const spin_width = 118;
+#else
+ int const spin_width = 56;
+#endif
+
_frame_rate_label = create_label (panel, _("Frame Rate"), true);
_frame_rate_choice = new wxChoice (panel, wxID_ANY);
- _frame_rate_spin = new wxSpinCtrl (panel, wxID_ANY);
+ _frame_rate_spin = new SpinCtrl (panel, spin_width);
setup_frame_rate_widget ();
_best_frame_rate = new Button (panel, _("Use best"));
_three_d = new CheckBox (panel, _("3D"));
_j2k_bandwidth_label = create_label (panel, _("JPEG2000 bandwidth\nfor newly-encoded data"), true);
- _j2k_bandwidth = new wxSpinCtrl (panel, wxID_ANY);
+ _j2k_bandwidth = new SpinCtrl (panel, spin_width);
_mbits_label = create_label (panel, _("Mbit/s"), false);
_reencode_j2k = new CheckBox (panel, _("Re-encode JPEG2000 data from input"));
auto s = new wxBoxSizer (wxHORIZONTAL);
s->Add (_j2k_bandwidth, 0, wxALIGN_CENTER_VERTICAL);
add_label_to_sizer (s, _mbits_label, false, 0, wxLEFT | wxALIGN_CENTER_VERTICAL);
- _video_grid->Add (s, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND);
+ _video_grid->Add (s, wxGBPosition(r, 1), wxDefaultSpan);
++r;
_video_grid->Add (_reencode_j2k, wxGBPosition(r, 0), wxGBSpan(1, 2));
}
_audio_processor = new wxChoice (panel, wxID_ANY);
add_audio_processors ();
- _show_audio = new Button (panel, _("Show audio..."));
+ _show_audio = new Button (panel, _("Show graph of audio levels..."));
_audio_channels->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::audio_channels_changed, this));
_audio_processor->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::audio_processor_changed, this));
if (_audio_dialog) {
_audio_dialog->Destroy ();
- _audio_dialog = 0;
+ _audio_dialog = nullptr;
}
auto d = new AudioDialog (_panel, _film, _viewer);