X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2Fmatita.ml;h=5433a898b417513c4354286af73ad7b5c26354b2;hb=7fb4b063ed9488bbffa34d1cd193fca6c288a425;hp=0178982e9b6de2a83a2cdcf6726324821318bbe2;hpb=a256fcff08b4a21c736167910c1ce342cffb0388;p=helm.git diff --git a/helm/matita/matita.ml b/helm/matita/matita.ml index 0178982e9..5433a898b 100644 --- a/helm/matita/matita.ml +++ b/helm/matita/matita.ml @@ -37,7 +37,7 @@ let _ = MetadataTypes.ownerize_tables (Helm_registry.get "matita.owner"); MatitaDb.clean_owner_environment (); MatitaDb.create_owner_environment (); - GtkMain.Rc.add_default_file BuildTimeConf.gtkrc; (* loads gtk rc files *) + GtkMain.Rc.add_default_file BuildTimeConf.gtkrc_file; (* loads gtk rc *) ignore (GMain.Main.init ()); (* environment trust *) @@ -60,7 +60,7 @@ let _ = let script = MatitaScript.script - ~buffer:gui#main#scriptTextView#buffer + ~buffer:gui#sourceView#buffer ~init:(Lazy.force MatitaEngine.initial_status) ~mathviewer:(MatitaMathView.mathViewer ()) ~urichooser:(fun uris -> @@ -68,8 +68,8 @@ let script = 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" - ~copy_cb:(fun s -> gui#main#scriptTextView#buffer#insert ("\n"^s^"\n")) + ~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 -> []) () @@ -142,15 +142,24 @@ let _ = (fun _ -> if script#onGoingProof () then MatitaLog.debug (CicMetaSubst.ppmetasenv script#proofMetasenv [])); + addDebugItem "dump coercions Db" (fun _ -> + List.iter ( + fun (s,t,u) -> + MatitaLog.debug ( + UriManager.name_of_uri u ^ ":" ^ + UriManager.name_of_uri s ^ " -> " ^ UriManager.name_of_uri t)) + (CoercDb.to_list ()) + ); addDebugItem "rotate light bulbs" (fun _ -> let nb = gui#main#hintNotebook in nb#goto_page ((nb#current_page + 1) mod 3)); + (* addDebugItem "print (on stdout) \"statement\" grammar entry" (fun _ -> Grammar.print_entry Format.std_formatter (Grammar.Entry.obj CicTextualParser2.statement); - Format.pp_print_flush Format.std_formatter ()); + Format.pp_print_flush Format.std_formatter ());*) end (** *) @@ -168,9 +177,12 @@ let _ = if Filename.basename Sys.argv.(0) = "cicbrowser" then begin (* cicbrowser *) Helm_registry.set "matita.mode" "cicbrowser"; let browser = MatitaMathView.cicBrowser () in - try - browser#load (`Uri Sys.argv.(1)) - with Invalid_argument _ -> () + let entry = + try + `Uri Sys.argv.(1) + with Invalid_argument _ -> `Dir "cic:/" + in + browser#load entry end else begin (* matita *) Helm_registry.set "matita.mode" "matita"; gui#main#mainWin#show ();