aboutsummaryrefslogtreecommitdiff
path: root/ide/wg_ScriptView.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-08-16 05:00:48 +0200
committerPierre-Marie Pédrot2015-08-16 17:53:34 +0200
commit4c202177e7d1a26f3b8bc105a1ceb604f178b584 (patch)
treed8dc7180712a34a44cfecc218761820011d2afc4 /ide/wg_ScriptView.ml
parentcda147bf2b22e5230abd6fb604e9b8c105828717 (diff)
Using the new preference mechanism for colors in CoqIDE.
A lot of legacy code has been removed in the process in favour of signal-based interactions.
Diffstat (limited to 'ide/wg_ScriptView.ml')
-rw-r--r--ide/wg_ScriptView.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml
index 8298d9954f..3b3d9db4bd 100644
--- a/ide/wg_ScriptView.ml
+++ b/ide/wg_ScriptView.ml
@@ -6,6 +6,8 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
+open Preferences
+
type insert_action = {
ins_val : string;
ins_off : int;
@@ -456,6 +458,10 @@ object (self)
if not proceed then GtkSignal.stop_emit ()
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 _ = background_color#connect#changed cb in
+ let _ = self#misc#connect#realize (fun () -> cb background_color#get) in
()
end