_sizer->Add (grid, 0, wxALL, 8);
wxSize size = TimecodeBase::size (this);
-
+
wxSizer* labels = new wxBoxSizer (wxHORIZONTAL);
//// TRANSLATORS: this is an abbreviation for "hours"
wxStaticText* t = new wxStaticText (this, wxID_ANY, _("h"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
/* Hack to work around failure to centre text on GTK */
gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif
+#endif
labels->Add (t, 1, wxEXPAND);
add_label_to_sizer (labels, this, wxT (":"), false);
//// TRANSLATORS: this is an abbreviation for "minutes"
t = new wxStaticText (this, wxID_ANY, _("m"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif
+#endif
labels->Add (t, 1, wxEXPAND);
add_label_to_sizer (labels, this, wxT (":"), false);
//// TRANSLATORS: this is an abbreviation for "seconds"
t = new wxStaticText (this, wxID_ANY, _("s"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif
+#endif
labels->Add (t, 1, wxEXPAND);
add_label_to_sizer (labels, this, wxT (":"), false);
//// TRANSLATORS: this is an abbreviation for "frames"
t = new wxStaticText (this, wxID_ANY, _("f"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
#ifdef DCPOMATIC_LINUX
gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif
+#endif
labels->Add (t, 1, wxEXPAND);
grid->Add (new wxStaticText (this, wxID_ANY, wxT ("")));
grid->Add (labels);
++current;
}
}
-
+
t = new wxStaticText (this, wxID_ANY, wxT (""));
t->SetLabelMarkup (out);
grid->Add (t, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 6);
for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
check.insert ((*i)->full_length ());
}
-
+
if (check.size() == 1) {
_full_length->set (cl.front()->full_length (), _parent->film()->video_frame_rate ());
} else {
for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
check.insert ((*i)->length_after_trim ());
}
-
+
if (check.size() == 1) {
_play_length->set (cl.front()->length_after_trim (), _parent->film()->video_frame_rate ());
} else {
/* Here we check to see if we have exactly one different value of various
properties, and fill the controls with that value if so.
*/
-
+
if (property == ContentProperty::POSITION) {
set<DCPTime> check;
} else {
_position->clear ();
}
-
+
} else if (
property == ContentProperty::LENGTH ||
property == VideoContentProperty::VIDEO_FRAME_RATE ||
for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
check.insert ((*i)->trim_start ());
}
-
+
if (check.size() == 1) {
_trim_start->set (cl.front()->trim_start (), film_video_frame_rate);
} else {
_trim_start->clear ();
}
-
+
} else if (property == ContentProperty::TRIM_END) {
set<DCPTime> check;
for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
check.insert ((*i)->trim_end ());
}
-
+
if (check.size() == 1) {
_trim_end->set (cl.front()->trim_end (), film_video_frame_rate);
} else {
_trim_end->Enable (e);
_play_length->Enable (e);
_video_frame_rate->Enable (e);
-
+
film_content_changed (ContentProperty::POSITION);
film_content_changed (ContentProperty::LENGTH);
film_content_changed (ContentProperty::TRIM_START);
if (i->position() < ph && ph < i->end ()) {
i->set_trim_end (i->position() + i->full_length() - i->trim_start() - ph);
}
-
+
}
}