- shared_ptr<VideoContent> vc = _editor->selected_video_content ();
-
- int const n = _ratio->GetSelection ();
- if (n >= 0) {
- vector<Ratio const *> ratios = Ratio::all ();
- assert (n < int (ratios.size()));
- vc->set_ratio (ratios[n]);
- }
+ ColourConversion conversion = vc.front()->colour_conversion ();
+ ContentColourConversionDialog* d = new ContentColourConversionDialog (this);
+ d->set (conversion);
+ d->ShowModal ();
+
+ vc.front()->set_colour_conversion (d->get ());
+ d->Destroy ();
+}
+
+void
+VideoPanel::content_selection_changed ()
+{
+ VideoContentList sel = _editor->selected_video_content ();
+ bool const single = sel.size() == 1;
+
+ _left_crop->set_content (sel);
+ _right_crop->set_content (sel);
+ _top_crop->set_content (sel);
+ _bottom_crop->set_content (sel);
+ _frame_type->set_content (sel);
+ _scale->set_content (sel);
+
+ /* Things that are only allowed with single selections */
+ _filters_button->Enable (single);
+ _colour_conversion_button->Enable (single);
+
+ film_content_changed (VideoContentProperty::VIDEO_CROP);
+ film_content_changed (VideoContentProperty::VIDEO_FRAME_RATE);
+ film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
+ film_content_changed (FFmpegContentProperty::FILTERS);