From cbe831ae2133bfa21c66cc1108268a9f0067ab6f Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Fri, 1 Aug 2008 10:52:21 +0200 Subject: [PATCH] Implement populate_from_hit_collection () in the MMGtkHitStore. --- libmmanager-gtk/mm-gtk-hit-store.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libmmanager-gtk/mm-gtk-hit-store.c b/libmmanager-gtk/mm-gtk-hit-store.c index a4b099e..74135bf 100644 --- a/libmmanager-gtk/mm-gtk-hit-store.c +++ b/libmmanager-gtk/mm-gtk-hit-store.c @@ -57,7 +57,15 @@ static void populate_from_hit_collection (MMGtkHitStore *self, MMHitCollection *collection) { + MMHit *hit; + GtkTreeIter iter; + /* just append the hit collection to the model */ + while ((hit = mm_hit_collection_get_next_hit (collection)) != NULL) { + gtk_list_store_append (GTK_LIST_STORE (self), &iter); + gtk_list_store_set (GTK_LIST_STORE (self), &iter, + MM_GTK_HIT_STORE_HIT_COL, hit, -1); + } } /* interface implementation */ -- 2.11.4.GIT