diff -urN src/gtk2/gui/guiQueries.ml src/gtk2/gui/guiQueries.ml
--- src/gtk2/gui/guiQueries.ml	2005-11-12 12:16:36.000000000 +0100
+++ src/gtk2/gui/guiQueries.ml	2006-07-15 11:57:18.000000000 +0200
@@ -341,10 +341,12 @@
   qr.g_query_label <- Some label;
   qr.g_query_waiting_label <- Some query_status;
   let on_closure () =
-    let results = GuiResults.keys_to_results (qr.g_query_result#all_items ()) in
-    List.iter (fun r ->
-      Hashtbl.remove G.results r.res_num;
-    ) results;
+    Hashtbl.iter (fun _ r ->
+      r.res_has_query <- List.filter (fun query_num -> query_num <> qr.g_query_num) r.res_has_query;
+      match r.res_has_query with
+        [] -> Hashtbl.remove G.results r.res_num
+      | _ -> ()
+    ) G.results;
     close_query qr.g_query_num true;
     qr.g_query_result#clear ();
     main_evbox#destroy ();
@@ -896,36 +898,56 @@
 (*                                                                       *)
 (*************************************************************************)
 
+let add_result_to_query qr r =
+  if not (List.mem qr.g_query_num r.res_has_query)
+    then begin
+      qr.g_query_nresults <- qr.g_query_nresults + 1;
+      let f () =
+        let text = Printf.sprintf "%s (%d / %d)" qr.g_query_desc qr.g_query_result#nitems qr.g_query_nresults in
+        match qr.g_query_label with
+          None -> ()
+        | Some label -> label#set_text text
+      in
+      r.res_has_query <- qr.g_query_num :: r.res_has_query;
+      qr.g_query_result#add r ~f ();
+    end
+
+let remove_result_from_query qr r =
+  if not (List.mem qr.g_query_num r.res_has_query)
+    then r.res_has_query <- qr.g_query_num :: r.res_has_query
+
 let h_search_result query_num result_num =
   try
-    let qr = Hashtbl.find qresults query_num in
+    let r = Hashtbl.find G.results result_num in
     try
-      let r = Hashtbl.find G.results result_num in
-      if qr.g_query_nresults < qr.g_query_max_hits
-        then if r.res_availability >= qr.g_query_min_availability
-            then begin
-              qr.g_query_nresults <- qr.g_query_nresults + 1;
-              let f () =
-                let text = Printf.sprintf "%s (%d / %d)" qr.g_query_desc qr.g_query_result#nitems qr.g_query_nresults in
-                match qr.g_query_label with
-                  None -> ()
-                | Some label -> label#set_text text
-              in
-              qr.g_query_result#add r ~f ();
-            end else begin
-              Hashtbl.remove G.results result_num;  (* remove the result if the query does'nt exist *)
+      let qr = Hashtbl.find qresults query_num in
+      let k = GuiResults.result_key r.res_num in
+      try
+        (* update the result if it already exists *)
+        let row = qr.g_query_result#find_row k in
+         Gaux.may ~f:(fun rw -> qr.g_query_result#update_item rw r r) row
+      with _ ->
+        begin
+          if qr.g_query_nresults < qr.g_query_max_hits
+            then if r.res_availability >= qr.g_query_min_availability
+              then add_result_to_query qr r
+              (* don't add the result if availability is under the criterium *)
+              else remove_result_from_query qr r
+            (* stop the query if we exceeded the number of results *)
+            else begin
+              remove_result_from_query qr r;
+              close_query query_num false;
             end
-        else begin
-          Hashtbl.remove G.results result_num;  (* remove the result if we exceeded the number of results *)
-          close_query query_num false;          (* stop the query if we exceeded the number of results *)
         end
-    with Not_found -> (if !!verbose then lprintf' "result doesn't exist for query %d %s\n" query_num qr.g_query_desc)
+    with Not_found ->
+      begin
+        (* close the query if it does'nt exist *)
+        close_query query_num true;
+        match r.res_has_query with [] -> Hashtbl.remove G.results result_num | _ -> ();
+        if !!verbose then lprintf' "query %d doesn't exist\n" query_num
+      end
   with Not_found ->
-    begin
-      Hashtbl.remove G.results result_num;  (* remove the result if the query does'nt exist *)
-      close_query query_num true;           (* close the query if it does'nt exist *)
-      if !!verbose then lprintf' "query %d doesn't exist\n" query_num
-    end
+    (if !!verbose then lprintf' "result [%d] doesn't exist\n" result_num)
 
 let h_search_waiting query_num waiting =
   try
diff -urN src/gtk2/gui/guiResults.ml src/gtk2/gui/guiResults.ml
--- src/gtk2/gui/guiResults.ml	2005-11-12 12:16:36.000000000 +0100
+++ src/gtk2/gui/guiResults.ml	2006-07-15 11:51:13.000000000 +0200
@@ -40,50 +40,6 @@
 let (=:=) = Options.(=:=)
 let (<:>) = GuiTools.(<:>)
 
-(*************************************************************************)
-(*                                                                       *)
-(*                         compute_result_info                           *)
-(*                                                                       *)
-(*************************************************************************)
-
-let compute_result_info r =
-  try
-    let res = Hashtbl.find G.results r.result_num in
-    let name = Mi.result_first_name r.result_names in
-    res.res_name <- name;
-    res.res_uid <- Mi.uid_list_to_string r.result_uids;
-    res.res_size <- r.result_size;
-    res.res_format <- U.simple_utf8_of r.result_format;
-    res.res_type <- U.simple_utf8_of r.result_type;
-    res.res_duration <- Mi.duration_of_tags r.result_tags;
-    res.res_codec <- Mi.codec_of_tags r.result_tags;
-    res.res_bitrate <- Mi.bitrate_of_tags r.result_tags;
-    res.res_availability <- Mi.availability_of_tags r.result_tags;
-    res.res_completesources <- Mi.completesources_of_tags r.result_tags;
-    res.res_tags <- Mi.tags_to_string r.result_tags;
-    res.res_comment <- U.utf8_of r.result_comment;
-    res.res_color <- Mi.color_of_result (Mi.availability_of_tags r.result_tags) r.result_done;
-    res.res_network_pixb <- Mi.network_pixb res.res_network ~size:A.SMALL ();
-    res.res_name_pixb <- Mi.file_type_of_name name ~size:A.SMALL;
-    res.res_computed <- true
-  with _ -> ()
-
-(*************************************************************************)
-(*                                                                       *)
-(*                         compute_result_info_while_idle                *)
-(*                                                                       *)
-(*************************************************************************)
-
-let (result_queue : result_info Queue.t) = Queue.create ()
-
-let compute_result_info_while_idle () =
-  ignore (Glib.Idle.add (fun _ ->
-    try
-      let r = Queue.take result_queue in
-      compute_result_info r;
-      true
-    with Queue.Empty -> false
-  ))
 
 (*************************************************************************)
 (*                                                                       *)
@@ -91,39 +47,49 @@
 (*                                                                       *)
 (*************************************************************************)
 
+let hashtbl_update_result r res =
+  res.res_format <- U.simple_utf8_of r.result_format;
+  res.res_type <- U.simple_utf8_of r.result_type;
+  res.res_duration <- Mi.duration_of_tags r.result_tags;
+  res.res_codec <- Mi.codec_of_tags r.result_tags;
+  res.res_bitrate <- Mi.bitrate_of_tags r.result_tags;
+  res.res_availability <- Mi.availability_of_tags r.result_tags;
+  res.res_completesources <- Mi.completesources_of_tags r.result_tags;
+  res.res_tags <- Mi.tags_to_string r.result_tags;
+  res.res_comment <- U.utf8_of r.result_comment;
+  res.res_color <- Mi.color_of_result (Mi.availability_of_tags r.result_tags) r.result_done
+
 let result_info (r : result_info) =
   try
     let res = Hashtbl.find G.results r.result_num in
-    ()
+    hashtbl_update_result r res
   with _ ->
     begin
       let net_num = Mi.neworknum_from_uids r.result_uids in
-      let is_empty = Queue.is_empty result_queue in
+      let name = Mi.result_first_name r.result_names in
       let res =
         {
          res_num             = r.result_num;
          res_network         = net_num;
-         res_computed        = false;
-         res_name            = "";
-         res_uid             = "";
-         res_size            = Int64.zero;
-         res_format          = "";
-         res_type            = "";
-         res_duration        = "";
-         res_codec           = "";
-         res_bitrate         = 0;
-         res_availability    = 0;
-         res_completesources = 0;
-         res_tags            = "";
-         res_comment         = "";
-         res_color           = "";
-         res_network_pixb    = None;
-         res_name_pixb       = None;
+         res_name            = name;
+         res_uid             = Mi.uid_list_to_string r.result_uids;
+         res_size            = r.result_size;
+         res_format          = U.simple_utf8_of r.result_format;
+         res_type            = U.simple_utf8_of r.result_type;
+         res_duration        = Mi.duration_of_tags r.result_tags;
+         res_codec           = Mi.codec_of_tags r.result_tags;
+         res_bitrate         = Mi.bitrate_of_tags r.result_tags;
+         res_availability    = Mi.availability_of_tags r.result_tags;
+         res_completesources = Mi.completesources_of_tags r.result_tags;
+         res_tags            = Mi.tags_to_string r.result_tags;
+         res_comment         = U.utf8_of r.result_comment;
+         res_color           = Mi.color_of_result (Mi.availability_of_tags r.result_tags) r.result_done;
+         res_has_query       = [];
+         res_network_pixb    = Mi.network_pixb net_num ~size:A.SMALL ();
+         res_name_pixb       = Mi.file_type_of_name name ~size:A.SMALL;
         }
       in
       Hashtbl.add G.results res.res_num res;
-      Queue.add r result_queue;
-      if is_empty then compute_result_info_while_idle ()
     end
 
 (*************************************************************************)
@@ -289,25 +255,15 @@
       method add_result_while_idle () =
         ignore (Glib.Idle.add (fun _ ->
           try
-            let (r, _) = Queue.peek res_queue in
-            if r.res_computed
-              then begin
-                let (res, f) = Queue.take res_queue in
-                self#add_item res ?f ();
-                true
-              end else true
+            let (res, f) = Queue.take res_queue in
+            self#add_item res ?f ();
+            true
           with Queue.Empty -> false))
 
-
-
       method add (r : res_info) ?f () =
-        if r.res_computed
-          then self#add_item r ?f ()
-          else begin
-            let is_empty = Queue.is_empty res_queue in
-            Queue.add (r, f) res_queue;
-            if is_empty then self#add_result_while_idle ()
-          end
+        let is_empty = Queue.is_empty res_queue in
+        Queue.add (r, f) res_queue;
+        if is_empty then self#add_result_while_idle ()
 
 (*************************************************************************)
 (*                                                                       *)
diff -urN src/gtk2/gui/guiTypes2.ml src/gtk2/gui/guiTypes2.ml
--- src/gtk2/gui/guiTypes2.ml	2006-06-27 12:38:36.000000000 +0200
+++ src/gtk2/gui/guiTypes2.ml	2006-07-15 01:21:12.000000000 +0200
@@ -150,10 +150,11 @@
   {
     res_num                     : int;
     res_network                 : int;
-    mutable res_computed        : bool;
-    mutable res_name            : string;
-    mutable res_uid             : string;
-    mutable res_size            : int64;
+    res_name                    : string;
+    res_uid                     : string;
+    res_size                    : int64;
+    mutable res_network_pixb    : GdkPixbuf.pixbuf option;
+    mutable res_name_pixb       : GdkPixbuf.pixbuf option;
     mutable res_format          : string;
     mutable res_type            : string;
     mutable res_duration        : string;
@@ -164,8 +165,7 @@
     mutable res_tags            : string;
     mutable res_comment         : string;
     mutable res_color           : string;
-    mutable res_network_pixb    : GdkPixbuf.pixbuf option;
-    mutable res_name_pixb       : GdkPixbuf.pixbuf option;
+    mutable res_has_query       : int list;
   }
 
 type g_file_tree =
