summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-06-04 11:13:38 +0100
committerCarl Hetherington <cth@carlh.net>2018-06-04 11:13:38 +0100
commitab1c8a67afba072b1c29f0c3c34aa9779643e66a (patch)
tree605b85098b25c61741694de6da8aab3b186d3cce /src/lib
parentb551048b6562c0697f8b748a2f0907dbd3d8fb96 (diff)
parentd2ee8239585be648ac63e560cb9cd363352ff11c (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/job_manager.cc15
-rw-r--r--src/lib/job_manager.h1
-rw-r--r--src/lib/po/fr_FR.po14
-rw-r--r--src/lib/util.cc39
4 files changed, 43 insertions, 26 deletions
diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc
index e3b6e257b..6d651d2ba 100644
--- a/src/lib/job_manager.cc
+++ b/src/lib/job_manager.cc
@@ -90,6 +90,21 @@ JobManager::add (shared_ptr<Job> j)
return j;
}
+shared_ptr<Job>
+JobManager::add_after (shared_ptr<Job> after, shared_ptr<Job> j)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ list<shared_ptr<Job> >::iterator i = find (_jobs.begin(), _jobs.end(), after);
+ DCPOMATIC_ASSERT (i != _jobs.end());
+ _jobs.insert (i, j);
+ }
+
+ emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
+
+ return j;
+}
+
list<shared_ptr<Job> >
JobManager::get () const
{
diff --git a/src/lib/job_manager.h b/src/lib/job_manager.h
index 9cba0fd09..a382dd736 100644
--- a/src/lib/job_manager.h
+++ b/src/lib/job_manager.h
@@ -41,6 +41,7 @@ class JobManager : public Signaller, public boost::noncopyable
{
public:
boost::shared_ptr<Job> add (boost::shared_ptr<Job>);
+ boost::shared_ptr<Job> add_after (boost::shared_ptr<Job> after, boost::shared_ptr<Job> j);
std::list<boost::shared_ptr<Job> > get () const;
bool work_to_do () const;
bool errors () const;
diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po
index e2de8ab54..535f6bab7 100644
--- a/src/lib/po/fr_FR.po
+++ b/src/lib/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:27+0100\n"
+"PO-Revision-Date: 2018-05-29 23:36+0100\n"
"Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -259,7 +259,7 @@ msgstr "BT2020 luminance non-constante"
#: src/lib/ffmpeg_content.cc:578
msgid "BT2100"
-msgstr ""
+msgstr "BT2100"
#: src/lib/ffmpeg_content.cc:515
msgid "BT470BG"
@@ -323,14 +323,12 @@ msgid "Checking existing image data"
msgstr "Recherche de données images existantes"
#: src/lib/ffmpeg_content.cc:577
-#, fuzzy
msgid "Chroma-derived constant luminance"
-msgstr "BT2020 luminance constante"
+msgstr "Luminance constante dérivée de la chrominance"
#: src/lib/ffmpeg_content.cc:576
-#, fuzzy
msgid "Chroma-derived non-constant luminance"
-msgstr "BT2020 luminance non-constante"
+msgstr "Luminance non constante dérivée de la chrominance"
#: src/lib/ffmpeg_content.cc:536
msgid "Colour primaries"
@@ -792,7 +790,7 @@ msgstr "Erreur indéterminée."
#: src/lib/ffmpeg_content.cc:532
msgid "JEDEC P22"
-msgstr ""
+msgstr "JEDEC P22"
#: src/lib/config.cc:308 src/lib/config.cc:821
msgid "KDM delivery: $CPL_NAME"
@@ -1163,7 +1161,7 @@ msgstr ""
#: src/lib/dcp_content.cc:521
msgid "There is no video in this DCP"
-msgstr ""
+msgstr "Il n'y a aucune vidéo dans ce DCP"
#: src/lib/job.cc:173
msgid ""
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 3eb5ee30e..7da5f9f90 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -157,18 +157,27 @@ seconds_to_approximate_hms (int s)
string ap;
- bool const hours = h > 0;
- bool const minutes = h < 6 && m > 0;
- bool const seconds = h == 0 && m < 10 && s > 0;
+ bool hours = h > 0;
+ bool minutes = h < 6 && m > 0;
+ bool seconds = h == 0 && m < 10 && s > 0;
- if (hours) {
- if (m > 30 && !minutes) {
- /// TRANSLATORS: h here is an abbreviation for hours
- ap += locale_convert<string>(h + 1) + _("h");
- } else {
- /// TRANSLATORS: h here is an abbreviation for hours
- ap += locale_convert<string>(h) + _("h");
+ if (m > 30 && !minutes) {
+ /* round up the hours */
+ ++h;
+ }
+ if (s > 30 && !seconds) {
+ /* round up the minutes */
+ ++m;
+ if (m == 60) {
+ m = 0;
+ minutes = false;
+ ++h;
}
+ }
+
+ if (hours) {
+ /// TRANSLATORS: h here is an abbreviation for hours
+ ap += locale_convert<string>(h) + _("h");
if (minutes || seconds) {
ap += N_(" ");
@@ -176,14 +185,8 @@ seconds_to_approximate_hms (int s)
}
if (minutes) {
- /* Minutes */
- if (s > 30 && !seconds) {
- /// TRANSLATORS: m here is an abbreviation for minutes
- ap += locale_convert<string>(m + 1) + _("m");
- } else {
- /// TRANSLATORS: m here is an abbreviation for minutes
- ap += locale_convert<string>(m) + _("m");
- }
+ /// TRANSLATORS: m here is an abbreviation for minutes
+ ap += locale_convert<string>(m) + _("m");
if (seconds) {
ap += N_(" ");