tree.row_activated.connect (on_row_activated);
icons.item_activated.connect (on_item_activated);
store.row_changed.connect (on_row_changed);
+ store.row_inserted.connect (on_row_changed);
store.search_finished.connect (on_search_finished);
}
for (int i = a; i <= b; i++) {
var path = new TreePath.from_indices (i);
TreeIter iter;
- if (store.get_iter (out iter, path)) {
- Movie movie;
- store.get (iter, MovieListStore.Columns.MOVIE, out movie);
- if (movie != null) {
- if (poster_mode_) {
- if (movie.poster == null || movie.poster.small == null) try {
- poster_factory.queue_thumbnail (movie, Poster.SMALL_WIDTH, Poster.SMALL_HEIGHT, false, receive_poster_small);
- } catch (Error e) {
- warning ("Failed to queue poster request: %s\n", e.message);
- }
- } else {
- if (movie.poster == null || movie.poster.icon == null) try {
- poster_factory.queue_thumbnail (movie, Poster.ICON_WIDTH, Poster.ICON_HEIGHT, false, receive_poster_icon);
- } catch (Error e) {
- warning ("Failed to queue poster request: %s\n", e.message);
- }
- }
+ if (!store.get_iter (out iter, path))
+ continue;
+
+ Movie movie;
+ store.get (iter, MovieListStore.Columns.MOVIE, out movie);
+ if (movie == null)
+ continue;
+
+ if (poster_mode_) {
+ if (movie.poster == null || movie.poster.small == null) try {
+ poster_factory.queue (movie,
+ Poster.SMALL_WIDTH,
+ Poster.SMALL_HEIGHT,
+ true,
+ receive_poster_small);
+ } catch (Error e) {
+ warning ("Failed to queue poster request: %s\n", e.message);
+ }
+ } else {
+ if (movie.poster == null || movie.poster.icon == null) try {
+ poster_factory.queue (movie,
+ Poster.ICON_WIDTH,
+ Poster.ICON_HEIGHT,
+ true,
+ receive_poster_icon);
+ } catch (Error e) {
+ warning ("Failed to queue poster request: %s\n", e.message);
}
}
}
else
poster = new Poster ();
poster.small = pixbuf;
+ // Notify store of the poster change
movie.poster = poster;
}
else
poster = new Poster ();
poster.icon = pixbuf;
+ // Notify store of the poster change
movie.poster = poster;
}