]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/matitaGui.ml
notation_id were compared using Pervasives.equal this was rarely triggering the
[helm.git] / helm / software / matita / matitaGui.ml
index 98612ab2bf1f7b12b426fe8ea4a10694c6cbec0b..c6510403521af1e3cb8a70ba0a6a4ab0cc98ad1c 100644 (file)
@@ -42,7 +42,7 @@ class type browserWin =
    * lablgladecc :-(((( *)
 object
   inherit MatitaGeneratedGui.browserWin
-  method browserUri: GEdit.combo_box_entry
+  method browserUri: GEdit.entry
 end
 
 class console ~(buffer: GText.buffer) () =
@@ -905,6 +905,14 @@ class gui () =
           c#load (`About `Coercions));
       connect_menu_item main#showAutoGuiMenuItem 
         (fun _ -> MatitaAutoGui.auto_dialog Auto.get_auto_status);
+      connect_menu_item main#showTermGrammarMenuItem 
+        (fun _ -> 
+          let c = MatitaMathView.cicBrowser () in
+          c#load (`About `Grammar));
+      connect_menu_item main#showUnicodeTable
+        (fun _ -> 
+          let c = MatitaMathView.cicBrowser () in
+          c#load (`About `TeX));
          (* script monospace font stuff *)  
       self#updateFontSize ();
         (* debug menu *)
@@ -954,7 +962,7 @@ class gui () =
            end));
       (* math view handling *)
       connect_menu_item main#newCicBrowserMenuItem (fun () ->
-        ignore (MatitaMathView.cicBrowser ()));
+        ignore(MatitaMathView.cicBrowser ()));
       connect_menu_item main#increaseFontSizeMenuItem (fun () ->
         self#increaseFontSize ();
         MatitaMathView.increase_font_size ();
@@ -1153,12 +1161,12 @@ class gui () =
     method newBrowserWin () =
       object (self)
         inherit browserWin ()
-        val combo = GEdit.combo_box_entry ()
+        val combo = GEdit.entry ()
         initializer
           self#check_widgets ();
           let combo_widget = combo#coerce in
           uriHBox#pack ~from:`END ~fill:true ~expand:true combo_widget;
-          combo#entry#misc#grab_focus ()
+          combo#misc#grab_focus ()
         method browserUri = combo
       end
 
@@ -1223,7 +1231,8 @@ class gui () =
 
     method private updateFontSize () =
       self#sourceView#misc#modify_font_by_name
-        (sprintf "%s %d" BuildTimeConf.script_font font_size)
+        (sprintf "%s %d" BuildTimeConf.script_font font_size);
+      MatitaAutoGui.set_font_size font_size
 
     method increaseFontSize () =
       font_size <- font_size + 1;
@@ -1367,9 +1376,10 @@ class interpModel =
         tree_store#get ~row:iter ~column:interp_no_col
     end
 
+
 let interactive_string_choice 
   text prefix_len ?(title = "") ?(msg = "") () ~id locs uris 
-=
+= 
   let gui = instance () in
     let dialog = gui#newUriDialog () in
     dialog#uriEntryHBox#misc#hide ();
@@ -1385,13 +1395,15 @@ let interactive_string_choice
     let rec colorize acc_len = function
       | [] -> 
           let floc = HExtlib.floc_of_loc (acc_len,hack_len) in
-          fst(MatitaGtkMisc.utf8_parsed_text text floc)
+          escape_pango_markup (fst(MatitaGtkMisc.utf8_parsed_text text floc))
       | he::tl -> 
           let start, stop =  HExtlib.loc_of_floc he in
           let floc1 = HExtlib.floc_of_loc (acc_len,start) in
           let str1,_=MatitaGtkMisc.utf8_parsed_text text floc1 in
           let str2,_ = MatitaGtkMisc.utf8_parsed_text text he in
-          str1 ^ "<b>" ^ str2 ^ "</b>" ^ colorize stop tl
+          escape_pango_markup str1 ^ "<b>" ^ 
+          escape_pango_markup str2 ^ "</b>" ^ 
+          colorize stop tl
     in
 (*     List.iter (fun l -> let start, stop = HExtlib.loc_of_floc l in
                 Printf.eprintf "(%d,%d)" start stop) locs; *)
@@ -1410,6 +1422,7 @@ let interactive_string_choice
     let txt,_ = MatitaGtkMisc.utf8_parsed_text txt
       (HExtlib.floc_of_loc (prefix_len,MatitaGtkMisc.utf8_string_length txt))
     in
+  prerr_endline ("txt:" ^ txt);
     dialog#uriChoiceLabel#set_label txt;
     List.iter model#easy_append uris;
     let return v =