]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/matitaMathView.ml
0.5.3
[helm.git] / helm / software / matita / matitaMathView.ml
index 1f5b2a22cf76a46965c47aeb7301e03e0c997c8c..e6c26179132205f9028779dc0a8d7868b9271f43 100644 (file)
@@ -949,6 +949,10 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
         match self#currentCicUri with
         | Some uri -> self#load (`Metadata (`Deps (`Back, uri)))
         | None -> ());
+      connect_menu_item win#browserCloseMenuItem (fun () ->
+        let my_id = Oo.id self in
+        cicBrowsers := List.filter (fun b -> Oo.id b <> my_id) !cicBrowsers;
+        win#toplevel#misc#hide(); win#toplevel#destroy ());
       (* remove hbugs *)
       (*
       connect_menu_item win#hBugsTutorsMenuItem (fun () ->
@@ -1124,7 +1128,15 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
 
     method private tex () =
       let text = String.concat "\n"
-        (List.map (fun (k,vs) -> k ^ "\t" ^ String.concat ",  " vs)
+        (List.map (fun (k,vs) -> 
+           let vs = 
+             List.sort (fun a b -> String.length a - String.length b) vs
+           in
+           let vs = 
+             if List.length vs < 4 then vs else 
+             let vs, _ = HExtlib.split_nth 4 vs in vs
+           in
+           k ^ "\t" ^ String.concat ", " vs)
         (Utf8Macro.pp_table ())) 
       in
       self#_loadText text