summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_batch.cc32
-rw-r--r--src/tools/po/fr_FR.po2
2 files changed, 33 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc
index f6197b1e2..6d4490ad7 100644
--- a/src/tools/dcpomatic_batch.cc
+++ b/src/tools/dcpomatic_batch.cc
@@ -101,6 +101,8 @@ public:
setup_menu (bar);
SetMenuBar (bar);
+ Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this, _1));
+
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_add_film, this), ID_file_add_film);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_quit, this), wxID_EXIT);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
@@ -238,6 +240,36 @@ private:
c->Destroy ();
}
+ void config_changed (Config::Property what)
+ {
+ /* Instantly save any config changes when using the DCP-o-matic GUI */
+ if (what == Config::CINEMAS) {
+ try {
+ Config::instance()->write_cinemas();
+ } catch (exception& e) {
+ error_dialog (
+ this,
+ wxString::Format (
+ _("Could not write to cinemas file at %s. Your changes have not been saved."),
+ std_to_wx (Config::instance()->cinemas_file().string()).data()
+ )
+ );
+ }
+ } else {
+ try {
+ Config::instance()->write_config();
+ } catch (exception& e) {
+ error_dialog (
+ this,
+ wxString::Format (
+ _("Could not write to config file at %s. Your changes have not been saved."),
+ std_to_wx (Config::instance()->cinemas_file().string()).data()
+ )
+ );
+ }
+ }
+ }
+
boost::optional<boost::filesystem::path> _last_parent;
wxSizer* _sizer;
wxPreferencesEditor* _config_dialog;
diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po
index 063c51226..1923b39a7 100644
--- a/src/tools/po/fr_FR.po
+++ b/src/tools/po/fr_FR.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-20 20:14+0100\n"
-"PO-Revision-Date: 2018-04-24 22:31+0100\n"
+"PO-Revision-Date: 2018-05-29 23:42+0100\n"
"Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
"Language-Team: \n"
"Language: fr_FR\n"