From f54701fe583d7dd23ebd75917b538c15e5b8df75 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 9 May 2007 11:38:15 +0100 Subject: Assign the search model to the browse view when creating it Partially revert a previous commit. Setting the search_model to the browse_files_tree_view widget as soon as we create it will make the search look more "alive" than setting the model when the search is finished. Signed-off-by: Emmanuele Bassi --- gtk/gtkfilechooserdefault.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 076a3b0..5f81a17 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -8673,10 +8673,15 @@ search_engine_finished_cb (GtkSearchEngine *engine, impl = GTK_FILE_CHOOSER_DEFAULT (data); - /* FMQ: if search was empty, say that we got no hits */ +#if 0 + /* EB: setting the model here will avoid loads of row events, + * but it'll make the search look like blocked. + */ gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), GTK_TREE_MODEL (impl->search_model)); +#endif + /* FMQ: if search was empty, say that we got no hits */ set_busy_cursor (impl, FALSE); } @@ -8890,6 +8895,13 @@ search_setup_model (GtkFileChooserDefault *impl) gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (impl->search_model), SEARCH_MODEL_COL_STAT, GTK_SORT_DESCENDING); + + /* EB: setting the model here will make the hits list update feel + * more "alive" than setting the model at the end of the search + * run + */ + gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), + GTK_TREE_MODEL (impl->search_model)); } /* Creates a new query with the specified text and launches it */ -- 1.4.4.2