From 8ce8ba9db77be5c6515301aa109726029e12834b Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 6 Jun 2005 09:36:04 +0000 Subject: [PATCH] - set monospace buffer using modify_font widget method - added configuration key for user defined font and built time default --- helm/matita/Makefile.in | 4 ++-- helm/matita/buildTimeConf.ml.in | 1 + helm/matita/matita.conf.xml | 1 + helm/matita/matitaGui.ml | 17 ++++++++++------- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/helm/matita/Makefile.in b/helm/matita/Makefile.in index f584ec840..51c1bed06 100644 --- a/helm/matita/Makefile.in +++ b/helm/matita/Makefile.in @@ -41,14 +41,14 @@ CCMOS = \ matitaDisambiguator.cmo \ matitaEngine.cmo -LIB_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES)) all: matita matitac cicbrowser ifeq ($(HAVE_OCAMLOPT),yes) CMXS = $(patsubst %.cmo,%.cmx,$(CMOS)) CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS)) -LIBX_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES)) +LIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES)) +LIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES)) opt: matita.opt matitac.opt cicbrowser.opt else opt: diff --git a/helm/matita/buildTimeConf.ml.in b/helm/matita/buildTimeConf.ml.in index 98c033fdb..bff7ad6aa 100644 --- a/helm/matita/buildTimeConf.ml.in +++ b/helm/matita/buildTimeConf.ml.in @@ -33,4 +33,5 @@ let base_uri = "cic:/matita";; let phrase_sep = ".";; let blank_uri = "about:blank";; let current_proof_uri = "about:current_proof";; +let default_script_font = "Monospace 10";; diff --git a/helm/matita/matita.conf.xml b/helm/matita/matita.conf.xml index 07887c6bd..b4e6d0ff0 100644 --- a/helm/matita/matita.conf.xml +++ b/helm/matita/matita.conf.xml @@ -6,6 +6,7 @@ cic:/matita/ .matita/xml gares +
diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index 50d3f8ce8..2844aa92e 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -226,16 +226,19 @@ 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 *) @@ -243,7 +246,7 @@ class gui () = self#main#hintMediumImage#set_file "icons/matita-bulb-medium.png"; self#main#hintHighImage#set_file "icons/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 -- 2.39.2