From bcbeac04993ffbad4f4432b646614491f2d8a5d5 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 19 Nov 2018 15:56:29 +0100 Subject: 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. --- ide/coqide_main.ml | 2 +- ide/ideutils.ml | 3 ++- 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; -- cgit v1.2.3