FilmViewer::FilmViewer (Film* f)
: _film (f)
- , _update_button ("Update")
{
_scroller.add (_image);
Gtk::HBox* controls = manage (new Gtk::HBox);
controls->set_spacing (6);
- controls->pack_start (_update_button, false, false);
controls->pack_start (_position_slider);
_vbox.pack_start (_scroller, true, true);
_vbox.pack_start (*controls, false, false);
_vbox.set_border_width (12);
- _update_button.signal_clicked().connect (sigc::mem_fun (*this, &FilmViewer::update_thumbs));
-
_position_slider.set_digits (0);
_position_slider.signal_format_value().connect (sigc::mem_fun (*this, &FilmViewer::format_position_slider_value));
_position_slider.signal_value_changed().connect (sigc::mem_fun (*this, &FilmViewer::position_slider_changed));
{
_film = f;
- _update_button.set_sensitive (_film != 0);
-
if (!_film) {
_image.clear ();
return;
}
ContentType const c = _film->content_type ();
- _update_button.property_visible() = (c == VIDEO);
_position_slider.property_visible() = (c == VIDEO);
}
Glib::RefPtr<Gdk::Pixbuf> _cropped_pixbuf;
Glib::RefPtr<Gdk::Pixbuf> _scaled_pixbuf;
Gtk::HScale _position_slider;
- Gtk::Button _update_button;
Gtk::Allocation _last_scroller_allocation;
};