(MatitaGui.interactive_interp_choice ())
let script =
- MatitaScript.script
- ~view:(gui#sourceView :> GText.view)
- ~init:(Lazy.force MatitaEngine.initial_status)
- ~mathviewer:(MatitaMathView.mathViewer ())
- ~urichooser:(fun uris ->
- try
- MatitaGui.interactive_uri_choice ~selection_mode:`SINGLE
- ~title:"Matita: URI chooser"
- ~msg:"Select the URI" ~hide_uri_entry:true
- ~hide_try:true ~ok_label:"_Apply" ~ok_action:`SELECT
- ~copy_cb:(fun s -> gui#sourceView#buffer#insert ("\n"^s^"\n"))
- () ~id:"boh?" uris
- with MatitaTypes.Cancel -> [])
- ~set_star:gui#setStar
- ~ask_confirmation:
- (fun ~title ~message ->
- MatitaGtkMisc.ask_confirmation ~title ~message
- ~parent:gui#main#toplevel ())
- ~develcreator:gui#createDevelopment
- ()
+ let s =
+ MatitaScript.script
+ ~view:(gui#sourceView :> GText.view)
+ ~init:(Lazy.force MatitaEngine.initial_status)
+ ~mathviewer:(MatitaMathView.mathViewer ())
+ ~urichooser:(fun uris ->
+ try
+ MatitaGui.interactive_uri_choice ~selection_mode:`SINGLE
+ ~title:"Matita: URI chooser"
+ ~msg:"Select the URI" ~hide_uri_entry:true
+ ~hide_try:true ~ok_label:"_Apply" ~ok_action:`SELECT
+ ~copy_cb:(fun s -> gui#sourceView#buffer#insert ("\n"^s^"\n"))
+ () ~id:"boh?" uris
+ with MatitaTypes.Cancel -> [])
+ ~set_star:gui#setStar
+ ~ask_confirmation:
+ (fun ~title ~message ->
+ MatitaGtkMisc.ask_confirmation ~title ~message
+ ~parent:gui#main#toplevel ())
+ ~develcreator:gui#createDevelopment
+ ()
+ in
+ gui#sourceView#source_buffer#begin_not_undoable_action ();
+ s#reset ();
+ s#template ();
+ gui#sourceView#source_buffer#end_not_undoable_action ();
+ s
+
(* math viewers *)
let _ =
directory .matita
- notazione -> Luca e Zack
- copiare nel .moo la baseuri e poi il matitaclean la legge da li e non dal
- .ma (si evita il syntax error)
+ .ma (si evita il syntax error e il cambio di una baseuri non causa
+ sporcizia)
+ - non chiudere transitivamente i moo ??
DONE
- gestione dei path per include: il path deve essere assoluto? da decidere ...
| Some f ->
script#reset ();
script#assignFileName f;
+ source_view#source_buffer#begin_not_undoable_action ();
script#loadFromFile ();
+ source_view#source_buffer#end_not_undoable_action ();
console#message ("'"^f^"' loaded.\n");
self#_enableSaveTo f
| None -> ()
with MatitaTypes.Cancel -> ()
in
let newScript () =
+ source_view#source_buffer#begin_not_undoable_action ();
(s ())#reset ();
(s ())#template ();
+ source_view#source_buffer#end_not_undoable_action ();
disableSave ();
script_fname <- None
in
output_string oc template;
close_out oc
end;
+ source_view#source_buffer#begin_not_undoable_action ();
script#loadFromFile ();
+ source_view#source_buffer#end_not_undoable_action ();
console#message ("'"^file^"' loaded.");
self#_enableSaveTo file
(fun _ -> if buffer#modified then
set_star self#ppFilename true
else
- set_star self#ppFilename false));
- self#reset ();
- self#template ()
+ set_star self#ppFilename false))
val mutable statements = []; (** executed statements *)
val mutable history = [ init ];