[gtk+/gtk-2-22] bgo#614006 - GtkFileSystemModel - Make sure to generate node IDs are valid for new files



commit 6d0ff4708cc9f11734fb776d95f6c2eb447de883
Author: Sergey Orlov <wasp82 bk ru>
Date:   Tue Aug 24 13:17:15 2010 -0500

    bgo#614006 - GtkFileSystemModel - Make sure to generate node IDs are valid for new files
    
    When a file was inserted during the period that the editable row was
    active, the node IDs would not get updated correctly.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 gtk/gtkfilesystemmodel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 7c9e1dc..933420c 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -1778,7 +1778,10 @@ _gtk_file_system_model_update_file (GtkFileSystemModel *model,
 
   id = node_get_for_file (model, file);
   if (id == 0)
-    add_file (model, file, info);
+    {
+      add_file (model, file, info);
+      id = node_get_for_file (model, file);
+    }
 
   node = get_node (model, id);
 



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