From bb3c3713929ff8647004c18faaebcc311335cfa9 Mon Sep 17 00:00:00 2001
From: Pierre Boutillier
Date: Tue, 3 Feb 2015 22:01:17 +0100
Subject: Hardcode how coqide have to look for coqtop in MacOS bundle
Sorry, that is ugly. Please revert if you see a better way to do it.
---
ide/ideutils.ml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
(limited to 'ide')
diff --git a/ide/ideutils.ml b/ide/ideutils.ml
index a869442696..84ef8f40db 100644
--- a/ide/ideutils.ml
+++ b/ide/ideutils.ml
@@ -243,7 +243,14 @@ let coqtop_path () =
let i = Str.search_backward (Str.regexp_string "coqide") prog pos
in
String.blit "coqtop" 0 prog i 6;
- if Sys.file_exists prog then prog else "coqtop"
+ if Sys.file_exists prog then prog
+ else
+ let in_macos_bundle =
+ Filename.concat
+ (Filename.dirname prog)
+ (Filename.concat "../Resources/bin" (Filename.basename prog))
+ in if Sys.file_exists in_macos_bundle then in_macos_bundle
+ else "coqtop"
with Not_found -> "coqtop"
in file
--
cgit v1.2.3
From 997230709aed2b1d2f57f9ac8829991fa01e9b5c Mon Sep 17 00:00:00 2001
From: Pierre Boutillier
Date: Tue, 3 Feb 2015 23:12:56 +0100
Subject: Fixup version & copyright for MacOS bundle
---
ide/MacOS/Info.plist.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'ide')
diff --git a/ide/MacOS/Info.plist.template b/ide/MacOS/Info.plist.template
index fd80c83969..e224e81204 100644
--- a/ide/MacOS/Info.plist.template
+++ b/ide/MacOS/Info.plist.template
@@ -66,7 +66,7 @@
CFBundleGetInfoString
Coq_vVERSION
NSHumanReadableCopyright
- Copyright 1999-2014, The Coq Development Team INRIA - CNRS - LIX - LRI - PPS
+ Copyright 1999-2015, The Coq Development Team INRIA - CNRS - LIX - LRI - PPS
CFBundleHelpBookFolder
share/doc/coq/html/
CFAppleHelpAnchor
--
cgit v1.2.3
From f5b7f689e6eeeb439346652566f6d841470376f4 Mon Sep 17 00:00:00 2001
From: Enrico Tassi
Date: Sat, 14 Feb 2015 18:52:11 +0100
Subject: Attempt to be more colorblind friendly in CoqIDE (Close #4024)
---
ide/preferences.ml | 36 +++++++++++++++++++++++++++---------
ide/preferences.mli | 1 +
ide/tags.ml | 24 ++++++++++++++++++++----
ide/tags.mli | 10 ++++++++++
4 files changed, 58 insertions(+), 13 deletions(-)
(limited to 'ide')
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 25712f951b..9a4fde2f6e 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -144,6 +144,7 @@ type pref =
mutable processing_color : string;
mutable processed_color : string;
mutable error_color : string;
+ mutable error_fg_color : string;
mutable dynamic_word_wrap : bool;
mutable show_line_number : bool;
@@ -220,10 +221,11 @@ let current = {
vertical_tabs = false;
opposite_tabs = false;
- background_color = "cornsilk";
- processed_color = "light green";
- processing_color = "light blue";
- error_color = "#FFCCCC";
+ background_color = Tags.default_color;
+ processed_color = Tags.default_processed_color;
+ processing_color = Tags.default_processing_color;
+ error_color = Tags.default_error_color;
+ error_fg_color = Tags.default_error_fg_color;
dynamic_word_wrap = false;
show_line_number = false;
@@ -296,6 +298,7 @@ let save_pref () =
add "processing_color" [p.processing_color] ++
add "processed_color" [p.processed_color] ++
add "error_color" [p.error_color] ++
+ add "error_fg_color" [p.error_fg_color] ++
add "dynamic_word_wrap" [string_of_bool p.dynamic_word_wrap] ++
add "show_line_number" [string_of_bool p.show_line_number] ++
add "auto_indent" [string_of_bool p.auto_indent] ++
@@ -382,6 +385,7 @@ let load_pref () =
set_hd "processing_color" (fun v -> np.processing_color <- v);
set_hd "processed_color" (fun v -> np.processed_color <- v);
set_hd "error_color" (fun v -> np.error_color <- v);
+ set_hd "error_fg_color" (fun v -> np.error_fg_color <- v);
set_bool "dynamic_word_wrap" (fun v -> np.dynamic_word_wrap <- v);
set_bool "show_line_number" (fun v -> np.show_line_number <- v);
set_bool "auto_indent" (fun v -> np.auto_indent <- v);
@@ -466,10 +470,15 @@ let configure ?(apply=(fun () -> ())) () =
~text:"Background color of errors"
~packing:(table#attach ~expand:`X ~left:0 ~top:3) ()
in
+ let error_fg_label = GMisc.label
+ ~text:"Foreground color of errors"
+ ~packing:(table#attach ~expand:`X ~left:0 ~top:4) ()
+ in
let () = background_label#set_xalign 0. in
let () = processed_label#set_xalign 0. in
let () = processing_label#set_xalign 0. in
let () = error_label#set_xalign 0. in
+ let () = error_fg_label#set_xalign 0. in
let background_button = GButton.color_button
~color:(Tags.color_of_string (current.background_color))
~packing:(table#attach ~left:1 ~top:0) ()
@@ -486,15 +495,19 @@ let configure ?(apply=(fun () -> ())) () =
~color:(Tags.get_error_color ())
~packing:(table#attach ~left:1 ~top:3) ()
in
+ let error_fg_button = GButton.color_button
+ ~color:(Tags.get_error_fg_color ())
+ ~packing:(table#attach ~left:1 ~top:4) ()
+ in
let reset_button = GButton.button
~label:"Reset"
~packing:box#pack ()
in
let reset_cb () =
- background_button#set_color (Tags.color_of_string "cornsilk");
- processing_button#set_color (Tags.color_of_string "light blue");
- processed_button#set_color (Tags.color_of_string "light green");
- error_button#set_color (Tags.color_of_string "#FFCCCC");
+ background_button#set_color Tags.(color_of_string default_color);
+ processing_button#set_color Tags.(color_of_string default_processing_color);
+ processed_button#set_color Tags.(color_of_string default_processed_color);
+ error_button#set_color Tags.(color_of_string default_error_color);
in
let _ = reset_button#connect#clicked ~callback:reset_cb in
let label = "Color configuration" in
@@ -503,7 +516,12 @@ let configure ?(apply=(fun () -> ())) () =
current.processing_color <- Tags.string_of_color processing_button#color;
current.processed_color <- Tags.string_of_color processed_button#color;
current.error_color <- Tags.string_of_color error_button#color;
- !refresh_editor_hook ()
+ current.error_fg_color <- Tags.string_of_color error_fg_button#color;
+ !refresh_editor_hook ();
+ Tags.set_processing_color processing_button#color;
+ Tags.set_processed_color processed_button#color;
+ Tags.set_error_color error_button#color;
+ Tags.set_error_fg_color error_fg_button#color
in
custom ~label box callback true
in
diff --git a/ide/preferences.mli b/ide/preferences.mli
index 1b52d20a4c..ab12e4c7ba 100644
--- a/ide/preferences.mli
+++ b/ide/preferences.mli
@@ -71,6 +71,7 @@ type pref =
mutable processing_color : string;
mutable processed_color : string;
mutable error_color : string;
+ mutable error_fg_color : string;
mutable dynamic_word_wrap : bool;
mutable show_line_number : bool;
diff --git a/ide/tags.ml b/ide/tags.ml
index 04ad9a519c..40d5b4ded3 100644
--- a/ide/tags.ml
+++ b/ide/tags.ml
@@ -13,15 +13,23 @@ let make_tag (tt:GText.tag_table) ~name prop =
tt#add new_tag#as_tag;
new_tag
-let processed_color = ref "light green"
-let processing_color = ref "light blue"
-let error_color = ref "#FFCCCC"
+(* These work fine for colorblind people too *)
+let default_processed_color = "light green"
+let default_processing_color = "light blue"
+let default_error_color = "#FF3333"
+let default_error_fg_color = "#FF5555"
+let default_color = "cornsilk"
+
+let processed_color = ref default_processed_color
+let processing_color = ref default_processing_color
+let error_color = ref default_error_color
+let error_fg_color = ref default_error_fg_color
module Script =
struct
let table = GText.tag_table ()
let comment = make_tag table ~name:"comment" []
- let error = make_tag table ~name:"error" [`UNDERLINE `SINGLE ; `FOREGROUND "red"]
+ let error = make_tag table ~name:"error" [`UNDERLINE `SINGLE ; `FOREGROUND !error_fg_color]
let error_bg = make_tag table ~name:"error_bg" [`BACKGROUND !error_color]
let to_process = make_tag table ~name:"to_process" [`BACKGROUND !processing_color]
let processed = make_tag table ~name:"processed" [`BACKGROUND !processed_color]
@@ -94,3 +102,11 @@ let set_error_color clr =
let s = string_of_color clr in
error_color := s;
Script.error_bg#set_property (`BACKGROUND s)
+
+let get_error_fg_color () = color_of_string !error_fg_color
+
+let set_error_fg_color clr =
+ let s = string_of_color clr in
+ error_fg_color := s;
+ Script.error#set_property (`FOREGROUND s)
+
diff --git a/ide/tags.mli b/ide/tags.mli
index 9c3261d66d..e68015c991 100644
--- a/ide/tags.mli
+++ b/ide/tags.mli
@@ -53,3 +53,13 @@ val set_processing_color : Gdk.color -> unit
val get_error_color : unit -> Gdk.color
val set_error_color : Gdk.color -> unit
+
+val get_error_fg_color : unit -> Gdk.color
+val set_error_fg_color : Gdk.color -> unit
+
+val default_processed_color : string
+val default_processing_color : string
+val default_error_color : string
+val default_error_fg_color : string
+val default_color : string
+
--
cgit v1.2.3
From 2bea61e8e1ec02906bf63db4142cb26528bb4d76 Mon Sep 17 00:00:00 2001
From: Enrico Tassi
Date: Sat, 14 Feb 2015 19:00:38 +0100
Subject: CoqIDE: restore old default colors
---
ide/tags.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'ide')
diff --git a/ide/tags.ml b/ide/tags.ml
index 40d5b4ded3..079cf94853 100644
--- a/ide/tags.ml
+++ b/ide/tags.ml
@@ -16,8 +16,8 @@ let make_tag (tt:GText.tag_table) ~name prop =
(* These work fine for colorblind people too *)
let default_processed_color = "light green"
let default_processing_color = "light blue"
-let default_error_color = "#FF3333"
-let default_error_fg_color = "#FF5555"
+let default_error_color = "#FFCCCC"
+let default_error_fg_color = "red"
let default_color = "cornsilk"
let processed_color = ref default_processed_color
--
cgit v1.2.3