IMDb plaintext downloader: fix progress indicator
[cinaest] / src / movie-list-store.vala
index b77c138..7a9d208 100644 (file)
@@ -39,13 +39,22 @@ public class MovieListStore : ListStore, TreeModel {
        };
        private Gdk.Pixbuf no_poster;
        private MoviePoster.Factory poster_factory;
-       public MovieSource source;
        private MovieFilter filter;
        public bool update_running { get; set; }
        private Cancellable cancellable;
 
        public signal void search_finished (int movies);
 
+       private MovieSource _source;
+       public MovieSource source {
+               get {
+                       return _source;
+               }
+               set {
+                       _source = value;
+               }
+       }
+
        construct {
                set_column_types (base_type);
                no_poster = null;
@@ -73,7 +82,7 @@ public class MovieListStore : ListStore, TreeModel {
                        movie.notify.disconnect (this.on_movie_changed);
                        base.remove (iter);
 
-                       if (source.get_editable ()) {
+                       if (SourceFlags.EDITABLE in source.get_flags ()) {
                                source.delete_movie (movie);
                        }
 
@@ -94,7 +103,7 @@ public class MovieListStore : ListStore, TreeModel {
        }
 
        public bool get_editable () {
-               return source.get_editable ();
+               return (SourceFlags.EDITABLE in source.get_flags ());
        }
 
        public bool get_iter_from_movie (out TreeIter iter, Movie movie_a) {