+void
+SubtitleView::data_start (ContentTextSubtitle cts)
+{
+ BOOST_FOREACH (dcp::SubtitleString const & i, cts.subs) {
+ wxListItem list_item;
+ list_item.SetId (_subs);
+ _list->InsertItem (list_item);
+ _list->SetItem (_subs, 0, std_to_wx (cts.from().timecode (_frc->source)));
+ _list->SetItem (_subs, 2, std_to_wx (i.text ()));
+ _start_times.push_back (cts.from ());
+ ++_subs;
+ }
+
+ _last_count = cts.subs.size ();
+}
+
+void
+SubtitleView::data_stop (ContentTime time)
+{
+ if (!_last_count) {
+ return;
+ }
+
+ for (int i = _subs - *_last_count; i < _subs; ++i) {
+ _list->SetItem (i, 1, std_to_wx (time.timecode (_frc->source)));
+ }
+}
+
+void
+SubtitleView::subtitle_selected (wxListEvent& ev)
+{
+ if (!Config::instance()->jump_to_selected ()) {
+ return;
+ }
+
+ DCPOMATIC_ASSERT (ev.GetIndex() < int(_start_times.size()));
+ shared_ptr<Content> locked = _content.lock ();
+ DCPOMATIC_ASSERT (locked);
+ _film_viewer->set_position (locked, _start_times[ev.GetIndex()]);
+}