#include "check_box.h"
#include "static_text.h"
#include "check_box.h"
+#include "dcpomatic_button.h"
#include "lib/ratio.h"
#include "lib/config.h"
#include "lib/dcp_content_type.h"
using std::make_pair;
using boost::lexical_cast;
using boost::shared_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using dcp::locale_convert;
DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
FocusManager::instance()->add(_name);
_use_isdcf_name = new CheckBox (_panel, _("Use ISDCF name"));
- _edit_isdcf_button = new wxButton (_panel, wxID_ANY, _("Details..."));
- _copy_isdcf_name_button = new wxButton (_panel, wxID_ANY, _("Copy as 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
http://trac.wxwidgets.org/ticket/12539
_key_label = create_label (_panel, _("Key"), true);
_key = new StaticText (_panel, "", wxDefaultPosition, size);
- _edit_key = new wxButton (_panel, wxID_ANY, _("Edit..."));
+ _edit_key = new Button (_panel, _("Edit..."));
_reels_label = create_label (_panel, _("Reels"), true);
_reel_type = new wxChoice (_panel, wxID_ANY);
}
_film->set_video_frame_rate (
- boost::lexical_cast<int> (
- wx_to_std (_frame_rate_choice->GetString (_frame_rate_choice->GetSelection ()))
- )
+ boost::lexical_cast<int>(
+ wx_to_std(_frame_rate_choice->GetString(_frame_rate_choice->GetSelection()))
+ ),
+ true
);
}
_film = film;
+ if (!_film) {
+ /* Really should all the film_changed below but this might be enough */
+ checked_set (_dcp_name, wxT(""));
+ set_general_sensitivity (false);
+ return;
+ }
+
film_changed (Film::NAME);
film_changed (Film::USE_ISDCF_NAME);
film_changed (Film::CONTENT);
_resolution->Enable (_generally_sensitive && _film && !_film->references_dcp_video());
_three_d->Enable (_generally_sensitive && _film && !_film->references_dcp_video());
_standard->Enable (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->references_dcp_audio());
+ _reencode_j2k->Enable (_generally_sensitive && _film);
+ _show_audio->Enable (_generally_sensitive && _film);
}
void
_frame_rate_choice->Show ();
_frame_rate_spin->Hide ();
}
-
- _frame_rate_sizer->Layout ();
}
wxPanel *
_frame_rate_label = create_label (panel, _("Frame Rate"), true);
_frame_rate_choice = new wxChoice (panel, wxID_ANY);
- _frame_rate_sizer = new wxBoxSizer (wxHORIZONTAL);
- _frame_rate_sizer->Add (_frame_rate_choice, 1, wxALIGN_CENTER_VERTICAL);
_frame_rate_spin = new wxSpinCtrl (panel, wxID_ANY);
- _frame_rate_sizer->Add (_frame_rate_spin, 1, wxALIGN_CENTER_VERTICAL);
setup_frame_rate_widget ();
- _best_frame_rate = new wxButton (panel, wxID_ANY, _("Use best"));
- _frame_rate_sizer->Add (_best_frame_rate, 1, wxALIGN_CENTER_VERTICAL);
+ _best_frame_rate = new Button (panel, _("Use best"));
_three_d = new CheckBox (panel, _("3D"));
_audio_processor->Append (std_to_wx (ap->name ()), new wxStringClientData (std_to_wx (ap->id ())));
}
- _show_audio = new wxButton (panel, wxID_ANY, _("Show audio..."));
+ _show_audio = new Button (panel, _("Show audio..."));
_audio_channels->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::audio_channels_changed, this));
_audio_processor->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::audio_processor_changed, this));