summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-09 13:58:37 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-09 13:58:37 +0100
commitabe21002bc84db630d860bc304261497cfd71f9b (patch)
tree0919527c133b2dd9aed50b88d025ed07dbd50f14
parenta650d922e141930e40759cdbf97135321523ecb3 (diff)
Move some updates from content_change to player_change.
So far as I can see there's no need for them to respond to content_change, and it's neater to do it all in one place.
-rw-r--r--src/wx/film_viewer.cc18
-rw-r--r--src/wx/film_viewer.h1
2 files changed, 4 insertions, 15 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index bfacbdfe1..1993f0011 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -180,7 +180,6 @@ FilmViewer::set_film (shared_ptr<Film> film)
_player->set_play_referenced ();
_film->Change.connect (boost::bind (&FilmViewer::film_change, this, _1, _2));
- _film->ContentChange.connect (boost::bind(&FilmViewer::content_change, this, _1, _3));
_film->LengthChange.connect (boost::bind(&FilmViewer::film_length_change, this));
_player->Change.connect (boost::bind (&FilmViewer::player_change, this, _1, _2, _3));
@@ -402,6 +401,10 @@ FilmViewer::player_change (ChangeType type, int property, bool frequent)
if (!refreshed) {
slow_refresh ();
}
+
+ if (property == TextContentProperty::USE || property == TextContentProperty::TYPE || property == TextContentProperty::DCP_TRACK) {
+ _closed_captions_dialog->update_tracks (_film);
+ }
}
void
@@ -708,19 +711,6 @@ FilmViewer::gets () const
void
-FilmViewer::content_change (ChangeType type, int property)
-{
- if (type != ChangeType::DONE) {
- return;
- }
-
- if (property == TextContentProperty::USE || property == TextContentProperty::TYPE || property == TextContentProperty::DCP_TRACK) {
- _closed_captions_dialog->update_tracks (_film);
- }
-}
-
-
-void
FilmViewer::image_changed (shared_ptr<PlayerVideo> pv)
{
emit (boost::bind(boost::ref(ImageChanged), pv));
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 9cbedc7cb..125e4fd2d 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -156,7 +156,6 @@ private:
void idle_handler ();
void request_idle_display_next_frame ();
void film_change (ChangeType, Film::Property);
- void content_change (ChangeType, int property);
void recreate_butler ();
void config_changed (Config::Property);
void film_length_change ();