From c53f2f75375dfffd2f258c76f5b722d37ab0daf9 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 26 Aug 2015 00:47:26 +0200 Subject: Switching to an event-based mechanism for CoqIDE preferences. There is no remaining hook in the preferences. In particular, the refresh_editor_hook is gone. --- ide/wg_Command.ml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ide/wg_Command.ml') diff --git a/ide/wg_Command.ml b/ide/wg_Command.ml index 1f342bbc4..163bd28b1 100644 --- a/ide/wg_Command.ml +++ b/ide/wg_Command.ml @@ -85,10 +85,11 @@ object(self) ~packing:(vbox#pack ~fill:true ~expand:true) () in let result = GText.view ~packing:r_bin#add () in views <- (frame#coerce, result, combo#entry) :: views; - result#misc#modify_font (Pango.Font.from_string text_font#get); let cb clr = result#misc#modify_base [`NORMAL, `NAME clr] in let _ = background_color#connect#changed cb in let _ = result#misc#connect#realize (fun () -> cb background_color#get) in + let cb ft = result#misc#modify_font (Pango.Font.from_string ft) in + stick text_font result cb; result#misc#set_can_focus true; (* false causes problems for selection *) result#set_editable false; let callback () = @@ -145,10 +146,6 @@ object(self) method visible = frame#visible - - method refresh_font () = - let iter (_,view,_) = view#misc#modify_font (Pango.Font.from_string text_font#get) in - List.iter iter views method private refresh_color clr = let clr = Tags.color_of_string clr in -- cgit v1.2.3