Skip to content

Gtk: Initialize GTK automatically if using GTK 4

Philip Chimento requested to merge ptomato/gjs:gtk-init into master

If using GTK 4, (or another future GTK version where Gtk.init() takes no arguments) then call Gtk.init_check() automatically when importing the library.

Use Gtk.init_check() instead of Gtk.init(), and throw an exception on failure, so that if the programmer wants to fall back somehow to a text interface instead of aborting the program, they can do so.

Merge request reports