Movie list window: hide the list when a search returns no result
authorPhilipp Zabel <philipp.zabel@gmail.com>
Mon, 9 Nov 2009 22:36:54 +0000 (23:36 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Tue, 10 Nov 2009 11:21:15 +0000 (12:21 +0100)
src/movie-list-window.vala

index df26494..cd76937 100644 (file)
@@ -144,7 +144,14 @@ public class MovieListWindow : StackableWindow {
        }
 
        private void on_update_running_changed (GLib.Object source, ParamSpec spec) {
+               TreeIter iter;
+
                Hildon.gtk_window_set_progress_indicator (this, (int) store.update_running);
+               // Update finished, but store still empty?
+               if (!store.update_running && !store.get_iter_first (out iter)) {
+                       movie_list.hide ();
+                       no_movies.show ();
+               }
        }
 }