aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2018-11-19 15:56:29 +0100
committerVincent Laporte2019-03-19 08:40:18 +0000
commitbcbeac04993ffbad4f4432b646614491f2d8a5d5 (patch)
treed8a8b9cb8abfb427c42c4a33299b287b35fb48f6
parentd016e542bb42c2b47f9cfc66f51cd01d52124141 (diff)
CoqIDE: Ensuring that gtk is initialized before other inits done in ideutils.ml.
This seems fragile: does it depend on the order files are loaded? (It was working for gtk2 when gtk initialization was in coqide_main.ml but it does not work anymore for CoqIDE built on gtk3). Eventually, it might be needed to centralize all initialization side effects in one place.
-rw-r--r--ide/coqide_main.ml2
-rw-r--r--ide/ideutils.ml3
2 files changed, 3 insertions, 2 deletions
diff --git a/ide/coqide_main.ml b/ide/coqide_main.ml
index 21f513b8f4..79420b3857 100644
--- a/ide/coqide_main.ml
+++ b/ide/coqide_main.ml
@@ -8,7 +8,7 @@
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
-let _ = GtkMain.Main.init ()
+let _ = Coqide.set_signal_handlers ()
(* We handle Gtk warning messages ourselves :
- on win32, we don't want them to end on a non-existing console
diff --git a/ide/ideutils.ml b/ide/ideutils.ml
index 5beaba3604..7a44d21ecf 100644
--- a/ide/ideutils.ml
+++ b/ide/ideutils.ml
@@ -8,9 +8,10 @@
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
-
open Preferences
+let _ = GtkMain.Main.init ()
+
let warn_image () =
let img = GMisc.image () in
img#set_stock `DIALOG_WARNING;