2 Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /** @file src/config_dialog.cc
21 * @brief A dialogue to edit DCP-o-matic configuration.
25 #include <boost/lexical_cast.hpp>
26 #include <boost/filesystem.hpp>
27 #include <wx/stdpaths.h>
28 #include <wx/preferences.h>
29 #include <wx/filepicker.h>
30 #include <wx/spinctrl.h>
31 #include <libdcp/colour_matrix.h>
32 #include "lib/config.h"
33 #include "lib/ratio.h"
34 #include "lib/scaler.h"
35 #include "lib/filter.h"
36 #include "lib/dcp_content_type.h"
37 #include "lib/colour_conversion.h"
38 #include "config_dialog.h"
40 #include "editable_list.h"
41 #include "filter_dialog.h"
42 #include "dir_picker_ctrl.h"
43 #include "dci_metadata_dialog.h"
44 #include "preset_colour_conversion_dialog.h"
45 #include "server_dialog.h"
52 using boost::shared_ptr;
53 using boost::lexical_cast;
58 Page (wxSize panel_size, int border)
59 : _panel_size (panel_size)
68 class GeneralPage : public wxStockPreferencesPage, public Page
71 GeneralPage (wxSize panel_size, int border)
72 : wxStockPreferencesPage (Kind_General)
73 , Page (panel_size, border)
76 wxWindow* CreateWindow (wxWindow* parent)
78 wxPanel* panel = new wxPanel (parent);
79 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
82 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
83 table->AddGrowableCol (1, 1);
84 s->Add (table, 1, wxALL | wxEXPAND, _border);
86 _set_language = new wxCheckBox (panel, wxID_ANY, _("Set language"));
87 table->Add (_set_language, 1);
88 _language = new wxChoice (panel, wxID_ANY);
89 _language->Append (wxT ("English"));
90 _language->Append (wxT ("Français"));
91 _language->Append (wxT ("Italiano"));
92 _language->Append (wxT ("Español"));
93 _language->Append (wxT ("Svenska"));
94 _language->Append (wxT ("Deutsch"));
95 table->Add (_language);
97 wxStaticText* restart = add_label_to_sizer (table, panel, _("(restart DCP-o-matic to see language changes)"), false);
98 wxFont font = restart->GetFont();
99 font.SetStyle (wxFONTSTYLE_ITALIC);
100 font.SetPointSize (font.GetPointSize() - 1);
101 restart->SetFont (font);
102 table->AddSpacer (0);
104 add_label_to_sizer (table, panel, _("Threads to use for encoding on this host"), true);
105 _num_local_encoding_threads = new wxSpinCtrl (panel);
106 table->Add (_num_local_encoding_threads, 1);
108 add_label_to_sizer (table, panel, _("Outgoing mail server"), true);
109 _mail_server = new wxTextCtrl (panel, wxID_ANY);
110 table->Add (_mail_server, 1, wxEXPAND | wxALL);
112 add_label_to_sizer (table, panel, _("Mail user name"), true);
113 _mail_user = new wxTextCtrl (panel, wxID_ANY);
114 table->Add (_mail_user, 1, wxEXPAND | wxALL);
116 add_label_to_sizer (table, panel, _("Mail password"), true);
117 _mail_password = new wxTextCtrl (panel, wxID_ANY);
118 table->Add (_mail_password, 1, wxEXPAND | wxALL);
120 wxStaticText* plain = add_label_to_sizer (table, panel, _("(password will be stored on disk in plaintext)"), false);
121 plain->SetFont (font);
122 table->AddSpacer (0);
124 add_label_to_sizer (table, panel, _("From address for KDM emails"), true);
125 _kdm_from = new wxTextCtrl (panel, wxID_ANY);
126 table->Add (_kdm_from, 1, wxEXPAND | wxALL);
128 _check_for_updates = new wxCheckBox (panel, wxID_ANY, _("Check for updates on startup"));
129 table->Add (_check_for_updates, 1, wxEXPAND | wxALL);
130 table->AddSpacer (0);
132 _check_for_test_updates = new wxCheckBox (panel, wxID_ANY, _("Check for testing updates as well as stable ones"));
133 table->Add (_check_for_test_updates, 1, wxEXPAND | wxALL);
134 table->AddSpacer (0);
136 Config* config = Config::instance ();
138 _set_language->SetValue (config->language ());
140 if (config->language().get_value_or ("") == "fr") {
141 _language->SetSelection (1);
142 } else if (config->language().get_value_or ("") == "it") {
143 _language->SetSelection (2);
144 } else if (config->language().get_value_or ("") == "es") {
145 _language->SetSelection (3);
146 } else if (config->language().get_value_or ("") == "sv") {
147 _language->SetSelection (4);
148 } else if (config->language().get_value_or ("") == "de") {
149 _language->SetSelection (5);
151 _language->SetSelection (0);
154 setup_language_sensitivity ();
156 _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::set_language_changed, this));
157 _language->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&GeneralPage::language_changed, this));
159 _num_local_encoding_threads->SetRange (1, 128);
160 _num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
161 _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
163 _mail_server->SetValue (std_to_wx (config->mail_server ()));
164 _mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_server_changed, this));
165 _mail_user->SetValue (std_to_wx (config->mail_user ()));
166 _mail_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_user_changed, this));
167 _mail_password->SetValue (std_to_wx (config->mail_password ()));
168 _mail_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_password_changed, this));
169 _kdm_from->SetValue (std_to_wx (config->kdm_from ()));
170 _kdm_from->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::kdm_from_changed, this));
171 _check_for_updates->SetValue (config->check_for_updates ());
172 _check_for_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_updates_changed, this));
173 _check_for_test_updates->SetValue (config->check_for_test_updates ());
174 _check_for_test_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_test_updates_changed, this));
180 void setup_language_sensitivity ()
182 _language->Enable (_set_language->GetValue ());
185 void set_language_changed ()
187 setup_language_sensitivity ();
188 if (_set_language->GetValue ()) {
191 Config::instance()->unset_language ();
195 void language_changed ()
197 switch (_language->GetSelection ()) {
199 Config::instance()->set_language ("en");
202 Config::instance()->set_language ("fr");
205 Config::instance()->set_language ("it");
208 Config::instance()->set_language ("es");
211 Config::instance()->set_language ("sv");
214 Config::instance()->set_language ("de");
219 void mail_server_changed ()
221 Config::instance()->set_mail_server (wx_to_std (_mail_server->GetValue ()));
224 void mail_user_changed ()
226 Config::instance()->set_mail_user (wx_to_std (_mail_user->GetValue ()));
229 void mail_password_changed ()
231 Config::instance()->set_mail_password (wx_to_std (_mail_password->GetValue ()));
234 void kdm_from_changed ()
236 Config::instance()->set_kdm_from (wx_to_std (_kdm_from->GetValue ()));
239 void check_for_updates_changed ()
241 Config::instance()->set_check_for_updates (_check_for_updates->GetValue ());
244 void check_for_test_updates_changed ()
246 Config::instance()->set_check_for_test_updates (_check_for_test_updates->GetValue ());
249 void num_local_encoding_threads_changed ()
251 Config::instance()->set_num_local_encoding_threads (_num_local_encoding_threads->GetValue ());
254 wxCheckBox* _set_language;
256 wxSpinCtrl* _num_local_encoding_threads;
257 wxTextCtrl* _mail_server;
258 wxTextCtrl* _mail_user;
259 wxTextCtrl* _mail_password;
260 wxTextCtrl* _kdm_from;
261 wxCheckBox* _check_for_updates;
262 wxCheckBox* _check_for_test_updates;
265 class DefaultsPage : public wxPreferencesPage, public Page
268 DefaultsPage (wxSize panel_size, int border)
269 : Page (panel_size, border)
272 wxString GetName () const
274 return _("Defaults");
278 wxBitmap GetLargeIcon () const
280 return wxBitmap ("defaults", wxBITMAP_TYPE_PNG_RESOURCE);
284 wxWindow* CreateWindow (wxWindow* parent)
286 wxPanel* panel = new wxPanel (parent);
287 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
290 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
291 table->AddGrowableCol (1, 1);
292 s->Add (table, 1, wxALL | wxEXPAND, _border);
295 add_label_to_sizer (table, panel, _("Default duration of still images"), true);
296 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
297 _still_length = new wxSpinCtrl (panel);
298 s->Add (_still_length);
299 add_label_to_sizer (s, panel, _("s"), false);
303 add_label_to_sizer (table, panel, _("Default directory for new films"), true);
304 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
305 _directory = new DirPickerCtrl (panel);
307 _directory = new wxDirPickerCtrl (panel, wxDD_DIR_MUST_EXIST);
309 table->Add (_directory, 1, wxEXPAND);
311 add_label_to_sizer (table, panel, _("Default DCI name details"), true);
312 _dci_metadata_button = new wxButton (panel, wxID_ANY, _("Edit..."));
313 table->Add (_dci_metadata_button);
315 add_label_to_sizer (table, panel, _("Default container"), true);
316 _container = new wxChoice (panel, wxID_ANY);
317 table->Add (_container);
319 add_label_to_sizer (table, panel, _("Default content type"), true);
320 _dcp_content_type = new wxChoice (panel, wxID_ANY);
321 table->Add (_dcp_content_type);
324 add_label_to_sizer (table, panel, _("Default JPEG2000 bandwidth"), true);
325 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
326 _j2k_bandwidth = new wxSpinCtrl (panel);
327 s->Add (_j2k_bandwidth);
328 add_label_to_sizer (s, panel, _("Mbit/s"), false);
333 add_label_to_sizer (table, panel, _("Default audio delay"), true);
334 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
335 _audio_delay = new wxSpinCtrl (panel);
336 s->Add (_audio_delay);
337 add_label_to_sizer (s, panel, _("ms"), false);
341 add_label_to_sizer (table, panel, _("Default issuer"), true);
342 _issuer = new wxTextCtrl (panel, wxID_ANY);
343 table->Add (_issuer, 1, wxEXPAND);
345 add_label_to_sizer (table, panel, _("Default creator"), true);
346 _creator = new wxTextCtrl (panel, wxID_ANY);
347 table->Add (_creator, 1, wxEXPAND);
349 Config* config = Config::instance ();
351 _still_length->SetRange (1, 3600);
352 _still_length->SetValue (config->default_still_length ());
353 _still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::still_length_changed, this));
355 _directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
356 _directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
358 _dci_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_dci_metadata_clicked, this, parent));
360 vector<Ratio const *> ratio = Ratio::all ();
362 for (vector<Ratio const *>::iterator i = ratio.begin(); i != ratio.end(); ++i) {
363 _container->Append (std_to_wx ((*i)->nickname ()));
364 if (*i == config->default_container ()) {
365 _container->SetSelection (n);
370 _container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::container_changed, this));
372 vector<DCPContentType const *> const ct = DCPContentType::all ();
374 for (vector<DCPContentType const *>::const_iterator i = ct.begin(); i != ct.end(); ++i) {
375 _dcp_content_type->Append (std_to_wx ((*i)->pretty_name ()));
376 if (*i == config->default_dcp_content_type ()) {
377 _dcp_content_type->SetSelection (n);
382 _dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::dcp_content_type_changed, this));
384 _j2k_bandwidth->SetRange (50, 250);
385 _j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1000000);
386 _j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::j2k_bandwidth_changed, this));
388 _audio_delay->SetRange (-1000, 1000);
389 _audio_delay->SetValue (config->default_audio_delay ());
390 _audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::audio_delay_changed, this));
392 _issuer->SetValue (std_to_wx (config->dcp_metadata().issuer));
393 _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::issuer_changed, this));
394 _creator->SetValue (std_to_wx (config->dcp_metadata().creator));
395 _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::creator_changed, this));
401 void j2k_bandwidth_changed ()
403 Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
406 void audio_delay_changed ()
408 Config::instance()->set_default_audio_delay (_audio_delay->GetValue());
411 void directory_changed ()
413 Config::instance()->set_default_directory (wx_to_std (_directory->GetPath ()));
416 void edit_dci_metadata_clicked (wxWindow* parent)
418 DCIMetadataDialog* d = new DCIMetadataDialog (parent, Config::instance()->default_dci_metadata ());
420 Config::instance()->set_default_dci_metadata (d->dci_metadata ());
424 void still_length_changed ()
426 Config::instance()->set_default_still_length (_still_length->GetValue ());
429 void container_changed ()
431 vector<Ratio const *> ratio = Ratio::all ();
432 Config::instance()->set_default_container (ratio[_container->GetSelection()]);
435 void dcp_content_type_changed ()
437 vector<DCPContentType const *> ct = DCPContentType::all ();
438 Config::instance()->set_default_dcp_content_type (ct[_dcp_content_type->GetSelection()]);
441 void issuer_changed ()
443 libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
444 m.issuer = wx_to_std (_issuer->GetValue ());
445 Config::instance()->set_dcp_metadata (m);
448 void creator_changed ()
450 libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
451 m.creator = wx_to_std (_creator->GetValue ());
452 Config::instance()->set_dcp_metadata (m);
455 wxSpinCtrl* _j2k_bandwidth;
456 wxSpinCtrl* _audio_delay;
457 wxButton* _dci_metadata_button;
458 wxSpinCtrl* _still_length;
459 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
460 DirPickerCtrl* _directory;
462 wxDirPickerCtrl* _directory;
464 wxChoice* _container;
465 wxChoice* _dcp_content_type;
467 wxTextCtrl* _creator;
470 class EncodingServersPage : public wxPreferencesPage, public Page
473 EncodingServersPage (wxSize panel_size, int border)
474 : Page (panel_size, border)
477 wxString GetName () const
483 wxBitmap GetLargeIcon () const
485 return wxBitmap ("servers", wxBITMAP_TYPE_PNG_RESOURCE);
489 wxWindow* CreateWindow (wxWindow* parent)
491 wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size);
492 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
495 _use_any_servers = new wxCheckBox (panel, wxID_ANY, _("Use all servers"));
496 s->Add (_use_any_servers, 0, wxALL, _border);
498 vector<string> columns;
499 columns.push_back (wx_to_std (_("IP address / host name")));
500 _servers_list = new EditableList<string, ServerDialog> (
503 boost::bind (&Config::servers, Config::instance()),
504 boost::bind (&Config::set_servers, Config::instance(), _1),
505 boost::bind (&EncodingServersPage::server_column, this, _1)
508 s->Add (_servers_list, 1, wxEXPAND | wxALL, _border);
510 _use_any_servers->SetValue (Config::instance()->use_any_servers ());
511 _use_any_servers->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&EncodingServersPage::use_any_servers_changed, this));
518 void use_any_servers_changed ()
520 Config::instance()->set_use_any_servers (_use_any_servers->GetValue ());
523 string server_column (string s)
528 wxCheckBox* _use_any_servers;
529 EditableList<string, ServerDialog>* _servers_list;
532 class ColourConversionsPage : public wxPreferencesPage, public Page
535 ColourConversionsPage (wxSize panel_size, int border)
536 : Page (panel_size, border)
539 wxString GetName () const
541 return _("Colour Conversions");
545 wxBitmap GetLargeIcon () const
547 return wxBitmap ("colour_conversions", wxBITMAP_TYPE_PNG_RESOURCE);
550 wxWindow* CreateWindow (wxWindow* parent)
552 wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size);
553 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
556 vector<string> columns;
557 columns.push_back (wx_to_std (_("Name")));
558 wxPanel* list = new EditableList<PresetColourConversion, PresetColourConversionDialog> (
561 boost::bind (&Config::colour_conversions, Config::instance()),
562 boost::bind (&Config::set_colour_conversions, Config::instance(), _1),
563 boost::bind (&ColourConversionsPage::colour_conversion_column, this, _1),
567 s->Add (list, 1, wxEXPAND | wxALL, _border);
572 string colour_conversion_column (PresetColourConversion c)
578 class TMSPage : public wxPreferencesPage, public Page
581 TMSPage (wxSize panel_size, int border)
582 : Page (panel_size, border)
585 wxString GetName () const
591 wxBitmap GetLargeIcon () const
593 return wxBitmap ("tms", wxBITMAP_TYPE_PNG_RESOURCE);
597 wxWindow* CreateWindow (wxWindow* parent)
599 wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size);
600 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
603 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
604 table->AddGrowableCol (1, 1);
605 s->Add (table, 1, wxALL | wxEXPAND, _border);
607 add_label_to_sizer (table, panel, _("IP address"), true);
608 _tms_ip = new wxTextCtrl (panel, wxID_ANY);
609 table->Add (_tms_ip, 1, wxEXPAND);
611 add_label_to_sizer (table, panel, _("Target path"), true);
612 _tms_path = new wxTextCtrl (panel, wxID_ANY);
613 table->Add (_tms_path, 1, wxEXPAND);
615 add_label_to_sizer (table, panel, _("User name"), true);
616 _tms_user = new wxTextCtrl (panel, wxID_ANY);
617 table->Add (_tms_user, 1, wxEXPAND);
619 add_label_to_sizer (table, panel, _("Password"), true);
620 _tms_password = new wxTextCtrl (panel, wxID_ANY);
621 table->Add (_tms_password, 1, wxEXPAND);
623 Config* config = Config::instance ();
625 _tms_ip->SetValue (std_to_wx (config->tms_ip ()));
626 _tms_ip->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_ip_changed, this));
627 _tms_path->SetValue (std_to_wx (config->tms_path ()));
628 _tms_path->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_path_changed, this));
629 _tms_user->SetValue (std_to_wx (config->tms_user ()));
630 _tms_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_user_changed, this));
631 _tms_password->SetValue (std_to_wx (config->tms_password ()));
632 _tms_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_password_changed, this));
638 void tms_ip_changed ()
640 Config::instance()->set_tms_ip (wx_to_std (_tms_ip->GetValue ()));
643 void tms_path_changed ()
645 Config::instance()->set_tms_path (wx_to_std (_tms_path->GetValue ()));
648 void tms_user_changed ()
650 Config::instance()->set_tms_user (wx_to_std (_tms_user->GetValue ()));
653 void tms_password_changed ()
655 Config::instance()->set_tms_password (wx_to_std (_tms_password->GetValue ()));
659 wxTextCtrl* _tms_path;
660 wxTextCtrl* _tms_user;
661 wxTextCtrl* _tms_password;
664 class KDMEmailPage : public wxPreferencesPage, public Page
668 KDMEmailPage (wxSize panel_size, int border)
669 : Page (panel_size, border)
672 wxString GetName () const
674 return _("KDM Email");
678 wxBitmap GetLargeIcon () const
680 return wxBitmap ("kdm_email", wxBITMAP_TYPE_PNG_RESOURCE);
684 wxWindow* CreateWindow (wxWindow* parent)
686 /* We have to force both width and height of this one */
688 wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, wxSize (480, 128));
690 wxPanel* panel = new wxPanel (parent);
692 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
695 _kdm_email = new wxTextCtrl (panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (480, 128), wxTE_MULTILINE);
696 s->Add (_kdm_email, 1, wxEXPAND | wxALL, _border);
698 _kdm_email->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KDMEmailPage::kdm_email_changed, this));
699 _kdm_email->SetValue (wx_to_std (Config::instance()->kdm_email ()));
705 void kdm_email_changed ()
707 Config::instance()->set_kdm_email (wx_to_std (_kdm_email->GetValue ()));
710 wxTextCtrl* _kdm_email;
714 create_config_dialog ()
716 wxPreferencesEditor* e = new wxPreferencesEditor ();
719 /* Width that we force some of the config panels to be on OSX so that
720 the containing window doesn't shrink too much when we select those panels.
721 This is obviously an unpleasant hack.
723 wxSize ps = wxSize (480, -1);
724 int const border = 16;
726 wxSize ps = wxDefaultSize;
727 int const border = 8;
730 e->AddPage (new GeneralPage (ps, border));
731 e->AddPage (new DefaultsPage (ps, border));
732 e->AddPage (new EncodingServersPage (ps, border));
733 e->AddPage (new ColourConversionsPage (ps, border));
734 e->AddPage (new TMSPage (ps, border));
735 e->AddPage (new KDMEmailPage (ps, border));