Closed cedlemo closed 3 years ago
Hi @cedlemo, I'm currently working on the lablgtk2on3 branch in order to port Coq's UI CoqIDE to gtk3. Note that some examples are failing only because GMain.init
is now required prior to the first class creation. I did not make an exhaustive check, but this is the case for instance of iconview.ml
and tree_model.ml
, which are respectively fixed with the following patches:
diff --git a/examples/iconview.ml b/examples/iconview.ml
index 21e7b74..7daf40d 100644
--- a/examples/iconview.ml
+++ b/examples/iconview.ml
@@ -146,6 +146,7 @@ let do_iconview window =
| _ -> ()
let main =
+ GMain.init ();
let w = GWindow.window ~title:"GtkIconView demo" ~width:650 ~height:400 () in
w#connect#destroy GMain.quit ;
do_iconview w ;
diff --git a/examples/tree_model.ml b/examples/tree_model.ml
index 9741bdc..8d1d490 100644
--- a/examples/tree_model.ml
+++ b/examples/tree_model.ml
@@ -151,6 +151,7 @@ let inspect_data_2 column (model : GTree.model) =
let main =
+ GMain.init ();
let w = GWindow.window ~title:"GtkListStore test" () in
w#connect#destroy GMain.quit ;
@herbelin I don't think this is new. Examples are intended to be run using the lablgtk top-level, which links gtkInit.cmo
, whose role is just to call the GMain.init
function.
How were you trying to run the tests?
The reason the call to the init function is delayed was originally to allow Unison to link with lablgtk but still be allowed to run in a shell window in text mode.
How were you trying to run the tests?
I did not know the intended way to run them. I compiled them directly with ocamlc
.
The same invocation indeed already fails with lablgtk2, sorry. (I still have to understand why I had to move the call to GMain.init
earlier in CoqIDE though.)
@cedlemo it is probably worth to update the list, I think.
@XVilka, yep.
@cedlemo was there any progress? There were a lot of changes since the list was formed initially. And lablgtk3 is now outlived a few beta releases already.
See also this PR https://github.com/garrigue/lablgtk/pull/84
There are a few unported, as signalled in the examples/dune
file, IMHO we can close this.
Here is a list of the examples to test the lablgtk2on3 (#2 ) ordered on their number of lines. It will help to keep track of what has been done and what remains to do.
Tested
Remain to test: