summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-02-04 09:59:38 +0000
committerCarl Hetherington <cth@carlh.net>2014-02-04 09:59:38 +0000
commit4ba8772aef261da209bbb882325fd61a8b479fd7 (patch)
tree7fe9e3976d52503b474cfa96716c1bd4535b8f8d /src/tools
parentb299c1873bf23414061d551843275c77a9256a05 (diff)
parenteec6f90d8e2c2246ce674ae13e4f460b12a4f2a9 (diff)
Merge master.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_batch.cc35
-rw-r--r--src/tools/po/de_DE.po2
-rw-r--r--src/tools/po/es_ES.po2
-rw-r--r--src/tools/po/fr_FR.po22
-rw-r--r--src/tools/po/it_IT.po2
-rw-r--r--src/tools/po/sv_SE.po2
6 files changed, 51 insertions, 14 deletions
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc
index 23d5a4819..41cb23e73 100644
--- a/src/tools/dcpomatic_batch.cc
+++ b/src/tools/dcpomatic_batch.cc
@@ -19,6 +19,7 @@
#include <wx/aboutdlg.h>
#include <wx/stdpaths.h>
+#include <wx/cmdline.h>
#include <wx/wx.h>
#include "lib/version.h"
#include "lib/compose.hpp"
@@ -30,8 +31,11 @@
#include "wx/wx_ui_signaller.h"
#include "wx/job_manager_view.h"
+using std::exception;
using boost::shared_ptr;
+static std::string film_to_load;
+
enum {
ID_file_add_film = 1,
ID_file_quit,
@@ -190,6 +194,11 @@ private:
}
};
+static const wxCmdLineEntryDesc command_line_description[] = {
+ { wxCMD_LINE_PARAM, 0, 0, "film to load", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
+};
+
class App : public wxApp
{
bool OnInit ()
@@ -228,6 +237,17 @@ class App : public wxApp
ui_signaller = new wxUISignaller (this);
this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this));
+ shared_ptr<Film> film;
+ if (!film_to_load.empty() && boost::filesystem::is_directory (film_to_load)) {
+ try {
+ film.reset (new Film (film_to_load));
+ film->read_metadata ();
+ film->make_dcp ();
+ } catch (exception& e) {
+ error_dialog (0, std_to_wx (String::compose (wx_to_std (_("Could not load film %1 (%2)")), film_to_load, e.what())));
+ }
+ }
+
return true;
}
@@ -235,6 +255,21 @@ class App : public wxApp
{
ui_signaller->ui_idle ();
}
+
+ void OnInitCmdLine (wxCmdLineParser& parser)
+ {
+ parser.SetDesc (command_line_description);
+ parser.SetSwitchChars (wxT ("-"));
+ }
+
+ bool OnCmdLineParsed (wxCmdLineParser& parser)
+ {
+ if (parser.GetParamCount() > 0) {
+ film_to_load = wx_to_std (parser.GetParam(0));
+ }
+
+ return true;
+ }
};
IMPLEMENT_APP (App)
diff --git a/src/tools/po/de_DE.po b/src/tools/po/de_DE.po
index 41e93befb..967d19515 100644
--- a/src/tools/po/de_DE.po
+++ b/src/tools/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-23 00:18+0000\n"
+"POT-Creation-Date: 2014-01-30 21:51+0000\n"
"PO-Revision-Date: 2014-01-14 19:49+0100\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po
index fba8a1062..eff8406c9 100644
--- a/src/tools/po/es_ES.po
+++ b/src/tools/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCPOMATIC\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-23 00:18+0000\n"
+"POT-Creation-Date: 2014-01-30 21:51+0000\n"
"PO-Revision-Date: 2013-11-09 02:47-0500\n"
"Last-Translator: Manuel AC <manuel.acevedo@civantos.>\n"
"Language-Team: Manuel AC <manuel.acevedo@civantos.com>\n"
diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po
index b8d0dcca1..b12f66714 100644
--- a/src/tools/po/fr_FR.po
+++ b/src/tools/po/fr_FR.po
@@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-23 00:18+0000\n"
-"PO-Revision-Date: 2013-11-25 18:58+0100\n"
+"POT-Creation-Date: 2014-01-30 21:51+0000\n"
+"PO-Revision-Date: 2014-01-25 16:20+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
-"Language: \n"
+"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Generator: Poedit 1.6.3\n"
#: src/tools/dcpomatic.cc:366
msgid "%1 already exists as a file, so you cannot use it for a new film."
@@ -72,7 +72,7 @@ msgstr "&Envoyer le DCP dans le TMS"
#: src/tools/dcpomatic.cc:244
msgid "&Tools"
-msgstr ""
+msgstr "&Outils"
#: src/tools/dcpomatic.cc:236
msgid "About"
@@ -84,7 +84,7 @@ msgstr "À propos de DCP-o-matic"
#: src/tools/dcpomatic.cc:230
msgid "Check for updates"
-msgstr ""
+msgstr "Recherche mises à jour"
#: src/tools/dcpomatic.cc:633
msgid "Could not load film %1 (%2)"
@@ -110,7 +110,7 @@ msgstr "DCP-o-matic"
#: src/tools/dcpomatic.cc:229
msgid "Encoding servers..."
-msgstr ""
+msgstr "Serveurs d'encodage"
#: src/tools/dcpomatic.cc:90
msgid "Film changed"
@@ -118,7 +118,7 @@ msgstr "Film changé"
#: src/tools/dcpomatic.cc:228
msgid "Hints..."
-msgstr ""
+msgstr "Avertissements..."
#: src/tools/dcpomatic.cc:223
msgid "Make &KDMs..."
@@ -147,10 +147,12 @@ msgid ""
"The DCP for this film will take up about %.1f Gb, and the disk that you are "
"using only has %.1f Gb available. Do you want to continue anyway?"
msgstr ""
+"Le DCP de ce film prendra environ %.1f Go d'espace. Le disque que vous "
+"utilisez n'a que %.1f Go disponible(s). Souhaitez-vous continuer?"
#: src/tools/dcpomatic.cc:728
msgid "The DCP-o-matic download server could not be contacted."
-msgstr ""
+msgstr "Le serveur de téléchargement de DCP-o-matic ne peut être contacté."
#: src/tools/dcpomatic.cc:356
msgid ""
@@ -161,7 +163,7 @@ msgstr ""
#: src/tools/dcpomatic.cc:723
msgid "There are no new versions of DCP-o-matic available."
-msgstr ""
+msgstr "Aucune mise à jour disponible pour DCP-o-matic."
#: src/tools/dcpomatic.cc:553
msgid "There are unfinished jobs; are you sure you want to quit?"
diff --git a/src/tools/po/it_IT.po b/src/tools/po/it_IT.po
index 6e03f3c1d..f63169721 100644
--- a/src/tools/po/it_IT.po
+++ b/src/tools/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: IT VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-23 00:18+0000\n"
+"POT-Creation-Date: 2014-01-30 21:51+0000\n"
"PO-Revision-Date: 2013-04-28 10:31+0100\n"
"Last-Translator: Maci <macibro@gmail.com>\n"
"Language-Team: \n"
diff --git a/src/tools/po/sv_SE.po b/src/tools/po/sv_SE.po
index 9b5c15d01..a68ba8730 100644
--- a/src/tools/po/sv_SE.po
+++ b/src/tools/po/sv_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-23 00:18+0000\n"
+"POT-Creation-Date: 2014-01-30 21:51+0000\n"
"PO-Revision-Date: 2014-01-19 08:59+0100\n"
"Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n"
"Language-Team: \n"