diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-10 23:47:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-11 11:58:15 +0100 |
| commit | 195eb8204245c7b7765831d1cc1de295b63eb8a2 (patch) | |
| tree | 54e2365bc422db6ea79f5a7c3be15e76b547036b /src | |
| parent | afff21c17f2e9cbc295b5b6c71d7b3f8c9ec96fb (diff) | |
Fix play button behaviour.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/control_film_viewer.cc | 16 | ||||
| -rw-r--r-- | src/wx/control_film_viewer.h | 2 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 2 | ||||
| -rw-r--r-- | src/wx/film_viewer.h | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/src/wx/control_film_viewer.cc b/src/wx/control_film_viewer.cc index 69b2b5b5c..739b02765 100644 --- a/src/wx/control_film_viewer.cc +++ b/src/wx/control_film_viewer.cc @@ -96,6 +96,8 @@ ControlFilmViewer::ControlFilmViewer (wxWindow* parent, bool outline_content, bo _viewer->ImageChanged.connect (boost::bind(&ControlFilmViewer::image_changed, this, _1)); _viewer->PositionChanged.connect (boost::bind(&ControlFilmViewer::position_changed, this)); + _viewer->Started.connect (boost::bind(&ControlFilmViewer::started, this)); + _viewer->Stopped.connect (boost::bind(&ControlFilmViewer::stopped, this)); set_film (shared_ptr<Film> ()); @@ -107,6 +109,18 @@ ControlFilmViewer::ControlFilmViewer (wxWindow* parent, bool outline_content, bo } void +ControlFilmViewer::started () +{ + _play_button->SetValue (true); +} + +void +ControlFilmViewer::stopped () +{ + _play_button->SetValue (false); +} + +void ControlFilmViewer::position_changed () { update_position_label (); @@ -380,14 +394,12 @@ ControlFilmViewer::show_closed_captions () void ControlFilmViewer::start () { - _play_button->SetValue (true); _viewer->start (); } bool ControlFilmViewer::stop () { - _play_button->SetValue (false); return _viewer->stop (); } diff --git a/src/wx/control_film_viewer.h b/src/wx/control_film_viewer.h index b3ad701d8..cef5cb552 100644 --- a/src/wx/control_film_viewer.h +++ b/src/wx/control_film_viewer.h @@ -58,6 +58,8 @@ private: void outline_content_changed (); void eye_changed (); void position_changed (); + void started (); + void stopped (); boost::shared_ptr<Film> _film; boost::shared_ptr<FilmViewer> _viewer; diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index b7e414444..85b0effbe 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -411,6 +411,7 @@ FilmViewer::start () _playing = true; _dropped = 0; timer (); + Started (); } bool @@ -426,6 +427,7 @@ FilmViewer::stop () } _playing = false; + Stopped (); return true; } diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index c68b6ade0..d080c79a5 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -95,6 +95,8 @@ public: boost::signals2::signal<void (boost::weak_ptr<PlayerVideo>)> ImageChanged; boost::signals2::signal<void ()> PositionChanged; + boost::signals2::signal<void ()> Started; + boost::signals2::signal<void ()> Stopped; private: void paint_panel (); |
