filechooser: Tighten up some assertions when actually selecting files in the treeview

The model must be fully loaded, and it must be inserted in the treeview.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This commit is contained in:
Federico Mena Quintero 2013-02-20 17:14:20 -06:00
parent 0f67bd7cfe
commit 039cc929ad

View File

@ -6404,9 +6404,14 @@ show_and_select_files (GtkFileChooserDefault *impl,
gboolean selected_a_file;
GSList *walk;
g_assert (impl->load_state == LOAD_FINISHED);
g_assert (impl->browse_files_model != NULL);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
fsmodel = GTK_FILE_SYSTEM_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (impl->browse_files_tree_view)));
g_assert (fsmodel == impl->browse_files_model);
enabled_hidden = impl->show_hidden;
removed_filters = (impl->current_filter == NULL);