TimingPanel::TimingPanel (ContentPanel* p, FilmViewer* viewer)
/* horrid hack for apparent lack of context support with wxWidgets i18n code */
TimingPanel::TimingPanel (ContentPanel* p, FilmViewer* viewer)
/* horrid hack for apparent lack of context support with wxWidgets i18n code */
grid->Add (t, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 6);
grid->Add (t, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 6);
- _move_to_start_of_reel->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&TimingPanel::move_to_start_of_reel_clicked, this));
+ _move_to_start_of_reel->Bind (wxEVT_BUTTON, boost::bind (&TimingPanel::move_to_start_of_reel_clicked, this));
_full_length->Changed.connect (boost::bind (&TimingPanel::full_length_changed, this));
_trim_start->Changed.connect (boost::bind (&TimingPanel::trim_start_changed, this));
_full_length->Changed.connect (boost::bind (&TimingPanel::full_length_changed, this));
_trim_start->Changed.connect (boost::bind (&TimingPanel::trim_start_changed, this));
- _trim_start_to_playhead->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&TimingPanel::trim_start_to_playhead_clicked, this));
+ _trim_start_to_playhead->Bind (wxEVT_BUTTON, boost::bind (&TimingPanel::trim_start_to_playhead_clicked, this));
- _trim_end_to_playhead->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&TimingPanel::trim_end_to_playhead_clicked, this));
+ _trim_end_to_playhead->Bind (wxEVT_BUTTON, boost::bind (&TimingPanel::trim_end_to_playhead_clicked, this));
- _video_frame_rate->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TimingPanel::video_frame_rate_changed, this));
- _set_video_frame_rate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&TimingPanel::set_video_frame_rate, this));
+ _video_frame_rate->Bind (wxEVT_TEXT, boost::bind (&TimingPanel::video_frame_rate_changed, this));
+ _set_video_frame_rate->Bind (wxEVT_BUTTON, boost::bind (&TimingPanel::set_video_frame_rate, this));
bool const single_frame_image_content = content && dynamic_pointer_cast<const ImageContent> (content) && content->number_of_paths() == 1;
if ((check_vc.size() == 1 || count_ac == 1 || count_sc == 1) && !single_frame_image_content) {
bool const single_frame_image_content = content && dynamic_pointer_cast<const ImageContent> (content) && content->number_of_paths() == 1;
if ((check_vc.size() == 1 || count_ac == 1 || count_sc == 1) && !single_frame_image_content) {
_video_frame_rate->Enable (true);
} else {
checked_set (_video_frame_rate, wxT (""));
_video_frame_rate->Enable (true);
} else {
checked_set (_video_frame_rate, wxT (""));
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
if (ic && ic->still ()) {
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
if (ic && ic->still ()) {
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() <= ph && ph < i->end()) {
/* The playhead is in i. Use it as a reference to work out
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() <= ph && ph < i->end()) {
/* The playhead is in i. Use it as a reference to work out
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
optional<DCPTime> new_ph;
_viewer->set_coalesce_player_changes (true);
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
optional<DCPTime> new_ph;
_viewer->set_coalesce_player_changes (true);
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
if (i->position() < ph && ph < i->end ()) {
i->set_trim_end (ContentTime (i->position() + i->full_length() - ph - DCPTime::from_frames (1, frc.dcp), frc) - i->trim_start());
}
}
i->set_trim_end (ContentTime (i->position() + i->full_length() - ph - DCPTime::from_frames (1, frc.dcp), frc) - i->trim_start());
}
}