From 9d904847726295852b78b0029939d0f848793d06 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 May 2018 01:17:59 +0100 Subject: Fix seconds_to_approximate_hms sometimes saying things like 1h60m (#1314). --- src/lib/util.cc | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'src') 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(h + 1) + _("h"); - } else { - /// TRANSLATORS: h here is an abbreviation for hours - ap += locale_convert(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(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(m + 1) + _("m"); - } else { - /// TRANSLATORS: m here is an abbreviation for minutes - ap += locale_convert(m) + _("m"); - } + /// TRANSLATORS: m here is an abbreviation for minutes + ap += locale_convert(m) + _("m"); if (seconds) { ap += N_(" "); -- cgit v1.2.3 From c0a35cebbdd2b2504011ebce1c9885479f78d1d1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 May 2018 00:39:24 +0100 Subject: Save config changes made through the batch converter. --- src/tools/dcpomatic_batch.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src') 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 _last_parent; wxSizer* _sizer; wxPreferencesEditor* _config_dialog; -- cgit v1.2.3 From f2dd76c91f1fd314df12d5dff3b736daf783b9b3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 May 2018 00:56:25 +0100 Subject: Fix job ordering when sending notification emails (more of #1286). --- src/lib/job_manager.cc | 15 +++++++++++++++ src/lib/job_manager.h | 1 + src/wx/job_view.cc | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') 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 j) return j; } +shared_ptr +JobManager::add_after (shared_ptr after, shared_ptr j) +{ + { + boost::mutex::scoped_lock lm (_mutex); + list >::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 (j))); + + return j; +} + list > 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 add (boost::shared_ptr); + boost::shared_ptr add_after (boost::shared_ptr after, boost::shared_ptr j); std::list > get () const; bool work_to_do () const; bool errors () const; diff --git a/src/wx/job_view.cc b/src/wx/job_view.cc index d0086ff81..43d6f2fed 100644 --- a/src/wx/job_view.cc +++ b/src/wx/job_view.cc @@ -142,7 +142,7 @@ JobView::finished () string body = Config::instance()->notification_email(); boost::algorithm::replace_all (body, "$JOB_NAME", _job->name()); boost::algorithm::replace_all (body, "$JOB_STATUS", _job->status()); - JobManager::instance()->add (shared_ptr (new SendNotificationEmailJob (body))); + JobManager::instance()->add_after (_job, shared_ptr (new SendNotificationEmailJob (body))); } } } -- cgit v1.2.3 From 3adf7f85df698aafc372a8b80822ee4a1f86e3b2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 May 2018 23:33:23 +0100 Subject: Updated fr_FR translation from Thierry Journet. --- ChangeLog | 4 ++++ src/lib/po/fr_FR.po | 14 ++++++-------- src/tools/po/fr_FR.po | 2 +- src/wx/po/fr_FR.po | 16 +++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 8c75157b7..aff3175a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-05-29 Carl Hetherington + + * Updated fr_FR translation from Thierry Journet. + 2018-05-27 Carl Hetherington * Updated it_IT translation from Felice D'Andrea. 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 \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/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 \n" "Language-Team: \n" "Language: fr_FR\n" diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po index 8aa1d0bee..16062bda7 100644 --- a/src/wx/po/fr_FR.po +++ b/src/wx/po/fr_FR.po @@ -3,14 +3,12 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: src/wx/audio_panel.cc:56 src/wx/subtitle_panel.cc:56 -#: src/wx/video_panel.cc:82 msgid "" 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:35+0100\n" +"PO-Revision-Date: 2018-05-29 23:41+0100\n" "Last-Translator: Grégoire AUSINA \n" "Language-Team: \n" "Language: fr_FR\n" @@ -28,7 +26,7 @@ msgstr "%" #: src/wx/film_name_location_dialog.cc:130 msgid "%1 already exists as a file, so you cannot use it for a film." msgstr "" -"%1 existe déjà comme nom de fichier. VOus ne pouvez pas l'utiliser pour un " +"%1 existe déjà comme nom de fichier. Vous ne pouvez pas l'utiliser pour un " "projet." #: src/wx/kdm_dialog.cc:153 @@ -290,7 +288,7 @@ msgstr "Audio" #: src/wx/isdcf_metadata_dialog.cc:40 msgid "Audio Language (e.g. EN)" -msgstr "Langue audio (ex. FR)" +msgstr "Langue audio (par ex. : FR)" #: src/wx/player_information.cc:132 #, c-format @@ -323,7 +321,7 @@ msgstr "B" #: src/wx/full_config_dialog.cc:760 msgid "BCC address" -msgstr "Adresse BCC" +msgstr "Adresse CCI" #: src/wx/colour_conversion_editor.cc:144 msgid "Blue chromaticity" @@ -1206,9 +1204,8 @@ msgid "MOV files (*.mov)|*.mov" msgstr "FIchiers MOV (*.mov)|*.mov" #: src/wx/export_dialog.cc:33 -#, fuzzy msgid "MP4 / H.264" -msgstr "H.264" +msgstr "MP4 / H.264" #: src/wx/export_dialog.cc:38 msgid "MP4 files (*.mp4)|*.mp4" @@ -1307,7 +1304,8 @@ msgstr "DEMANDE de KDM:" msgid "NEEDS OV: " msgstr "OV Nécessaire:" -#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72 src/wx/screen_dialog.cc:68 +#: src/wx/cinema_dialog.cc:50 src/wx/dcp_panel.cc:72 +#: src/wx/screen_dialog.cc:68 msgid "Name" msgstr "Nom" -- cgit v1.2.3 From d2ee8239585be648ac63e560cb9cd363352ff11c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 30 May 2018 21:19:09 +0100 Subject: OS X preference-sizing tweaks. --- src/wx/full_config_dialog.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 85711aa31..c371239b7 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -689,12 +689,7 @@ class EmailPage : public StandardPage { public: EmailPage (wxSize panel_size, int border) -#ifdef DCPOMATIC_OSX - /* We have to force both width and height of this one */ - : StandardPage (wxSize (480, 128), border) -#else : StandardPage (panel_size, border) -#endif {} wxString GetName () const @@ -785,7 +780,7 @@ public: KDMEmailPage (wxSize panel_size, int border) #ifdef DCPOMATIC_OSX /* We have to force both width and height of this one */ - : StandardPage (wxSize (480, 128), border) + : StandardPage (wxSize (panel_size.GetWidth(), 128), border) #else : StandardPage (panel_size, border) #endif @@ -905,7 +900,7 @@ public: NotificationsPage (wxSize panel_size, int border) #ifdef DCPOMATIC_OSX /* We have to force both width and height of this one */ - : StandardPage (wxSize (480, 128), border) + : StandardPage (wxSize (panel_size.GetWidth(), 128), border) #else : StandardPage (panel_size, border) #endif @@ -1076,7 +1071,7 @@ public: CoverSheetPage (wxSize panel_size, int border) #ifdef DCPOMATIC_OSX /* We have to force both width and height of this one */ - : StandardPage (wxSize (480, 128), border) + : StandardPage (wxSize (panel_size.GetWidth(), 128), border) #else : StandardPage (panel_size, border) #endif @@ -1385,7 +1380,7 @@ create_full_config_dialog () the containing window doesn't shrink too much when we select those panels. This is obviously an unpleasant hack. */ - wxSize ps = wxSize (520, -1); + wxSize ps = wxSize (600, -1); int const border = 16; #else wxSize ps = wxSize (-1, -1); -- cgit v1.2.3