From 1790cf765772385653f837d57df0ee7868acc117 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 19 Mar 2008 16:14:00 +0200 Subject: [PATCH] Store succesfull search strings in search_model and list --- src/search.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/search.c b/src/search.c index 59ae62d..4b2be29 100644 --- a/src/search.c +++ b/src/search.c @@ -68,6 +68,7 @@ struct _search_dialog { }; static search_dialog sd; +static GSList *search_list=NULL; static GtkListStore *search_model=NULL; static gboolean @@ -118,6 +119,11 @@ switch (s->stype) { } if (sres==TRUE) { + if (!g_slist_find_custom(search_list, st, (GCompareFunc)strcmp)) { + search_list = g_slist_prepend(search_list, g_strdup(st)); + gtk_list_store_insert_with_values(search_model, &iter, INT_MAX, 0, st, -1); + } + gtk_tree_view_set_model(GTK_TREE_VIEW(s->list), GTK_TREE_MODEL(s->store)); g_object_unref(G_OBJECT(s->store)); } else { -- 2.39.5