summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-25 01:37:20 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-25 01:37:20 +0100
commit5229b795b9d7cafe174496fbc6bca8d62f4a3ff0 (patch)
tree0031aed06535e7a190f12bde5fe0a6dd66e87f6a /src/wx
parent8041bb9729662176eeb8d78ce4dac9dfb6896557 (diff)
Remove user-configurable colour conversion presets.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/colour_conversion_editor.cc2
-rw-r--r--src/wx/config_dialog.cc53
-rw-r--r--src/wx/content_colour_conversion_dialog.cc10
-rw-r--r--src/wx/video_panel.cc2
4 files changed, 7 insertions, 60 deletions
diff --git a/src/wx/colour_conversion_editor.cc b/src/wx/colour_conversion_editor.cc
index 482e40309..be72fd001 100644
--- a/src/wx/colour_conversion_editor.cc
+++ b/src/wx/colour_conversion_editor.cc
@@ -197,7 +197,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
_input_gamma->SetDigits (2);
_input_gamma->SetIncrement (0.1);
_input_power->SetRange (0.1, 4.0);
- _input_power->SetDigits (2);
+ _input_power->SetDigits (6);
_input_power->SetIncrement (0.1);
_output_gamma->SetRange (0.1, 4.0);
_output_gamma->SetDigits (2);
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 7223dd84f..e4e6dd573 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -28,14 +28,12 @@
#include <wx/preferences.h>
#include <wx/filepicker.h>
#include <wx/spinctrl.h>
-#include <dcp/colour_matrix.h>
#include <dcp/exceptions.h>
#include <dcp/signer.h>
#include "lib/config.h"
#include "lib/ratio.h"
#include "lib/filter.h"
#include "lib/dcp_content_type.h"
-#include "lib/colour_conversion.h"
#include "lib/log.h"
#include "lib/util.h"
#include "lib/cross.h"
@@ -46,7 +44,6 @@
#include "filter_dialog.h"
#include "dir_picker_ctrl.h"
#include "isdcf_metadata_dialog.h"
-#include "preset_colour_conversion_dialog.h"
#include "server_dialog.h"
#include "make_signer_chain_dialog.h"
@@ -539,55 +536,6 @@ private:
EditableList<string, ServerDialog>* _servers_list;
};
-class ColourConversionsPage : public StandardPage
-{
-public:
- ColourConversionsPage (wxSize panel_size, int border)
- : StandardPage (panel_size, border)
- {}
-
- wxString GetName () const
- {
- return _("Colour Conversions");
- }
-
-#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
- {
- return wxBitmap ("colour_conversions", wxBITMAP_TYPE_PNG_RESOURCE);
- }
-#endif
-
-private:
- void setup ()
- {
- vector<string> columns;
- columns.push_back (wx_to_std (_("Name")));
- _list = new EditableList<PresetColourConversion, PresetColourConversionDialog> (
- _panel,
- columns,
- boost::bind (&Config::colour_conversions, Config::instance()),
- boost::bind (&Config::set_colour_conversions, Config::instance(), _1),
- boost::bind (&ColourConversionsPage::colour_conversion_column, this, _1),
- 300
- );
-
- _panel->GetSizer()->Add (_list, 1, wxEXPAND | wxALL, _border);
- }
-
- void config_changed ()
- {
- _list->refresh ();
- }
-
- string colour_conversion_column (PresetColourConversion c)
- {
- return c.name;
- }
-
- EditableList<PresetColourConversion, PresetColourConversionDialog>* _list;
-};
-
class KeysPage : public StandardPage
{
public:
@@ -1318,7 +1266,6 @@ create_config_dialog ()
e->AddPage (new GeneralPage (ps, border));
e->AddPage (new DefaultsPage (ps, border));
e->AddPage (new EncodingServersPage (ps, border));
- e->AddPage (new ColourConversionsPage (ps, border));
e->AddPage (new KeysPage (ps, border));
e->AddPage (new TMSPage (ps, border));
e->AddPage (new KDMEmailPage (ps, border));
diff --git a/src/wx/content_colour_conversion_dialog.cc b/src/wx/content_colour_conversion_dialog.cc
index 500a168f5..b382c3429 100644
--- a/src/wx/content_colour_conversion_dialog.cc
+++ b/src/wx/content_colour_conversion_dialog.cc
@@ -17,13 +17,14 @@
*/
-#include <wx/statline.h>
#include "lib/colour_conversion.h"
#include "lib/config.h"
#include "lib/util.h"
#include "wx_util.h"
#include "content_colour_conversion_dialog.h"
#include "colour_conversion_editor.h"
+#include <wx/statline.h>
+#include <boost/foreach.hpp>
using std::string;
using std::vector;
@@ -61,9 +62,8 @@ ContentColourConversionDialog::ContentColourConversionDialog (wxWindow* parent)
_editor_connection = _editor->Changed.connect (boost::bind (&ContentColourConversionDialog::check_for_preset, this));
- vector<PresetColourConversion> presets = Config::instance()->colour_conversions ();
- for (vector<PresetColourConversion>::const_iterator i = presets.begin(); i != presets.end(); ++i) {
- _preset_choice->Append (std_to_wx (i->name));
+ BOOST_FOREACH (PresetColourConversion const &i, PresetColourConversion::all ()) {
+ _preset_choice->Append (std_to_wx (i.name));
}
}
@@ -116,7 +116,7 @@ ContentColourConversionDialog::preset_check_clicked ()
void
ContentColourConversionDialog::preset_choice_changed ()
{
- vector<PresetColourConversion> presets = Config::instance()->colour_conversions ();
+ vector<PresetColourConversion> presets = PresetColourConversion::all ();
int const s = _preset_choice->GetCurrentSelection();
if (s != -1) {
set (presets[s].conversion);
diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc
index c4be761db..0f241506e 100644
--- a/src/wx/video_panel.cc
+++ b/src/wx/video_panel.cc
@@ -249,7 +249,7 @@ VideoPanel::film_content_changed (int property)
checked_set (_colour_conversion, wxT (""));
} else if (vcs->colour_conversion ()) {
optional<size_t> preset = vcs->colour_conversion().get().preset ();
- vector<PresetColourConversion> cc = Config::instance()->colour_conversions ();
+ vector<PresetColourConversion> cc = PresetColourConversion::all ();
if (preset) {
checked_set (_colour_conversion, std_to_wx (cc[preset.get()].name));
} else {