Commit 06860f87 authored by MARCHE Claude's avatar MARCHE Claude

Warnings as a window in IDE

parent 47b6ed86
......@@ -724,13 +724,6 @@ let rec init_any any =
init (S.key_any any) any;
S.iter init_any any
(*
let unknown_prover = Gconfig.unknown_prover gconfig
let replace_prover _ _ = false (* Gconfig.replace_prover gconfig *)
*)
let uninstalled_prover = Gconfig.uninstalled_prover gconfig
end
......@@ -738,6 +731,8 @@ end
module M = Session_scheduler.Make(MA)
let () = w#add_accel_group accel_group
let () = w#show ()
(********************)
(* opening database *)
......@@ -777,7 +772,6 @@ let () =
Unix.mkdir project_dir 0o777
end
let info_window ?(callback=(fun () -> ())) mt s =
let buttons = match mt with
| `INFO -> GWindow.Buttons.close
......@@ -801,6 +795,19 @@ let info_window ?(callback=(fun () -> ())) mt s =
if mt <> `QUESTION || x = `OK then callback ())
in ()
let warning_window ?loc msg =
let msg = match loc with
| None -> msg
| Some l ->
Format.fprintf Format.str_formatter "%a: %s"
Loc.gen_report_position l msg;
Format.flush_str_formatter ()
in
info_window `WARNING msg
let () = Warning.set_hook warning_window
(* check if provers are present *)
let () =
if C.Mprover.is_empty (C.get_provers gconfig.Gconfig.config) then
......@@ -1960,8 +1967,6 @@ let (_ : GtkSignal.id) =
let () = Debug.set_flag (Debug.lookup_flag "transform")
*)
let () = w#add_accel_group accel_group
let () = w#show ()
let () = GMain.main ()
(*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment