mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] Changes to mldonkey/src/gtk2/gui/guiTemplates.ml


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/gtk2/gui/guiTemplates.ml
Date: Wed, 16 Nov 2005 05:18:53 -0500

Index: mldonkey/src/gtk2/gui/guiTemplates.ml
diff -u mldonkey/src/gtk2/gui/guiTemplates.ml:1.6 
mldonkey/src/gtk2/gui/guiTemplates.ml:1.7
--- mldonkey/src/gtk2/gui/guiTemplates.ml:1.6   Mon Nov 14 18:25:44 2005
+++ mldonkey/src/gtk2/gui/guiTemplates.ml       Wed Nov 16 10:18:52 2005
@@ -418,9 +418,11 @@
     method private remove_item_while_idle () =
       ignore (Glib.Idle.add (fun _ ->
         try
-          let it = Queue.take queue_remove in
+          let (key, it) = Queue.take queue_remove in
           Gaux.may ~f:(fun p ->
-            ignore (store#remove p.path_tree_iter)) it.item_tree_path;
+            ignore (store#remove p.path_tree_iter);
+            Hashtbl.remove table key;
+            ) it.item_tree_path;
           true
         with Queue.Empty -> false))
 
@@ -433,10 +435,10 @@
             let is_empty = Queue.is_empty queue_remove in
             it.item_tree_removed <- true;
             Gaux.may ~f:(fun p ->
-              store#set ~row:p.path_tree_iter ~column:filter_col (filter_func 
key)) it.item_tree_path;
-            Queue.add it queue_remove;
-            Hashtbl.remove table key;
-            nitems <- nitems - 1;
+              store#set ~row:p.path_tree_iter ~column:filter_col (filter_func 
key);
+              nitems <- nitems - 1;
+              ) it.item_tree_path;
+            Queue.add (key, it) queue_remove;
             if is_empty then self#remove_item_while_idle ()
           end
       with _ -> ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]