From d016e542bb42c2b47f9cfc66f51cd01d52124141 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 19 Nov 2018 15:57:59 +0100 Subject: CoqIDE: Change name of module: Sourceview2 -> Sourceview3 --- ide/wg_ScriptView.ml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ide/wg_ScriptView.ml') diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml index 5e26c50797..8677f5fc65 100644 --- a/ide/wg_ScriptView.ml +++ b/ide/wg_ScriptView.ml @@ -284,12 +284,12 @@ end class script_view (tv : source_view) (ct : Coq.coqtop) = -let view = new GSourceView2.source_view (Gobject.unsafe_cast tv) in +let view = new GSourceView3.source_view (Gobject.unsafe_cast tv) in let completion = new Wg_Completion.complete_model ct view#buffer in let popup = new Wg_Completion.complete_popup completion (view :> GText.view) in object (self) - inherit GSourceView2.source_view (Gobject.unsafe_cast tv) + inherit GSourceView3.source_view (Gobject.unsafe_cast tv) val undo_manager = new undo_manager view#buffer @@ -491,17 +491,17 @@ object (self) end -let script_view ct ?(source_buffer:GSourceView2.source_buffer option) ?draw_spaces = - GtkSourceView2.SourceView.make_params [] ~cont:( +let script_view ct ?(source_buffer:GSourceView3.source_buffer option) ?draw_spaces = + GtkSourceView3.SourceView.make_params [] ~cont:( GtkText.View.make_params ~cont:( GContainer.pack_container ~create: (fun pl -> let w = match source_buffer with - | None -> GtkSourceView2.SourceView.new_ () - | Some buf -> GtkSourceView2.SourceView.new_with_buffer + | None -> GtkSourceView3.SourceView.new_ () + | Some buf -> GtkSourceView3.SourceView.new_with_buffer (Gobject.try_cast buf#as_buffer "GtkSourceBuffer") in let w = Gobject.unsafe_cast w in Gobject.set_params (Gobject.try_cast w "GtkSourceView") pl; - Gaux.may ~f:(GtkSourceView2.SourceView.set_draw_spaces w) draw_spaces; + Gaux.may ~f:(GtkSourceView3.SourceView.set_draw_spaces w) draw_spaces; ((new script_view w ct) : script_view)))) -- cgit v1.2.3 From b373967afc2ba95fdeb850c1af9c89637a2afbb4 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 19 Nov 2018 15:37:14 +0100 Subject: CoqIDE: Use modify_bg rather than modify_base to change background color. The effect of modify_base is told to be widget-dependent. It uses to change the background with gtk2 but not with gtk3. So we use the more explicit modify_bg. --- ide/wg_ScriptView.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ide/wg_ScriptView.ml') diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml index 8677f5fc65..7812f1a222 100644 --- a/ide/wg_ScriptView.ml +++ b/ide/wg_ScriptView.ml @@ -461,7 +461,7 @@ object (self) in let _ = GtkSignal.connect ~sgn:move_line_signal ~callback obj in (* Plug on preferences *) - let cb clr = self#misc#modify_base [`NORMAL, `NAME clr] in + let cb clr = self#misc#modify_bg [`NORMAL, `NAME clr] in let _ = background_color#connect#changed ~callback:cb in let _ = self#misc#connect#realize ~callback:(fun () -> cb background_color#get) in -- cgit v1.2.3 From 4d69a22ffa06005b11040c9db9064a1d730eeb7f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Thu, 7 Feb 2019 16:54:11 +0100 Subject: Fix for post-beta3 lablgtk3 changes about cairo (from Claudio). --- ide/wg_ScriptView.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ide/wg_ScriptView.ml') diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml index 7812f1a222..e95176bf4d 100644 --- a/ide/wg_ScriptView.ml +++ b/ide/wg_ScriptView.ml @@ -484,7 +484,7 @@ object (self) stick tab_length self self#set_tab_width; stick auto_complete self self#set_auto_complete; - let cb ft = self#misc#modify_font (Pango.Font.from_string ft) in + let cb ft = self#misc#modify_font (GPango.font_description_from_string ft) in stick text_font self cb; () -- cgit v1.2.3