X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2FgTopLevel%2FgTopLevel.ml;h=da00761f932f2aa7842149c940e3fcd576839ee4;hb=5017b0b1d58b9431129055b82a40f73c979bf3ae;hp=1a4e6ce65be5230979a62104db7ee913c4d17f5f;hpb=2865afb3a2ebce0376087c1cd41ab7146a6bdde4;p=helm.git diff --git a/helm/gTopLevel/gTopLevel.ml b/helm/gTopLevel/gTopLevel.ml index 1a4e6ce65..da00761f9 100644 --- a/helm/gTopLevel/gTopLevel.ml +++ b/helm/gTopLevel/gTopLevel.ml @@ -47,9 +47,9 @@ let htmlfooter = "" ;; -let prooffile = "/home/tassi/miohelm/currentproof";; +let prooffile = "/public/sacerdot/currentproof";; (*CSC: the getter should handle the innertypes, not the FS *) -let innertypesfile = "/home/tassi/miohelm/tmp/innertypes";; +let innertypesfile = "/public/sacerdot/innertypes";; (* GLOBAL REFERENCES (USED BY CALLBACKS) *) @@ -1096,7 +1096,7 @@ let locate rendering_window () = | [] -> "" | head :: tail -> inputt#delete_text 0 inputlen; - MQueryGenerator.locate head + MQueryGenerator.locate_html head with e -> "

" ^ Printexc.to_string e ^ "

" ) @@ -1508,7 +1508,35 @@ let initialize_everything () = let _ = CicCooking.init () ; - if !usedb then MQueryGenerator.init () ; + if !usedb then + begin + MQueryGenerator.init () ; + CicTextualParser0.set_locate_object + (function id -> + let MathQL.MQRefs uris = MQueryGenerator.locate id in + let uri = + match uris with + [] -> None + | [uri] -> Some uri + | _ -> None (* here we must let the user choose one uri *) + in + match uri with + Some uri' -> + if String.sub uri' (String.length uri' - 4) 4 = ".con" then +(*CSC: what cooking number? Here I always use 0, which may be bugged *) + Some (Cic.Const (UriManager.uri_of_string uri',0)) + else + let uri'',typeno = +(*CSC: the locate query now looks only for inductive type blocks ;-( *) +(*CSC: when it will be correctly implemented we will have to work *) +(*CSC: here on the fragment identifier *) + uri',0 + in +(*CSC: what cooking number? Here I always use 0, which may be bugged *) + Some (Cic.MutInd (UriManager.uri_of_string uri'',0,typeno)) + | None -> None + ) + end ; ignore (GtkMain.Main.init ()) ; initialize_everything () ; if !usedb then MQueryGenerator.close ();