mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
paparazzicenter: green background color for info messages (e.g. via #pragma message)
This commit is contained in:
@@ -199,14 +199,15 @@ let () =
|
|||||||
let tag = GText.tag ~name:color () in
|
let tag = GText.tag ~name:color () in
|
||||||
tag#set_property (`BACKGROUND color);
|
tag#set_property (`BACKGROUND color);
|
||||||
(color, tag))
|
(color, tag))
|
||||||
["red"; "green";"orange"] in
|
["red"; "green"; "orange"] in
|
||||||
let tag_table = GText.tag_table () in
|
let tag_table = GText.tag_table () in
|
||||||
List.iter (fun (_color, tag) -> tag_table#add tag#as_tag) background_tags;
|
List.iter (fun (_color, tag) -> tag_table#add tag#as_tag) background_tags;
|
||||||
let buffer = GText.buffer ~tag_table () in
|
let buffer = GText.buffer ~tag_table () in
|
||||||
gui#console#set_buffer buffer;
|
gui#console#set_buffer buffer;
|
||||||
|
|
||||||
let errors = "red", ["error"; "no such file"; "undefined reference"; "failure"]
|
let errors = "red", ["error"; "no such file"; "undefined reference"; "failure"]
|
||||||
and warnings = "orange", ["warning"] in
|
and warnings = "orange", ["warning"]
|
||||||
|
and info = "green", ["message"; "info"] in
|
||||||
|
|
||||||
let color_regexps =
|
let color_regexps =
|
||||||
List.map (fun (color, strings) ->
|
List.map (fun (color, strings) ->
|
||||||
@@ -214,7 +215,7 @@ let () =
|
|||||||
let s = String.concat "\\|" s in
|
let s = String.concat "\\|" s in
|
||||||
let s = ".*\\("^s^"\\)" in
|
let s = ".*\\("^s^"\\)" in
|
||||||
color, Str.regexp_case_fold s)
|
color, Str.regexp_case_fold s)
|
||||||
[errors; warnings] in
|
[errors; warnings; info] in
|
||||||
let compute_tags = fun s ->
|
let compute_tags = fun s ->
|
||||||
let rec loop = function
|
let rec loop = function
|
||||||
(color, regexp)::rs ->
|
(color, regexp)::rs ->
|
||||||
|
|||||||
Reference in New Issue
Block a user