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;
55 class GeneralPage : public wxStockPreferencesPage
59 : wxStockPreferencesPage (Kind_General)
62 wxWindow* CreateWindow (wxWindow* parent)
64 wxPanel* panel = new wxPanel (parent);
65 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
68 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
69 table->AddGrowableCol (1, 1);
70 s->Add (table, 1, wxALL | wxEXPAND, 8);
72 _set_language = new wxCheckBox (panel, wxID_ANY, _("Set language"));
73 table->Add (_set_language, 1);
74 _language = new wxChoice (panel, wxID_ANY);
75 _language->Append (wxT ("English"));
76 _language->Append (wxT ("Français"));
77 _language->Append (wxT ("Italiano"));
78 _language->Append (wxT ("Español"));
79 _language->Append (wxT ("Svenska"));
80 _language->Append (wxT ("Deutsch"));
81 table->Add (_language);
83 wxStaticText* restart = add_label_to_sizer (table, panel, _("(restart DCP-o-matic to see language changes)"), false);
84 wxFont font = restart->GetFont();
85 font.SetStyle (wxFONTSTYLE_ITALIC);
86 font.SetPointSize (font.GetPointSize() - 1);
87 restart->SetFont (font);
90 add_label_to_sizer (table, panel, _("Threads to use for encoding on this host"), true);
91 _num_local_encoding_threads = new wxSpinCtrl (panel);
92 table->Add (_num_local_encoding_threads, 1);
94 add_label_to_sizer (table, panel, _("Outgoing mail server"), true);
95 _mail_server = new wxTextCtrl (panel, wxID_ANY);
96 table->Add (_mail_server, 1, wxEXPAND | wxALL);
98 add_label_to_sizer (table, panel, _("Mail user name"), true);
99 _mail_user = new wxTextCtrl (panel, wxID_ANY);
100 table->Add (_mail_user, 1, wxEXPAND | wxALL);
102 add_label_to_sizer (table, panel, _("Mail password"), true);
103 _mail_password = new wxTextCtrl (panel, wxID_ANY);
104 table->Add (_mail_password, 1, wxEXPAND | wxALL);
106 wxStaticText* plain = add_label_to_sizer (table, panel, _("(password will be stored on disk in plaintext)"), false);
107 plain->SetFont (font);
108 table->AddSpacer (0);
110 add_label_to_sizer (table, panel, _("From address for KDM emails"), true);
111 _kdm_from = new wxTextCtrl (panel, wxID_ANY);
112 table->Add (_kdm_from, 1, wxEXPAND | wxALL);
114 _check_for_updates = new wxCheckBox (panel, wxID_ANY, _("Check for updates on startup"));
115 table->Add (_check_for_updates, 1, wxEXPAND | wxALL);
116 table->AddSpacer (0);
118 _check_for_test_updates = new wxCheckBox (panel, wxID_ANY, _("Check for testing updates as well as stable ones"));
119 table->Add (_check_for_test_updates, 1, wxEXPAND | wxALL);
120 table->AddSpacer (0);
122 Config* config = Config::instance ();
124 _set_language->SetValue (config->language ());
126 if (config->language().get_value_or ("") == "fr") {
127 _language->SetSelection (1);
128 } else if (config->language().get_value_or ("") == "it") {
129 _language->SetSelection (2);
130 } else if (config->language().get_value_or ("") == "es") {
131 _language->SetSelection (3);
132 } else if (config->language().get_value_or ("") == "sv") {
133 _language->SetSelection (4);
134 } else if (config->language().get_value_or ("") == "de") {
135 _language->SetSelection (5);
137 _language->SetSelection (0);
140 setup_language_sensitivity ();
142 _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::set_language_changed, this));
143 _language->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&GeneralPage::language_changed, this));
145 _num_local_encoding_threads->SetRange (1, 128);
146 _num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
147 _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
149 _mail_server->SetValue (std_to_wx (config->mail_server ()));
150 _mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_server_changed, this));
151 _mail_user->SetValue (std_to_wx (config->mail_user ()));
152 _mail_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_user_changed, this));
153 _mail_password->SetValue (std_to_wx (config->mail_password ()));
154 _mail_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_password_changed, this));
155 _kdm_from->SetValue (std_to_wx (config->kdm_from ()));
156 _kdm_from->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::kdm_from_changed, this));
157 _check_for_updates->SetValue (config->check_for_updates ());
158 _check_for_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_updates_changed, this));
159 _check_for_test_updates->SetValue (config->check_for_test_updates ());
160 _check_for_test_updates->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::check_for_test_updates_changed, this));
166 void setup_language_sensitivity ()
168 _language->Enable (_set_language->GetValue ());
171 void set_language_changed ()
173 setup_language_sensitivity ();
174 if (_set_language->GetValue ()) {
177 Config::instance()->unset_language ();
181 void language_changed ()
183 switch (_language->GetSelection ()) {
185 Config::instance()->set_language ("en");
188 Config::instance()->set_language ("fr");
191 Config::instance()->set_language ("it");
194 Config::instance()->set_language ("es");
197 Config::instance()->set_language ("sv");
200 Config::instance()->set_language ("de");
205 void mail_server_changed ()
207 Config::instance()->set_mail_server (wx_to_std (_mail_server->GetValue ()));
210 void mail_user_changed ()
212 Config::instance()->set_mail_user (wx_to_std (_mail_user->GetValue ()));
215 void mail_password_changed ()
217 Config::instance()->set_mail_password (wx_to_std (_mail_password->GetValue ()));
220 void kdm_from_changed ()
222 Config::instance()->set_kdm_from (wx_to_std (_kdm_from->GetValue ()));
225 void check_for_updates_changed ()
227 Config::instance()->set_check_for_updates (_check_for_updates->GetValue ());
230 void check_for_test_updates_changed ()
232 Config::instance()->set_check_for_test_updates (_check_for_test_updates->GetValue ());
235 void num_local_encoding_threads_changed ()
237 Config::instance()->set_num_local_encoding_threads (_num_local_encoding_threads->GetValue ());
240 wxCheckBox* _set_language;
242 wxSpinCtrl* _num_local_encoding_threads;
243 wxTextCtrl* _mail_server;
244 wxTextCtrl* _mail_user;
245 wxTextCtrl* _mail_password;
246 wxTextCtrl* _kdm_from;
247 wxCheckBox* _check_for_updates;
248 wxCheckBox* _check_for_test_updates;
251 class DefaultsPage : public wxPreferencesPage
254 wxString GetName () const
256 return _("Defaults");
260 wxBitmap GetLargeIcon () const
262 return wxBitmap ("defaults", wxBITMAP_TYPE_PNG_RESOURCE);
266 wxWindow* CreateWindow (wxWindow* parent)
268 wxPanel* panel = new wxPanel (parent);
269 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
272 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
273 table->AddGrowableCol (1, 1);
274 s->Add (table, 1, wxALL | wxEXPAND, 8);
277 add_label_to_sizer (table, panel, _("Default duration of still images"), true);
278 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
279 _default_still_length = new wxSpinCtrl (panel);
280 s->Add (_default_still_length);
281 add_label_to_sizer (s, panel, _("s"), false);
285 add_label_to_sizer (table, panel, _("Default directory for new films"), true);
286 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
287 _default_directory = new DirPickerCtrl (panel);
289 _default_directory = new wxDirPickerCtrl (panel, wxDD_DIR_MUST_EXIST);
291 table->Add (_default_directory, 1, wxEXPAND);
293 add_label_to_sizer (table, panel, _("Default DCI name details"), true);
294 _default_dci_metadata_button = new wxButton (panel, wxID_ANY, _("Edit..."));
295 table->Add (_default_dci_metadata_button);
297 add_label_to_sizer (table, panel, _("Default container"), true);
298 _default_container = new wxChoice (panel, wxID_ANY);
299 table->Add (_default_container);
301 add_label_to_sizer (table, panel, _("Default content type"), true);
302 _default_dcp_content_type = new wxChoice (panel, wxID_ANY);
303 table->Add (_default_dcp_content_type);
306 add_label_to_sizer (table, panel, _("Default JPEG2000 bandwidth"), true);
307 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
308 _default_j2k_bandwidth = new wxSpinCtrl (panel);
309 s->Add (_default_j2k_bandwidth);
310 add_label_to_sizer (s, panel, _("Mbit/s"), false);
315 add_label_to_sizer (table, panel, _("Default audio delay"), true);
316 wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
317 _default_audio_delay = new wxSpinCtrl (panel);
318 s->Add (_default_audio_delay);
319 add_label_to_sizer (s, panel, _("ms"), false);
323 Config* config = Config::instance ();
325 _default_still_length->SetRange (1, 3600);
326 _default_still_length->SetValue (config->default_still_length ());
327 _default_still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_still_length_changed, this));
329 _default_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
330 _default_directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::default_directory_changed, this));
332 _default_dci_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_default_dci_metadata_clicked, this, parent));
334 vector<Ratio const *> ratio = Ratio::all ();
336 for (vector<Ratio const *>::iterator i = ratio.begin(); i != ratio.end(); ++i) {
337 _default_container->Append (std_to_wx ((*i)->nickname ()));
338 if (*i == config->default_container ()) {
339 _default_container->SetSelection (n);
344 _default_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::default_container_changed, this));
346 vector<DCPContentType const *> const ct = DCPContentType::all ();
348 for (vector<DCPContentType const *>::const_iterator i = ct.begin(); i != ct.end(); ++i) {
349 _default_dcp_content_type->Append (std_to_wx ((*i)->pretty_name ()));
350 if (*i == config->default_dcp_content_type ()) {
351 _default_dcp_content_type->SetSelection (n);
356 _default_dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::default_dcp_content_type_changed, this));
358 _default_j2k_bandwidth->SetRange (50, 250);
359 _default_j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1000000);
360 _default_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_j2k_bandwidth_changed, this));
362 _default_audio_delay->SetRange (-1000, 1000);
363 _default_audio_delay->SetValue (config->default_audio_delay ());
364 _default_audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_audio_delay_changed, this));
370 void default_j2k_bandwidth_changed ()
372 Config::instance()->set_default_j2k_bandwidth (_default_j2k_bandwidth->GetValue() * 1000000);
375 void default_audio_delay_changed ()
377 Config::instance()->set_default_audio_delay (_default_audio_delay->GetValue());
380 void default_directory_changed ()
382 Config::instance()->set_default_directory (wx_to_std (_default_directory->GetPath ()));
385 void edit_default_dci_metadata_clicked (wxWindow* parent)
387 DCIMetadataDialog* d = new DCIMetadataDialog (parent, Config::instance()->default_dci_metadata ());
389 Config::instance()->set_default_dci_metadata (d->dci_metadata ());
393 void default_still_length_changed ()
395 Config::instance()->set_default_still_length (_default_still_length->GetValue ());
398 void default_container_changed ()
400 vector<Ratio const *> ratio = Ratio::all ();
401 Config::instance()->set_default_container (ratio[_default_container->GetSelection()]);
404 void default_dcp_content_type_changed ()
406 vector<DCPContentType const *> ct = DCPContentType::all ();
407 Config::instance()->set_default_dcp_content_type (ct[_default_dcp_content_type->GetSelection()]);
410 wxSpinCtrl* _default_j2k_bandwidth;
411 wxSpinCtrl* _default_audio_delay;
412 wxButton* _default_dci_metadata_button;
413 wxSpinCtrl* _default_still_length;
414 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
415 DirPickerCtrl* _default_directory;
417 wxDirPickerCtrl* _default_directory;
419 wxChoice* _default_container;
420 wxChoice* _default_dcp_content_type;
423 class EncodingServersPage : public wxPreferencesPage
426 wxString GetName () const
432 wxBitmap GetLargeIcon () const
434 return wxBitmap ("servers", wxBITMAP_TYPE_PNG_RESOURCE);
438 wxWindow* CreateWindow (wxWindow* parent)
440 wxPanel* panel = new wxPanel (parent);
441 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
444 _use_any_servers = new wxCheckBox (panel, wxID_ANY, _("Use all servers"));
445 s->Add (_use_any_servers, 0, wxALL, DCPOMATIC_SIZER_X_GAP);
447 vector<string> columns;
448 columns.push_back (wx_to_std (_("IP address / host name")));
449 _servers_list = new EditableList<string, ServerDialog> (
452 boost::bind (&Config::servers, Config::instance()),
453 boost::bind (&Config::set_servers, Config::instance(), _1),
454 boost::bind (&EncodingServersPage::server_column, this, _1)
457 s->Add (_servers_list, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP);
459 _use_any_servers->SetValue (Config::instance()->use_any_servers ());
460 _use_any_servers->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&EncodingServersPage::use_any_servers_changed, this));
467 void use_any_servers_changed ()
469 Config::instance()->set_use_any_servers (_use_any_servers->GetValue ());
472 string server_column (string s)
477 wxCheckBox* _use_any_servers;
478 EditableList<string, ServerDialog>* _servers_list;
481 class ColourConversionsPage : public wxPreferencesPage
483 wxString GetName () const
485 return _("Colour Conversions");
489 wxBitmap GetLargeIcon () const
491 return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE);
494 wxWindow* CreateWindow (wxWindow* parent)
496 vector<string> columns;
497 columns.push_back (wx_to_std (_("Name")));
498 return new EditableList<PresetColourConversion, PresetColourConversionDialog> (
501 boost::bind (&Config::colour_conversions, Config::instance()),
502 boost::bind (&Config::set_colour_conversions, Config::instance(), _1),
503 boost::bind (&ColourConversionsPage::colour_conversion_column, this, _1),
509 string colour_conversion_column (PresetColourConversion c)
515 class MetadataPage : public wxPreferencesPage
517 wxString GetName () const
519 return _("Metadata");
523 wxBitmap GetLargeIcon () const
525 return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE);
529 wxWindow* CreateWindow (wxWindow* parent)
531 wxPanel* panel = new wxPanel (parent);
532 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
535 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
536 table->AddGrowableCol (1, 1);
537 s->Add (table, 1, wxALL | wxEXPAND, 8);
539 add_label_to_sizer (table, panel, _("Issuer"), true);
540 _issuer = new wxTextCtrl (panel, wxID_ANY);
541 table->Add (_issuer, 1, wxEXPAND);
543 add_label_to_sizer (table, panel, _("Creator"), true);
544 _creator = new wxTextCtrl (panel, wxID_ANY);
545 table->Add (_creator, 1, wxEXPAND);
547 Config* config = Config::instance ();
549 _issuer->SetValue (std_to_wx (config->dcp_metadata().issuer));
550 _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&MetadataPage::issuer_changed, this));
551 _creator->SetValue (std_to_wx (config->dcp_metadata().creator));
552 _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&MetadataPage::creator_changed, this));
559 wxTextCtrl* _creator;
561 void issuer_changed ()
563 libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
564 m.issuer = wx_to_std (_issuer->GetValue ());
565 Config::instance()->set_dcp_metadata (m);
568 void creator_changed ()
570 libdcp::XMLMetadata m = Config::instance()->dcp_metadata ();
571 m.creator = wx_to_std (_creator->GetValue ());
572 Config::instance()->set_dcp_metadata (m);
576 class TMSPage : public wxPreferencesPage
578 wxString GetName () const
584 wxBitmap GetLargeIcon () const
586 return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE);
590 wxWindow* CreateWindow (wxWindow* parent)
592 wxPanel* panel = new wxPanel (parent);
593 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
596 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
597 table->AddGrowableCol (1, 1);
598 s->Add (table, 1, wxALL | wxEXPAND, 8);
600 add_label_to_sizer (table, panel, _("IP address"), true);
601 _tms_ip = new wxTextCtrl (panel, wxID_ANY);
602 table->Add (_tms_ip, 1, wxEXPAND);
604 add_label_to_sizer (table, panel, _("Target path"), true);
605 _tms_path = new wxTextCtrl (panel, wxID_ANY);
606 table->Add (_tms_path, 1, wxEXPAND);
608 add_label_to_sizer (table, panel, _("User name"), true);
609 _tms_user = new wxTextCtrl (panel, wxID_ANY);
610 table->Add (_tms_user, 1, wxEXPAND);
612 add_label_to_sizer (table, panel, _("Password"), true);
613 _tms_password = new wxTextCtrl (panel, wxID_ANY);
614 table->Add (_tms_password, 1, wxEXPAND);
616 Config* config = Config::instance ();
618 _tms_ip->SetValue (std_to_wx (config->tms_ip ()));
619 _tms_ip->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_ip_changed, this));
620 _tms_path->SetValue (std_to_wx (config->tms_path ()));
621 _tms_path->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_path_changed, this));
622 _tms_user->SetValue (std_to_wx (config->tms_user ()));
623 _tms_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_user_changed, this));
624 _tms_password->SetValue (std_to_wx (config->tms_password ()));
625 _tms_password->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_password_changed, this));
631 void tms_ip_changed ()
633 Config::instance()->set_tms_ip (wx_to_std (_tms_ip->GetValue ()));
636 void tms_path_changed ()
638 Config::instance()->set_tms_path (wx_to_std (_tms_path->GetValue ()));
641 void tms_user_changed ()
643 Config::instance()->set_tms_user (wx_to_std (_tms_user->GetValue ()));
646 void tms_password_changed ()
648 Config::instance()->set_tms_password (wx_to_std (_tms_password->GetValue ()));
652 wxTextCtrl* _tms_path;
653 wxTextCtrl* _tms_user;
654 wxTextCtrl* _tms_password;
657 class KDMEmailPage : public wxPreferencesPage
660 wxString GetName () const
662 return _("KDM Email");
666 wxBitmap GetLargeIcon () const
668 return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE);
672 wxWindow* CreateWindow (wxWindow* parent)
674 wxPanel* panel = new wxPanel (parent);
675 wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
678 _kdm_email = new wxTextCtrl (panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
679 s->Add (_kdm_email, 1, wxEXPAND | wxALL, 12);
681 _kdm_email->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KDMEmailPage::kdm_email_changed, this));
682 _kdm_email->SetValue (wx_to_std (Config::instance()->kdm_email ()));
688 void kdm_email_changed ()
690 Config::instance()->set_kdm_email (wx_to_std (_kdm_email->GetValue ()));
693 wxTextCtrl* _kdm_email;
697 create_config_dialog ()
699 wxPreferencesEditor* e = new wxPreferencesEditor ();
700 e->AddPage (new GeneralPage);
701 e->AddPage (new DefaultsPage);
702 e->AddPage (new EncodingServersPage);
703 e->AddPage (new ColourConversionsPage);
704 e->AddPage (new MetadataPage);
705 e->AddPage (new TMSPage);
706 e->AddPage (new KDMEmailPage);