[gtk+] When removing a file, also remove it from the file_lookup hash table



commit 688917cdbbbc42678c9bcfd9249fa80119000498
Author: Federico Mena Quintero <federico novell com>
Date:   Wed Sep 2 15:21:45 2009 -0500

    When removing a file, also remove it from the file_lookup hash table
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 gtk/gtkfilesystemmodel.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 69cd059..1f830f0 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -1610,10 +1610,15 @@ remove_file (GtkFileSystemModel *model,
 
   node = get_node (model, id);
   node_set_visible (model, id, FALSE);
+
+  g_hash_table_remove (model->file_lookup, file);
   g_object_unref (node->file);
+
   if (node->info)
     g_object_unref (node->info);
+
   g_array_remove_index (model->files, id);
+  /* FMQ: do we need to resort? */
 }
 
 /**



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