summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-26 23:36:24 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-26 23:36:24 +0100
commit4616b19fb5241a54c9d57f7a91bb975f41aed14b (patch)
treed067450cb12dd3629fe88ef9a578c6b1cabe7884 /src/wx
parentf1d30fb114b3b2c6ccd8fdf5823e7cd6b26c1eef (diff)
parent20fa26ea6ecfdbecea8bb1230c8388cce3fd521f (diff)
Merge master.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/about_dialog.cc1
-rw-r--r--src/wx/kdm_dialog.cc23
-rw-r--r--src/wx/kdm_dialog.h2
-rw-r--r--src/wx/po/de_DE.po12
-rw-r--r--src/wx/po/es_ES.po12
-rw-r--r--src/wx/po/fr_FR.po12
-rw-r--r--src/wx/po/it_IT.po12
-rw-r--r--src/wx/po/nl_NL.po12
-rw-r--r--src/wx/po/sv_SE.po12
-rw-r--r--src/wx/timeline.cc28
-rw-r--r--src/wx/timeline.h4
-rw-r--r--src/wx/timing_panel.cc14
-rw-r--r--src/wx/wscript4
13 files changed, 103 insertions, 45 deletions
diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc
index 21274cda2..b8eecc90a 100644
--- a/src/wx/about_dialog.cc
+++ b/src/wx/about_dialog.cc
@@ -116,6 +116,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
supported_by.Add (wxT ("Manual AC"));
supported_by.Add (wxT ("Kambiz Afshar"));
supported_by.Add (wxT ("Louis Belloisy"));
+ supported_by.Add (wxT ("Mike Blakesley"));
supported_by.Add (wxT ("Jeff Boot"));
supported_by.Add (wxT ("Kieran Carroll"));
supported_by.Add (wxT ("Frank Cianciolo"));
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 6750e0e98..0fdb1fe50 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -159,6 +159,14 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, 0);
+ add_label_to_sizer (table, this, _("KDM type"), true);
+ _type = new wxChoice (this, wxID_ANY);
+ _type->Append ("Modified Transitional 1");
+ _type->Append ("DCI Any");
+ _type->Append ("DCI Specific");
+ table->Add (_type, 1, wxEXPAND);
+ _type->SetSelection (0);
+
_write_to = new wxRadioButton (this, wxID_ANY, _("Write to"));
table->Add (_write_to, 1, wxEXPAND);
@@ -480,6 +488,21 @@ KDMDialog::write_to () const
return _write_to->GetValue ();
}
+dcp::Formulation
+KDMDialog::formulation () const
+{
+ switch (_type->GetSelection()) {
+ case 0:
+ return dcp::MODIFIED_TRANSITIONAL_1;
+ case 1:
+ return dcp::DCI_ANY;
+ case 2:
+ return dcp::DCI_SPECIFIC;
+ default:
+ assert (false);
+ }
+}
+
void
KDMDialog::update_cpl_choice ()
{
diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h
index 6327b29e8..0fc95db84 100644
--- a/src/wx/kdm_dialog.h
+++ b/src/wx/kdm_dialog.h
@@ -48,6 +48,7 @@ public:
boost::filesystem::path cpl () const;
boost::filesystem::path directory () const;
bool write_to () const;
+ dcp::Formulation formulation () const;
private:
void add_cinema (boost::shared_ptr<Cinema>);
@@ -83,6 +84,7 @@ private:
wxStaticText* _dcp_directory;
wxStaticText* _cpl_id;
wxStaticText* _cpl_annotation_text;
+ wxChoice* _type;
wxRadioButton* _write_to;
#ifdef DCPOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _folder;
diff --git a/src/wx/po/de_DE.po b/src/wx/po/de_DE.po
index 017383c03..d0dcccb75 100644
--- a/src/wx/po/de_DE.po
+++ b/src/wx/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-06-21 04:06+0100\n"
"Last-Translator: Carsten Kurz\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -941,7 +941,7 @@ msgstr "Untertitel Sprache (z.B. EN)"
msgid "Subtitles"
msgstr "Untertitel"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr "Unterstützt durch"
@@ -965,7 +965,7 @@ msgstr "Gebiet (z.B. UK)"
msgid "Test version "
msgstr "Test Version"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
msgid "Tested by"
msgstr "Getestet von"
@@ -1148,7 +1148,7 @@ msgstr ""
"Ihr DCP hat weniger als 6 Audiokanäle. Das kann auf manchen Projektoren zu "
"Problemen führen."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
msgid "audio"
msgstr "Ton"
@@ -1173,7 +1173,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr "Standbild"
@@ -1181,7 +1181,7 @@ msgstr "Standbild"
msgid "times"
msgstr "Zeiten"
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
msgid "video"
msgstr "Bild"
diff --git a/src/wx/po/es_ES.po b/src/wx/po/es_ES.po
index d7e48c045..d84e5355c 100644
--- a/src/wx/po/es_ES.po
+++ b/src/wx/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libdcpomatic-wx\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-04-20 12:06-0500\n"
"Last-Translator: Manuel AC <manuel.acevedo@civantos.>\n"
"Language-Team: Manuel AC <manuel.acevedo@civantos.com>\n"
@@ -947,7 +947,7 @@ msgstr "Idioma del subtítulo (ej. EN)"
msgid "Subtitles"
msgstr "Subtítulos"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr "Soportado por"
@@ -972,7 +972,7 @@ msgstr "Territorio (ej. ES)"
msgid "Test version "
msgstr "Versión en prueba"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
msgid "Tested by"
msgstr "Comprobado por"
@@ -1156,7 +1156,7 @@ msgstr ""
"Tu DCP tiene menos de 6 canales de audio. Esto puede causar problemas con "
"algunos proyectores."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
msgid "audio"
msgstr "audio"
@@ -1181,7 +1181,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr "fijo"
@@ -1189,7 +1189,7 @@ msgstr "fijo"
msgid "times"
msgstr "veces"
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
msgid "video"
msgstr "vídeo"
diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po
index 9801710eb..766bd3ad3 100644
--- a/src/wx/po/fr_FR.po
+++ b/src/wx/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic FRENCH\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-06-20 16:08+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -939,7 +939,7 @@ msgstr "Langue de sous-titres (ex. FR)"
msgid "Subtitles"
msgstr "Sous-titres"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr "Soutenu par"
@@ -963,7 +963,7 @@ msgstr "Territoire (ex. FR)"
msgid "Test version "
msgstr "Version Test"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
msgid "Tested by"
msgstr "Testé par"
@@ -1145,7 +1145,7 @@ msgstr ""
"Votre DCP a moins de 6 canaux audio. Cela peut créer des problèmes de "
"lecture sur certains projecteurs."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
msgid "audio"
msgstr "audio"
@@ -1170,7 +1170,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr "fixe"
@@ -1178,7 +1178,7 @@ msgstr "fixe"
msgid "times"
msgstr "fois"
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
msgid "video"
msgstr "vidéo"
diff --git a/src/wx/po/it_IT.po b/src/wx/po/it_IT.po
index 79febb5ab..7789601a7 100644
--- a/src/wx/po/it_IT.po
+++ b/src/wx/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-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-02-03 10:46+0100\n"
"Last-Translator: William Fanelli <william.f@impronte.com>\n"
"Language-Team: \n"
@@ -958,7 +958,7 @@ msgstr "Lingua dei Sottotitoli (es. FR)"
msgid "Subtitles"
msgstr "Sottotitoli"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr ""
@@ -984,7 +984,7 @@ msgstr "Nazione (es. UK)"
msgid "Test version "
msgstr "Versione di test"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
msgid "Tested by"
msgstr ""
@@ -1167,7 +1167,7 @@ msgstr ""
"Il vostro DCP ha meno di 6 canali audio. Questo può causare problemi su "
"alcuni proiettori."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
#, fuzzy
msgid "audio"
msgstr "Audio"
@@ -1193,7 +1193,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr ""
@@ -1201,7 +1201,7 @@ msgstr ""
msgid "times"
msgstr ""
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
#, fuzzy
msgid "video"
msgstr "Video"
diff --git a/src/wx/po/nl_NL.po b/src/wx/po/nl_NL.po
index 514ec4665..b33e4a748 100644
--- a/src/wx/po/nl_NL.po
+++ b/src/wx/po/nl_NL.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: DCP-o-matic\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-03-30 19:40+0100\n"
"Last-Translator: Theo Kooijmans <tkooijmans@universaldv.nl>\n"
"Language-Team: UniversalDV <TKooijmans@universaldv.nl>\n"
@@ -953,7 +953,7 @@ msgstr "Ondertitel Taal (vb NL)"
msgid "Subtitles"
msgstr "Ondertitels"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr "Ondersteund door"
@@ -978,7 +978,7 @@ msgstr "Grondgebied (vb NL)"
msgid "Test version "
msgstr "Test Versie"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
msgid "Tested by"
msgstr "Getest door"
@@ -1160,7 +1160,7 @@ msgstr ""
"Uw DCP heeft minder dan 6 audio kanalen. This kan problemen geven op sommige "
"projectors."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
msgid "audio"
msgstr "audio"
@@ -1185,7 +1185,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr "still"
@@ -1193,7 +1193,7 @@ msgstr "still"
msgid "times"
msgstr "tijden"
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
msgid "video"
msgstr "video"
diff --git a/src/wx/po/sv_SE.po b/src/wx/po/sv_SE.po
index dd62b1e29..657fe847a 100644
--- a/src/wx/po/sv_SE.po
+++ b/src/wx/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-06-23 00:25+0100\n"
+"POT-Creation-Date: 2014-06-24 14:53+0100\n"
"PO-Revision-Date: 2014-01-19 09:14+0100\n"
"Last-Translator: Adam Klotblixt <adam.klotblixt@gmail.com>\n"
"Language-Team: \n"
@@ -970,7 +970,7 @@ msgstr "Undertextspråk (ex. SV)"
msgid "Subtitles"
msgstr "Undertexter"
-#: src/wx/about_dialog.cc:152
+#: src/wx/about_dialog.cc:153
msgid "Supported by"
msgstr "Stöd från"
@@ -995,7 +995,7 @@ msgstr "Område (ex. SV)"
msgid "Test version "
msgstr "Testversion"
-#: src/wx/about_dialog.cc:197
+#: src/wx/about_dialog.cc:198
#, fuzzy
msgid "Tested by"
msgstr "Översatt av"
@@ -1183,7 +1183,7 @@ msgstr ""
"Din DCP har mindre än 6 audiokanaler. Detta kan medföra problem på vissa "
"projektorer."
-#: src/wx/timeline.cc:216
+#: src/wx/timeline.cc:220
msgid "audio"
msgstr "audio"
@@ -1208,7 +1208,7 @@ msgstr "ms"
msgid "s"
msgstr "s"
-#: src/wx/timeline.cc:239
+#: src/wx/timeline.cc:243
msgid "still"
msgstr "stillbild"
@@ -1217,7 +1217,7 @@ msgstr "stillbild"
msgid "times"
msgstr "tider"
-#: src/wx/timeline.cc:237
+#: src/wx/timeline.cc:241
msgid "video"
msgstr "video"
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 4b56168a1..534f4eda7 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -127,6 +127,10 @@ public:
_track = t;
}
+ void unset_track () {
+ _track = boost::optional<int> ();
+ }
+
optional<int> track () const {
return _track;
}
@@ -386,7 +390,8 @@ Timeline::Timeline (wxWindow* parent, FilmEditor* ed, shared_ptr<Film> film)
SetMinSize (wxSize (640, tracks() * track_height() + 96));
- _playlist_connection = film->playlist()->Changed.connect (bind (&Timeline::playlist_changed, this));
+ _playlist_changed_connection = film->playlist()->Changed.connect (bind (&Timeline::playlist_changed, this));
+ _playlist_content_changed_connection = film->playlist()->ContentChanged.connect (bind (&Timeline::playlist_content_changed, this, _2));
}
void
@@ -441,9 +446,28 @@ Timeline::playlist_changed ()
}
void
+Timeline::playlist_content_changed (int property)
+{
+ ensure_ui_thread ();
+
+ if (property == ContentProperty::POSITION) {
+ assign_tracks ();
+ setup_pixels_per_second ();
+ Refresh ();
+ }
+}
+
+void
Timeline::assign_tracks ()
{
for (ViewList::iterator i = _views.begin(); i != _views.end(); ++i) {
+ shared_ptr<ContentView> c = dynamic_pointer_cast<ContentView> (*i);
+ if (c) {
+ c->unset_track ();
+ }
+ }
+
+ for (ViewList::iterator i = _views.begin(); i != _views.end(); ++i) {
shared_ptr<ContentView> cv = dynamic_pointer_cast<ContentView> (*i);
if (!cv) {
continue;
@@ -680,7 +704,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
if (new_position < DCPTime ()) {
new_position = DCPTime ();
}
-
+
_down_view->content()->set_position (new_position);
shared_ptr<Film> film = _film.lock ();
diff --git a/src/wx/timeline.h b/src/wx/timeline.h
index 4ba1cc425..8f23f6894 100644
--- a/src/wx/timeline.h
+++ b/src/wx/timeline.h
@@ -79,6 +79,7 @@ private:
void right_down (wxMouseEvent &);
void mouse_moved (wxMouseEvent &);
void playlist_changed ();
+ void playlist_content_changed (int);
void resized ();
void assign_tracks ();
void set_position_from_event (wxMouseEvent &);
@@ -105,5 +106,6 @@ private:
ContentMenu _menu;
bool _snap;
- boost::signals2::scoped_connection _playlist_connection;
+ boost::signals2::scoped_connection _playlist_changed_connection;
+ boost::signals2::scoped_connection _playlist_content_changed_connection;
};
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index 9a4551193..df77a2ef1 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -17,6 +17,7 @@
*/
+#include <dcp/raw_convert.h>
#include "lib/content.h"
#include "lib/image_content.h"
#include "timing_panel.h"
@@ -28,7 +29,7 @@ using std::cout;
using std::string;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-using boost::lexical_cast;
+using dcp::raw_convert;
TimingPanel::TimingPanel (FilmEditor* e)
/* horrid hack for apparent lack of context support with wxWidgets i18n code */
@@ -124,7 +125,7 @@ TimingPanel::film_content_changed (int property)
if (content) {
shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (content);
if (vc) {
- _video_frame_rate->SetValue (std_to_wx (lexical_cast<string> (vc->video_frame_rate ())));
+ _video_frame_rate->SetValue (std_to_wx (raw_convert<string> (vc->video_frame_rate (), 5)));
} else {
_video_frame_rate->SetValue ("24");
}
@@ -133,10 +134,11 @@ TimingPanel::film_content_changed (int property)
}
}
+ shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (content);
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (content);
_full_length->set_editable (ic && ic->still ());
_play_length->set_editable (!ic || !ic->still ());
- _video_frame_rate->Enable (ic && !ic->still ());
+ _video_frame_rate->Enable (vc);
_set_video_frame_rate->Enable (false);
}
@@ -201,9 +203,9 @@ TimingPanel::set_video_frame_rate ()
{
ContentList c = _editor->selected_content ();
if (c.size() == 1) {
- shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (c.front ());
- if (ic) {
- ic->set_video_frame_rate (lexical_cast<float> (wx_to_std (_video_frame_rate->GetValue ())));
+ shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c.front ());
+ if (vc) {
+ vc->set_video_frame_rate (raw_convert<float> (wx_to_std (_video_frame_rate->GetValue ())));
}
_set_video_frame_rate->Enable (false);
}
diff --git a/src/wx/wscript b/src/wx/wscript
index 0c87c09be..bc21f9d81 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -64,6 +64,10 @@ def configure(conf):
conf.env.STLIB_WXWIDGETS = ['wx_gtk2u_richtext-3.0', 'wx_gtk2u_xrc-3.0', 'wx_gtk2u_qa-3.0', 'wx_baseu_net-3.0', 'wx_gtk2u_html-3.0',
'wx_gtk2u_adv-3.0', 'wx_gtk2u_core-3.0', 'wx_baseu_xml-3.0', 'wx_baseu-3.0']
conf.env.LIB_WXWIDGETS = ['tiff', 'SM', 'dl', 'jpeg', 'png', 'X11', 'expat']
+ if conf.env.TARGET_DEBIAN and conf.env.DEBIAN_UNSTABLE:
+ conf.env.LIB_WXWIDGETS.append('Xxf86vm')
+ conf.env.LIB_WXWIDGETS.append('Xext')
+ conf.env.LIB_WXWIDGETS.append('X11')
conf.in_msg = 1
wx_version = conf.check_cfg(package='', path=conf.options.wx_config, args='--version').strip()