Merge master.
authorCarl Hetherington <cth@carlh.net>
Sun, 31 Aug 2014 23:06:19 +0000 (00:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 31 Aug 2014 23:06:19 +0000 (00:06 +0100)
ChangeLog
platform/osx/waf
run/dcpomatic
src/lib/config.cc
src/lib/config.h
src/lib/util.cc
src/lib/writer.cc
src/wx/about_dialog.cc
src/wx/config_dialog.cc
src/wx/po/de_DE.po
src/wx/video_panel.cc

index 36a282919097ce8a2bd73f110cf54f7af97bb105..bdfdadfef8e7eb7b072633771838ce766010999c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-08-31  Carl Hetherington  <cth@carlh.net>
 
+       * Remove configurable CPL <Creator> 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).
 
index 851f96d45c1376edfb0886556e59a309e20579fc..0cb146cff60c9f9cbef23040f908d7b0a31c19ad 100755 (executable)
@@ -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"
index b0036fb6ff1b5743a55e3e0f8366741725a17fa5..9cf5a26194961e92fb790b8cc9d4292e14829699 100755 (executable)
@@ -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
index 7e37625878191a87db0e7bf1cf3959e5b3fb68e3..1f5a25ae4dcb52f785930d8948bb5998f25dbb23 100644 (file)
@@ -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"));
 
index 05bc7945f1df80bb77c6f846d01c0a161ac80810..9a18086829af77194d973941399b93ee80c1a52a 100644 (file)
@@ -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<PresetColourConversion> _colour_conversions;
index c9685aa44ff3ee811e1f7e77e052b8047ca8ff1d..c09ed9cb24bb5dbdcb1f9c4c26d4e31b853022c6 100644 (file)
@@ -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
 }
index eda82f27729c6b810b6850679c0562eeadb24ba2..a023d5cd2e1cc28992573e180bc2ccd9cc540cbc 100644 (file)
@@ -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<const dcp::Signer> signer;
index 349581972525889c8110f7656f7d9f1ec85301c0..b62683c8f81bff6e5018362aab85cf4e370ea0b3 100644 (file)
@@ -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"));
index c1eee3c7b1cec0026370d61072f73f3fa5db543a..009467afa0fbfdbc7aceaf1eb0de191323a59be9 100644 (file)
@@ -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
index b158d231fb26b9f57d96d8db544701a15021232e..4d57a34bc441410cbb6cd5c2f519adcbcbd179d8 100644 (file)
@@ -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
index cd831baed7cbc5b97324d97a1a603773d0ee0614..a5d197c2a15324e81b32e557ed8d45ad0a889931 100644 (file)
@@ -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);