No-op; rename a whole load of wx constants to their shorter equivalents.
[dcpomatic.git] / src / wx / video_panel.cc
index a8a1d98c8e97f17e5994df4ec6cee21436a5bbec..462f2bdae3925ceb69aae168a1a8afba0f92937e 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    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.
 
-    This program is distributed in the hope that it will be useful,
+    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 this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -231,6 +232,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        }
 
        _frame_type->wrapped()->Append (_("2D"));
+       _frame_type->wrapped()->Append (_("3D"));
        _frame_type->wrapped()->Append (_("3D left/right"));
        _frame_type->wrapped()->Append (_("3D top/bottom"));
        _frame_type->wrapped()->Append (_("3D alternate"));
@@ -240,23 +242,28 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _fade_in->Changed.connect (boost::bind (&VideoPanel::fade_in_changed, this));
        _fade_out->Changed.connect (boost::bind (&VideoPanel::fade_out_changed, this));
 
-       _reference->Bind                     (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&VideoPanel::reference_clicked, this));
-       _filters_button->Bind                (wxEVT_COMMAND_BUTTON_CLICKED,   boost::bind (&VideoPanel::edit_filters_clicked, this));
-       _colour_conversion->Bind             (wxEVT_COMMAND_CHOICE_SELECTED,  boost::bind (&VideoPanel::colour_conversion_changed, this));
-       _edit_colour_conversion_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED,   boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
+       _reference->Bind                     (wxEVT_CHECKBOX, boost::bind (&VideoPanel::reference_clicked, this));
+       _filters_button->Bind                (wxEVT_BUTTON,   boost::bind (&VideoPanel::edit_filters_clicked, this));
+       _colour_conversion->Bind             (wxEVT_CHOICE,  boost::bind (&VideoPanel::colour_conversion_changed, this));
+       _edit_colour_conversion_button->Bind (wxEVT_BUTTON,   boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
 }
 
 void
 VideoPanel::film_changed (Film::Property property)
 {
        switch (property) {
-       case Film::CONTAINER:
        case Film::VIDEO_FRAME_RATE:
+       case Film::CONTAINER:
+               setup_description ();
+               setup_sensitivity ();
+               break;
        case Film::RESOLUTION:
                setup_description ();
                break;
        case Film::REEL_TYPE:
+       case Film::INTEROP:
                setup_sensitivity ();
+               break;
        default:
                break;
        }
@@ -412,9 +419,13 @@ VideoPanel::edit_colour_conversion_clicked ()
        }
 
        ContentColourConversionDialog* d = new ContentColourConversionDialog (this, vc.front()->video->yuv ());
-       d->set (vc.front()->video->colour_conversion().get_value_or (PresetColourConversion::all().front ().conversion));
-       d->ShowModal ();
-       vc.front()->video->set_colour_conversion (d->get ());
+       d->set (vc.front()->video->colour_conversion().get_value_or (PresetColourConversion::all().front().conversion));
+       if (d->ShowModal() == wxID_OK) {
+               vc.front()->video->set_colour_conversion (d->get ());
+       } else {
+               /* Reset the colour conversion choice */
+               film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
+       }
        d->Destroy ();
 }