Strange FileChooserDialog behaviour in GTK 4.10

We head some headache, as the example GTK4 for Graphical User Interfaces stopped working with GTK 4.10. Actually, they released Nim 1.6.12 some days ago, so first guess was a compiler issue. Running that example, gives an empty file area and a lot of

(filechooserdialog:11122): Gtk-CRITICAL **: 21:59:32.837: Error building template for list item: .:0:0 Invalid object type 'GtkFileChooserCell'

Finally we discovered, that instead of the standard Nim compile command “nim c file.nim” we now have to use something like

nim c --passL="-lgtk-4" fc.nim

The “–passL=”-lgtk-4" makes it working. I wonder if other language bindings are concerned as well, and what exactly has to be included by the linker.

References: Gintro fails with latest 1.9.1, and GtkFileChooser fails with GTK 4.10 · Issue #219 · StefanSalewski/gintro · GitHub

The GirCore bindings (C#) have the same issue. As we don’t link to GTK but search the binary during runtime there is currently no solution for us.

1 Like

This is a bug in GTK: the file chooser widget is using a private type, but not ensuring that the type is registered.

Should be fixed by: Ensure GtkFileChooserCell's type (!5696) · Merge requests · GNOME / gtk · GitLab

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.