]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gTopLevel/gTopLevel.ml
* minor correction to make the new mathml widget work better
[helm.git] / helm / gTopLevel / gTopLevel.ml
index ba0615246050989f471374ef9310d0283f755311..6cf8f361844dcaa08c7e576fc29c57c7d35c92a2 100644 (file)
@@ -636,7 +636,10 @@ let refresh_goals ?(empty_notebook=true) notebook =
           begin
            notebook#set_current_page
             ~may_skip_switch_page_event:true metano ;
-           notebook#proofw#load_sequent metasenv currentsequent
+prerr_endline "CIAO CIAO" ;
+prerr_endline ("SEQUENTE CORRENTE: " ^ SequentPp.TextualPp.print_sequent currentsequent) ;
+           notebook#proofw#load_sequent metasenv currentsequent ;
+prerr_endline "pASSO CIAO CIAO"
           end
  with
   e ->
@@ -903,6 +906,7 @@ let
     show_in_show_window_obj uri obj
   in
    let show_in_show_window_callback mmlwidget ((n : Gdome.element option),_,_,_) =
+prerr_endline "LUCA: HO RICEVUTO UN CLICK" ;
     match n with
        None -> ()
      | Some n' ->
@@ -912,7 +916,10 @@ let
          in 
           show_in_show_window_uri (UriManager.uri_of_string uri)
         else
-         ignore (mmlwidget#action_toggle n')
+prerr_endline "LUCA: AZIONO L'ACTION" ;
+         ignore (mmlwidget#action_toggle n') ;
+        let Some doc = n'#get_ownerDocument in
+           ignore (Misc.domImpl#saveDocumentToFile ~name:"/tmp/clicked_doc" ~doc ())
    in
     let _ =
      mmlwidget#connect#click (show_in_show_window_callback mmlwidget)
@@ -2869,13 +2876,16 @@ end
 (* MAIN *)
 
 let initialize_everything () =
+prerr_endline "STO PER CREARE LA PROOF WINDOW" ;
   let output =
     TermViewer.proof_viewer
      ~mml_of_cic_object:ChosenTransformer.mml_of_cic_object
      ~width:350 ~height:280 ()
   in
+prerr_endline "CREATA" ;
   let notebook = new notebook in
   let rendering_window' = new rendering_window output notebook in
+prerr_endline "OK" ;
   rendering_window'#set_auto_disambiguation !auto_disambiguation;
   set_rendering_window rendering_window';
   let print_error_as_html prefix msg =
@@ -2893,6 +2903,7 @@ let initialize_everything () =
 ;;
 
 let main () =
+prerr_endline "CIAO" ;
  ignore (GtkMain.Main.init ()) ;
  initialize_everything () ;
  MQIC.close mqi_handle;