JobManager::instance()->ActiveJobsChanged.connect (
bind (&FilmViewer::active_jobs_changed, this, _1)
);
+
+ setup_sensitivity ();
}
void
return;
}
+ _film_connection = _film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
+
_player->set_approximate_size ();
- _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
+ _player_connection = _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
calculate_sizes ();
get (_position, _last_get_accurate);
calculate_sizes ();
get (_position, _last_get_accurate);
}
+
+void
+FilmViewer::setup_sensitivity ()
+{
+ bool const c = !_film->content().empty ();
+ _slider->Enable (c);
+ _back_button->Enable (c);
+ _forward_button->Enable (c);
+ _play_button->Enable (c);
+ _outline_content->Enable (c);
+ _frame_number->Enable (c);
+ _timecode->Enable (c);
+}
+
+void
+FilmViewer::film_changed (Film::Property p)
+{
+ if (p == Film::CONTENT) {
+ setup_sensitivity ();
+ }
+}
void set_position_text ();
void get (DCPTime, bool);
void refresh_panel ();
+ void setup_sensitivity ();
+ void film_changed (Film::Property);
boost::shared_ptr<Film> _film;
boost::shared_ptr<Player> _player;
* can get the same one that we got last time.
*/
bool _last_get_accurate;
+
+ boost::signals2::scoped_connection _film_connection;
+ boost::signals2::scoped_connection _player_connection;
};