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 c56f508993
commit a070d75a2f

View File

@ -6329,9 +6329,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);