From: Philipp Zabel Date: Thu, 5 Aug 2010 18:25:36 +0000 (+0200) Subject: Movie list store: hold a reference to the view and freeze when updating X-Git-Url: http://vcs.maemo.org/git/?p=cinaest;a=commitdiff_plain;h=4224094782a4c69dd6f822eca16be9240184bbcf Movie list store: hold a reference to the view and freeze when updating --- diff --git a/src/movie-list-store.vala b/src/movie-list-store.vala index b7c85e2..2bccf67 100644 --- a/src/movie-list-store.vala +++ b/src/movie-list-store.vala @@ -49,6 +49,7 @@ public class MovieListStore : ListStore, TreeModel { public bool update_running { get; set; } public string year_markup = "[%d]"; private Cancellable cancellable; + public Widget view; public signal void search_finished (int movies); @@ -181,8 +182,10 @@ public class MovieListStore : ListStore, TreeModel { if (cancellable.is_cancelled ()) return; + view.freeze_child_notify (); foreach (Movie movie in movies) add (movie, out iter); + view.thaw_child_notify (); } private void receive_poster_icon (Gdk.Pixbuf pixbuf, Movie movie) { diff --git a/src/movie-list-view.vala b/src/movie-list-view.vala index d92a535..d469148 100644 --- a/src/movie-list-view.vala +++ b/src/movie-list-view.vala @@ -163,6 +163,7 @@ public class MovieListView : PannableArea { } tree = create_treeview (window, show_date); + store.view = (Widget) tree; icons = create_iconview ();