cinema->read_screens (*i);
_cinemas.push_back (cinema);
}
+
+ _mail_server = f.string_child ("MailServer");
+ _kdm_from = f.string_child ("KDMFrom");
}
void
(*i)->as_xml (root->add_child ("Cinema"));
}
+ root->add_child("MailServer")->add_child_text (_mail_server);
+ root->add_child("KDMFrom")->add_child_text (_kdm_from);
+
doc.write_to_file_formatted (file(false).string ());
}
return _colour_conversions;
}
+ std::string mail_server () const {
+ return _mail_server;
+ }
+
+ std::string kdm_from () const {
+ return _kdm_from;
+ }
+
/** @param n New number of local encoding threads */
void set_num_local_encoding_threads (int n) {
_num_local_encoding_threads = n;
void set_colour_conversions (std::vector<PresetColourConversion> const & c) {
_colour_conversions = c;
}
+
+ void set_mail_server (std::string s) {
+ _mail_server = s;
+ }
+
+ void set_kdm_from (std::string f) {
+ _kdm_from = f;
+ }
void write () const;
int _default_j2k_bandwidth;
std::vector<PresetColourConversion> _colour_conversions;
std::list<boost::shared_ptr<Cinema> > _cinemas;
+ std::string _mail_server;
+ std::string _kdm_from;
/** Singleton instance, or 0 */
static Config* _instance;
_num_local_encoding_threads = new wxSpinCtrl (_misc_panel);
table->Add (_num_local_encoding_threads, 1);
+ add_label_to_sizer (table, _misc_panel, _("Outgoing mail server"), true);
+ _mail_server = new wxTextCtrl (_misc_panel, wxID_ANY);
+ table->Add (_mail_server, 1, wxEXPAND | wxALL);
+
+ add_label_to_sizer (table, _misc_panel, _("From address for KDM emails"), true);
+ _kdm_from = new wxTextCtrl (_misc_panel, wxID_ANY);
+ table->Add (_kdm_from, 1, wxEXPAND | wxALL);
+
{
add_label_to_sizer (table, _misc_panel, _("Default duration of still images"), true);
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
_num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::num_local_encoding_threads_changed, this));
+ _mail_server->SetValue (std_to_wx (config->mail_server ()));
+ _mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::mail_server_changed, this));
+ _kdm_from->SetValue (std_to_wx (config->kdm_from ()));
+ _kdm_from->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&ConfigDialog::kdm_from_changed, this));
+
_default_still_length->SetRange (1, 3600);
_default_still_length->SetValue (config->default_still_length ());
_default_still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::default_still_length_changed, this));
boost::bind (&colour_conversion_column, _1)
);
}
+
+void
+ConfigDialog::mail_server_changed ()
+{
+ Config::instance()->set_mail_server (wx_to_std (_mail_server->GetValue ()));
+}
+
+
+void
+ConfigDialog::kdm_from_changed ()
+{
+ Config::instance()->set_kdm_from (wx_to_std (_kdm_from->GetValue ()));
+}
void issuer_changed ();
void creator_changed ();
void default_j2k_bandwidth_changed ();
+ void mail_server_changed ();
+ void kdm_from_changed ();
void setup_language_sensitivity ();
wxTextCtrl* _tms_user;
wxTextCtrl* _tms_password;
wxSpinCtrl* _num_local_encoding_threads;
+ wxTextCtrl* _mail_server;
+ wxTextCtrl* _kdm_from;
wxSpinCtrl* _default_still_length;
#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _default_directory;