From: Carl Hetherington Date: Sun, 31 Aug 2014 23:06:19 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~630 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=cf8bbea2de38c4e9ac140f55b27311b7b6dcd814;hp=22b9f3b2090d8bdfe52cda1e69d3acbe874f1ce5 Merge master. --- diff --git a/ChangeLog b/ChangeLog index 36a282919..bdfdadfef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2014-08-31 Carl Hetherington + * Remove configurable CPL and use "DCP-o-matic (version) (git)" + instead. + + * Fix lack of i18n of strings from src/lib/po on OS X. + * Give a hint when content and container aspect ratios are not the same (#392). diff --git a/platform/osx/waf b/platform/osx/waf index 851f96d45..0cb146cff 100755 --- a/platform/osx/waf +++ b/platform/osx/waf @@ -2,8 +2,8 @@ set -e -ENV=/Users/carl/Environments/osx/64 -DEPS=/Users/carl/cdist/64 +ENV=/Users/carl/Environments/osx/10.6/64 +DEPS=/Users/carl/dcpomatic-deps export PKG_CONFIG_PATH=$DEPS/lib/pkgconfig:$ENV/lib/pkgconfig:/usr/lib/pkgconfig export LINKFLAGS="-L$ENV/lib" diff --git a/run/dcpomatic b/run/dcpomatic index b0036fb6f..9cf5a2619 100755 --- a/run/dcpomatic +++ b/run/dcpomatic @@ -4,8 +4,8 @@ if [ `uname -s` == "Darwin" ]; then # Some time ago we could start DCP-o-matic on OS X just by running the executable, in # the same way as Linux. This doesn't work any more. - ENV=$HOME/Environments/osx/64/lib - DEP=$HOME/cdist/64/lib + ENV=$HOME/Environments/osx/10.6/64/lib + DEP=$HOME/dcpomatic-deps/lib app=build/platform/osx/DCP-o-matic.app macos=$app/Contents/MacOS @@ -56,11 +56,19 @@ if [ `uname -s` == "Darwin" ]; then cp $ENV/libquickmail*.dylib $lib cp $ENV/libcurl*.dylib $lib cp $ENV/libffi*.dylib $lib + cp $ENV/libiconv*.dylib $lib cp icons/defaults.png $resources cp icons/servers.png $resources cp icons/tms.png $resources cp icons/colour_conversions.png $resources cp icons/kdm_email.png $resources + + for lang in de_DE es_ES fr_FR it_IT sv_SE nl_NL; do + mkdir "$resources/$lang" + cp build/src/lib/mo/$lang/*.mo "$resources/$lang" + cp build/src/wx/mo/$lang/*.mo "$resources/$lang" + cp build/src/tools/mo/$lang/*.mo "$resources/$lang" + done sed -e "s/@VERSION@/test/g" platform/osx/Info.plist.in > $app/Contents/Info.plist @@ -76,8 +84,7 @@ if [ `uname -s` == "Darwin" ]; then fi done - cd build/platform/osx/DCP-o-matic.app/Contents/MacOS - ./dcpomatic $* + open build/platform/osx/DCP-o-matic.app else export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH diff --git a/src/lib/config.cc b/src/lib/config.cc index 7e3762587..1f5a25ae4 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -160,9 +160,12 @@ Config::read () _default_dcp_content_type = DCPContentType::from_isdcf_name (c.get ()); } - _dcp_metadata.issuer = f.optional_string_child ("DCPMetadataIssuer").get_value_or (""); - _dcp_metadata.creator = f.optional_string_child ("DCPMetadataCreator").get_value_or (""); - + if (f.optional_string_child ("DCPMetadataIssuer")) { + _dcp_issuer = f.string_child ("DCPMetadataIssuer"); + } else if (f.optional_string_child ("DCPIssuer")) { + _dcp_issuer = f.string_child ("DCPIssuer"); + } + if (version && version.get() >= 2) { _default_isdcf_metadata = ISDCFMetadata (f.node_child ("ISDCFMetadata")); } else { @@ -335,8 +338,7 @@ Config::write () const if (_default_dcp_content_type) { root->add_child("DefaultDCPContentType")->add_child_text (_default_dcp_content_type->isdcf_name ()); } - root->add_child("DCPMetadataIssuer")->add_child_text (_dcp_metadata.issuer); - root->add_child("DCPMetadataCreator")->add_child_text (_dcp_metadata.creator); + root->add_child("DCPIssuer")->add_child_text (_dcp_issuer); _default_isdcf_metadata.as_xml (root->add_child ("ISDCFMetadata")); diff --git a/src/lib/config.h b/src/lib/config.h index 05bc7945f..9a1808682 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -146,8 +146,8 @@ public: return _default_dcp_content_type; } - dcp::XMLMetadata dcp_metadata () const { - return _dcp_metadata; + std::string dcp_issuer () const { + return _dcp_issuer; } int default_j2k_bandwidth () const { @@ -322,8 +322,8 @@ public: changed (); } - void set_dcp_metadata (dcp::XMLMetadata m) { - _dcp_metadata = m; + void set_dcp_issuer (std::string i) { + _dcp_issuer = i; changed (); } @@ -471,7 +471,7 @@ private: Ratio const * _default_scale; Ratio const * _default_container; DCPContentType const * _default_dcp_content_type; - dcp::XMLMetadata _dcp_metadata; + std::string _dcp_issuer; int _default_j2k_bandwidth; int _default_audio_delay; std::vector _colour_conversions; diff --git a/src/lib/util.cc b/src/lib/util.cc index c9685aa44..c09ed9cb2 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -383,35 +383,42 @@ mo_path () } #endif +#ifdef DCPOMATIC_OSX +boost::filesystem::path +mo_path () +{ + return "DCP-o-matic.app/Contents/Resources"; +} +#endif + void dcpomatic_setup_gettext_i18n (string lang) { -#ifdef DCPOMATIC_POSIX +#ifdef DCPOMATIC_LINUX lang += ".UTF8"; #endif if (!lang.empty ()) { - /* Override our environment language; this is essential on - Windows. + /* Override our environment language. Note that the caller must not + free the string passed into putenv(). */ - char cmd[64]; - snprintf (cmd, sizeof(cmd), "LANGUAGE=%s", lang.c_str ()); - putenv (cmd); - snprintf (cmd, sizeof(cmd), "LANG=%s", lang.c_str ()); - putenv (cmd); - snprintf (cmd, sizeof(cmd), "LC_ALL=%s", lang.c_str ()); - putenv (cmd); + string s = String::compose ("LANGUAGE=%1", lang); + putenv (strdup (s.c_str ())); + s = String::compose ("LANG=%1", lang); + putenv (strdup (s.c_str ())); + s = String::compose ("LC_ALL=%1", lang); + putenv (strdup (s.c_str ())); } setlocale (LC_ALL, ""); textdomain ("libdcpomatic"); -#ifdef DCPOMATIC_WINDOWS +#if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX) bindtextdomain ("libdcpomatic", mo_path().string().c_str()); bind_textdomain_codeset ("libdcpomatic", "UTF8"); #endif -#ifdef DCPOMATIC_POSIX +#ifdef DCPOMATIC_LINUX bindtextdomain ("libdcpomatic", POSIX_LOCALE_PREFIX); #endif } diff --git a/src/lib/writer.cc b/src/lib/writer.cc index eda82f277..a023d5cd2 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -45,6 +45,7 @@ #include "audio_buffers.h" #include "md5_digester.h" #include "encoded_data.h" +#include "version.h" #include "i18n.h" @@ -486,7 +487,9 @@ Writer::finish () _sound_mxf->hash (boost::bind (&Job::set_progress, job.get(), _1, false)); } - dcp::XMLMetadata meta = Config::instance()->dcp_metadata (); + dcp::XMLMetadata meta; + meta.issuer = Config::instance()->dcp_issuer (); + meta.creator = String::compose ("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); meta.set_issue_date_now (); shared_ptr signer; diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc index 349581972..b62683c8f 100644 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@ -149,6 +149,7 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Tim O'Brien")); supported_by.Add (wxT ("Ivan Pullman")); supported_by.Add (wxT ("Mark Rolfe")); + supported_by.Add (wxT ("David Rosenthal")); supported_by.Add (wxT ("Andrä Steiner")); supported_by.Add (wxT ("Jussi Siponen")); supported_by.Add (wxT ("Lasse Salling")); diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index c1eee3c7b..009467afa 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -306,10 +306,6 @@ public: _issuer = new wxTextCtrl (panel, wxID_ANY); table->Add (_issuer, 1, wxEXPAND); - add_label_to_sizer (table, panel, _("Default creator"), true); - _creator = new wxTextCtrl (panel, wxID_ANY); - table->Add (_creator, 1, wxEXPAND); - Config* config = Config::instance (); _still_length->SetRange (1, 3600); @@ -358,10 +354,8 @@ public: _audio_delay->SetValue (config->default_audio_delay ()); _audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::audio_delay_changed, this)); - _issuer->SetValue (std_to_wx (config->dcp_metadata().issuer)); + _issuer->SetValue (std_to_wx (config->dcp_issuer ())); _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::issuer_changed, this)); - _creator->SetValue (std_to_wx (config->dcp_metadata().creator)); - _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::creator_changed, this)); return panel; } @@ -415,16 +409,7 @@ private: void issuer_changed () { - dcp::XMLMetadata m = Config::instance()->dcp_metadata (); - m.issuer = wx_to_std (_issuer->GetValue ()); - Config::instance()->set_dcp_metadata (m); - } - - void creator_changed () - { - dcp::XMLMetadata m = Config::instance()->dcp_metadata (); - m.creator = wx_to_std (_creator->GetValue ()); - Config::instance()->set_dcp_metadata (m); + Config::instance()->set_dcp_issuer (wx_to_std (_issuer->GetValue ())); } wxSpinCtrl* _j2k_bandwidth; @@ -440,7 +425,6 @@ private: wxChoice* _container; wxChoice* _dcp_content_type; wxTextCtrl* _issuer; - wxTextCtrl* _creator; }; class EncodingServersPage : public wxPreferencesPage, public Page diff --git a/src/wx/po/de_DE.po b/src/wx/po/de_DE.po index b158d231f..4d57a34bc 100644 --- a/src/wx/po/de_DE.po +++ b/src/wx/po/de_DE.po @@ -170,9 +170,8 @@ msgstr "" "weitergegeben." #: src/wx/config_dialog.cc:701 -#, fuzzy msgid "BCC address" -msgstr "CC: Adresse" +msgstr "BCC: Adresse" #: src/wx/job_wrapper.cc:37 #, c-format diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index cd831baed..a5d197c2a 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -363,18 +363,19 @@ VideoPanel::edit_colour_conversion_clicked () void VideoPanel::content_selection_changed () { - VideoContentList sel = _parent->selected_video (); - bool const single = sel.size() == 1; - - _left_crop->set_content (sel); - _right_crop->set_content (sel); - _top_crop->set_content (sel); - _bottom_crop->set_content (sel); - _frame_type->set_content (sel); - _scale->set_content (sel); - - /* Things that are only allowed with single selections */ - _filters_button->Enable (single); + VideoContentList video_sel = _parent->selected_video (); + FFmpegContentList ffmpeg_sel = _parent->selected_ffmpeg (); + + bool const single = video_sel.size() == 1; + + _left_crop->set_content (video_sel); + _right_crop->set_content (video_sel); + _top_crop->set_content (video_sel); + _bottom_crop->set_content (video_sel); + _frame_type->set_content (video_sel); + _scale->set_content (video_sel); + + _filters_button->Enable (single && !ffmpeg_sel.empty ()); _colour_conversion_button->Enable (single); film_content_changed (VideoContentProperty::VIDEO_CROP);