]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGui.ml
snapshot, notably:
[helm.git] / helm / matita / matitaGui.ml
index 0d46bfcfaf621f44fde9f30e9c0650d906f672f3..955ae13e529a401da0208e418f2dd843fece573f 100644 (file)
  * http://helm.cs.unibo.it/
  *)
 
-(*
-class stringListModel' uriChoiceDialog =
-  let tree_view = uriChoiceDialog#uriChoiceTreeView in
-  let column_list = new GTree.column_list in
-  let text_column = column_list#add Gobject.Data.string in
-  let list_store = GTree.list_store column_list in
-  let renderer = (GTree.cell_renderer_text [], ["text", text_column]) in
-  let view_column = GTree.view_column ~renderer () in
-  let _ = tree_view#set_model (Some (list_store :> GTree.model)) in
-  let _ = tree_view#append_column view_column in
-  object
-    method append s =
-      let tree_iter = list_store#append () in
-      list_store#set ~row:tree_iter ~column:text_column s
-    method clear () = list_store#clear ()
-  end
-*)
-
 open Printf
 
 open MatitaGeneratedGui
@@ -81,16 +63,18 @@ class gui file =
       List.iter (fun w -> w#check_widgets ())
         (let c w = (w :> <check_widgets: unit -> unit>) in
          [ c about; c fileSel; c main; c proof; c toolbar; c check; c script ]);
-        (* "global" key bindings *)
-      List.iter (fun (key, callback) -> self#addKeyBinding key callback)
+        (* key bindings *)
+      List.iter (* global key bindings *)
+        (fun (key, callback) -> self#addKeyBinding key callback)
         [ GdkKeysyms._F3,
             toggle_win ~check:main#showProofMenuItem proof#proofWin;
           GdkKeysyms._F4,
             toggle_win ~check:main#showCheckMenuItem check#checkWin;
           GdkKeysyms._F5,
             toggle_win ~check:main#showScriptMenuItem script#scriptWin;
-          GdkKeysyms._x, (fun () -> console#show ());
+          GdkKeysyms._x, (fun () -> console#toggle ());
         ];
+      add_key_binding GdkKeysyms._Escape console#hide main#consoleEventBox;
         (* about win *)
       ignore (about#aboutWin#event#connect#delete (fun _ -> true));
       ignore (main#aboutMenuItem#connect#activate (fun _ ->
@@ -123,7 +107,7 @@ class gui file =
       List.iter (fun w -> w#misc#set_sensitive false)
         [ main#saveMenuItem; main#saveAsMenuItem ];
       main#helpMenu#set_right_justified true;
-      ignore (main#showConsoleMenuItem#connect#activate console#show);
+      ignore (main#showConsoleMenuItem#connect#activate console#toggle);
         (* main *)
       connect_button main#hideConsoleButton console#hide;
 (*