[Xfce4-commits] <ristretto:stephan/icon-bar> Update treemodel before updating old iters

Stephan Arts noreply at xfce.org
Mon Jan 30 20:10:01 CET 2012


Updating branch refs/heads/stephan/icon-bar
         to c3aedb198954ffebab1a2b8b4883f7b2dedb946b (commit)
       from 52ecc3a7269c4af30a2b4a4e5aadec15338e8a7b (commit)

commit c3aedb198954ffebab1a2b8b4883f7b2dedb946b
Author: Stephan Arts <stephan at xfce.org>
Date:   Mon Jan 30 20:09:06 2012 +0100

    Update treemodel before updating old iters

 src/image_list.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/image_list.c b/src/image_list.c
index 9e3a554..0539239 100644
--- a/src/image_list.c
+++ b/src/image_list.c
@@ -427,6 +427,14 @@ rstto_image_list_add_file (
                 image_list->priv->n_images++;
                 i = g_list_index (image_list->priv->images, file);
 
+                path = gtk_tree_path_new();
+                gtk_tree_path_append_index (path, i);
+                t_iter.stamp = image_list->priv->stamp;
+                t_iter.user_data = file;
+                t_iter.user_data3 = GINT_TO_POINTER(i);
+
+                gtk_tree_model_row_inserted(GTK_TREE_MODEL(image_list), path, &t_iter);
+
                 /** TODO: update all iterators */
                 while (iter)
                 {
@@ -437,13 +445,6 @@ rstto_image_list_add_file (
                     iter = g_slist_next (iter);
                 }
 
-                path = gtk_tree_path_new();
-                gtk_tree_path_append_index (path, i);
-                t_iter.stamp = image_list->priv->stamp;
-                t_iter.user_data = file;
-                t_iter.user_data3 = GINT_TO_POINTER(i);
-
-                gtk_tree_model_row_inserted(GTK_TREE_MODEL(image_list), path, &t_iter);
                 return TRUE;
             }
             else


More information about the Xfce4-commits mailing list