aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/preferences.ml
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-02 19:07:52 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-05-02 19:07:52 +0000
commit1f27f3d9e2df9052197c10eab8c4ccfecd5a5dae (patch)
treeb983d05dad28950b8a0de7ebb7604aaa47d7b527 /ide/preferences.ml
parent8a72970933994c9670e570fb6f3f768e14143237 (diff)
Better style handling in CoqIDE
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15273 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/preferences.ml')
-rw-r--r--ide/preferences.ml13
1 files changed, 9 insertions, 4 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml
index b976eba3d..2ad2cc802 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -75,6 +75,7 @@ let inputenc_of_string s =
(** Hooks *)
let refresh_font_hook = ref (fun () -> ())
+let refresh_style_hook = ref (fun () -> ())
let refresh_background_color_hook = ref (fun () -> ())
let refresh_toolbar_hook = ref (fun () -> ())
let auto_complete_hook = ref (fun x -> ())
@@ -546,8 +547,12 @@ let configure ?(apply=(fun () -> ())) () =
in
let source_style =
- combo "Highlighting style"
- ~f:(fun s -> current.source_style <- s) ~new_allowed:false
+ let f s =
+ current.source_style <- s;
+ !refresh_style_hook ()
+ in
+ combo "Highlighting style:"
+ ~f ~new_allowed:false
style_manager#style_scheme_ids current.source_style
in
@@ -687,11 +692,11 @@ let configure ?(apply=(fun () -> ())) () =
let cmds =
[Section("Fonts", Some `SELECT_FONT,
[config_font]);
- Section("Colors", Some `SELECT_COLOR, [config_color]);
+ Section("Colors", Some `SELECT_COLOR, [config_color;source_style]);
Section("Files", Some `DIRECTORY,
[global_auto_revert;global_auto_revert_delay;
auto_save; auto_save_delay; (* auto_save_name*)
- encodings;source_style;
+ encodings;
]);
Section("Project", Some (`STOCK "gtk-page-setup"),
[project_file_name;read_project;