[gtk+/gtk-2-24] filechooser: Tighten up some assertions when actually selecting files in the treeview



commit a070d75a2f2b65e6d5aa4ef7a5f6d77dc57d9998
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Feb 20 17:14:20 2013 -0600

    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>

 gtk/gtkfilechooserdefault.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 5ca5ffc..b2409f7 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]