X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaGui.ml;h=a17b9bfb16942a8c62ba3cda6f6a186f8824fbad;hb=fd372e069bbcaa96dc5b2eef04f341b28850d726;hp=50d3f8ce8b046b9d338deb77f68af70462cc7f5d;hpb=4b84dd78aa6b596a0d3ee38745890ff65efa8b10;p=helm.git diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index 50d3f8ce8..a17b9bfb1 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -31,6 +31,14 @@ open MatitaMisc let gui_instance = ref None ;; +class type browserWin = + (* this class exists only because GEdit.combo_box_entry is not supported by + * lablgladecc :-(((( *) +object + inherit MatitaGeneratedGui.browserWin + method browserUri: GEdit.combo_box_entry +end + class console ~(buffer: GText.buffer) () = object (self) val error_tag = buffer#create_tag [ `FOREGROUND "red" ] @@ -226,24 +234,27 @@ class gui () = buf#insert ~iter:(buf#get_iter_at_mark `INSERT) "\n"; advance ()); (* script monospace font stuff *) - let font = Pango.Font.from_string "Monospace 10" in - let monospace_tag = - self#main#scriptTextView#buffer#create_tag [`FONT_DESC font] + let font = + Helm_registry.get_opt_default Helm_registry.get + BuildTimeConf.default_script_font "matita.script_font" in - let _ = +(* let monospace_tag = + self#main#scriptTextView#buffer#create_tag [`FONT_DESC font] + in *) + self#main#scriptTextView#misc#modify_font_by_name font; +(* let _ = self#main#scriptTextView#buffer#connect#changed ~callback:(fun _ -> let start, stop = self#main#scriptTextView#buffer#bounds in self#main#scriptTextView#buffer#apply_tag monospace_tag start stop) - in - + in *) (* debug menu *) self#main#debugMenu#misc#hide (); (* status bar *) - self#main#hintLowImage#set_file "icons/matita-bulb-low.png"; - self#main#hintMediumImage#set_file "icons/matita-bulb-medium.png"; - self#main#hintHighImage#set_file "icons/matita-bulb-high.png"; + self#main#hintLowImage#set_file (image_path "matita-bulb-low.png"); + self#main#hintMediumImage#set_file (image_path "matita-bulb-medium.png"); + self#main#hintHighImage#set_file (image_path "matita-bulb-high.png"); (* focus *) - self#main#scriptTextView#misc#grab_focus (); + self#main#scriptTextView#misc#grab_focus (); (* main win dimension *) let width = Gdk.Screen.width () in let height = Gdk.Screen.height () in @@ -272,9 +283,16 @@ class gui () = method main = main method newBrowserWin () = - let win = new browserWin () in - win#check_widgets (); - win + object (self) + inherit browserWin () + val combo = GEdit.combo_box_entry () + initializer + self#check_widgets (); + let combo_widget = combo#coerce in + browserHBox#add combo_widget; + browserHBox#reorder_child combo_widget ~pos:6 + method browserUri = combo + end method newUriDialog () = let dialog = new uriChoiceDialog () in