--- /dev/null
+/*
+ Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+
+ 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.
+
+ 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "content_advanced_dialog.h"
+#include "lib/content.h"
+#include "lib/video_content.h"
+#include <boost/bind.hpp>
+
+using boost::bind;
+using boost::shared_ptr;
+
+ContentAdvancedDialog::ContentAdvancedDialog (wxWindow* parent, shared_ptr<Content> content)
+ : TableDialog (parent, _("Advanced content settings"), 2, 0, false)
+ , _content (content)
+{
+ wxCheckBox* ignore_video = new wxCheckBox (this, wxID_ANY, _("Ignore this content's video and use only audio, subtitles and closed captions"));
+ add (ignore_video);
+ add_spacer ();
+
+ layout ();
+
+ ignore_video->Enable (static_cast<bool>(_content->video));
+ ignore_video->SetValue (_content->video ? !content->video->use() : false);
+
+ ignore_video->Bind (wxEVT_CHECKBOX, bind(&ContentAdvancedDialog::ignore_video_changed, this, _1));
+}
+
+
+void
+ContentAdvancedDialog::ignore_video_changed (wxCommandEvent& ev)
+{
+ if (_content->video) {
+ _content->video->set_use (!ev.IsChecked());
+ }
+}
+
+
--- /dev/null
+/*
+ Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+
+ 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.
+
+ 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "table_dialog.h"
+#include <boost/shared_ptr.hpp>
+
+
+class Content;
+
+
+class ContentAdvancedDialog : public TableDialog
+{
+public:
+ ContentAdvancedDialog (wxWindow* parent, boost::shared_ptr<Content> content);
+
+private:
+ void ignore_video_changed (wxCommandEvent& ev);
+
+ boost::shared_ptr<Content> _content;
+};
+
/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "timeline_video_content_view.h"
#include "timeline_audio_content_view.h"
#include "content_properties_dialog.h"
+#include "content_advanced_dialog.h"
#include "lib/playlist.h"
#include "lib/film.h"
#include "lib/image_content.h"
ID_join,
ID_find_missing,
ID_properties,
+ ID_advanced,
ID_re_examine,
ID_kdm,
ID_ov,
_join = _menu->Append (ID_join, _("Join"));
_find_missing = _menu->Append (ID_find_missing, _("Find missing..."));
_properties = _menu->Append (ID_properties, _("Properties..."));
+ _advanced = _menu->Append (ID_advanced, _("Advanced settings..."));
_re_examine = _menu->Append (ID_re_examine, _("Re-examine..."));
_menu->AppendSeparator ();
_kdm = _menu->Append (ID_kdm, _("Add KDM..."));
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::join, this), ID_join);
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::find_missing, this), ID_find_missing);
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::properties, this), ID_properties);
+ _parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::advanced, this), ID_advanced);
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::re_examine, this), ID_re_examine);
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::kdm, this), ID_kdm);
_parent->Bind (wxEVT_MENU, boost::bind (&ContentMenu::ov, this), ID_ov);
_find_missing->Enable (_content.size() == 1 && !_content.front()->paths_valid ());
_properties->Enable (_content.size() == 1);
+ _advanced->Enable (_content.size() == 1);
_re_examine->Enable (!_content.empty ());
if (_content.size() == 1) {
d->Destroy ();
}
+
+void
+ContentMenu::advanced ()
+{
+ ContentAdvancedDialog* d = new ContentAdvancedDialog (_parent, _content.front());
+ d->ShowModal ();
+ d->Destroy ();
+}
+
+
void
ContentMenu::cpl_selected (wxCommandEvent& ev)
{
void join ();
void find_missing ();
void properties ();
+ void advanced ();
void re_examine ();
void kdm ();
void ov ();
wxMenuItem* _join;
wxMenuItem* _find_missing;
wxMenuItem* _properties;
+ wxMenuItem* _advanced;
wxMenuItem* _re_examine;
wxMenuItem* _kdm;
wxMenuItem* _ov;
font.SetPointSize(font.GetPointSize() - 1);
_reference_note->SetFont(font);
- _use = new wxCheckBox (this, wxID_ANY, _("Use"));
-
_type_label = create_label (this, _("Type"), true);
_frame_type = new ContentChoice<VideoContent, VideoFrameType> (
this,
_fade_in->Changed.connect (boost::bind (&VideoPanel::fade_in_changed, this));
_fade_out->Changed.connect (boost::bind (&VideoPanel::fade_out_changed, this));
- _use->Bind (wxEVT_CHECKBOX, boost::bind (&VideoPanel::use_clicked, this));
_reference->Bind (wxEVT_CHECKBOX, boost::bind (&VideoPanel::reference_clicked, this));
_filters_button->Bind (wxEVT_BUTTON, boost::bind (&VideoPanel::edit_filters_clicked, this));
_scale_fit->Bind (wxEVT_RADIOBUTTON, boost::bind (&VideoPanel::scale_fit_clicked, this));
++r;
}
- _use->Show (full);
- _grid->Add (_use, wxGBPosition(r, 0), wxGBSpan(1, 2));
- ++r;
-
add_label_to_sizer (_grid, _type_label, true, wxGBPosition(r, 0));
_frame_type->add (_grid, wxGBPosition(r, 1), wxGBSpan(1, 2));
++r;
}
}
} else if (property == VideoContentProperty::USE) {
- set<bool> check;
- BOOST_FOREACH (shared_ptr<const Content> i, vc) {
- check.insert (i->video->use());
- }
-
- if (check.size() == 1) {
- checked_set (_use, vc.front()->video->use());
- } else {
- checked_set (_use, false);
- }
-
setup_sensitivity ();
} else if (property == VideoContentProperty::FADE_IN) {
set<Frame> check;
}
setup_refer_button (_reference, _reference_note, dcp, can_reference, cannot);
- bool const enable = !_reference->GetValue() && _use->GetValue();
+ bool any_use = false;
+ BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ if (i->video && i->video->use()) {
+ any_use = true;
+ }
+ }
- _use->Enable (!_reference->GetValue());
+ bool const enable = !_reference->GetValue() && any_use;
if (!enable) {
_frame_type->wrapped()->Enable (false);
}
}
-void
-VideoPanel::use_clicked ()
-{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
- i->video->set_use (_use->GetValue());
- }
-}
void
VideoPanel::reference_clicked ()
void content_selection_changed ();
private:
- void use_clicked ();
void reference_clicked ();
void edit_filters_clicked ();
void colour_conversion_changed ();
wxCheckBox* _reference;
wxStaticText* _reference_note;
- wxCheckBox* _use;
wxStaticText* _type_label;
ContentChoice<VideoContent, VideoFrameType>* _frame_type;
wxStaticText* _crop_label;
config_dialog.cc
config_move_dialog.cc
confirm_kdm_email_dialog.cc
+ content_advanced_dialog.cc
content_colour_conversion_dialog.cc
content_menu.cc
content_panel.cc