Skip to content

v0.4.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 May 01:54
· 132 commits to main since this release

Gtk4 v0.4.0

This is a breaking release that introduces constructors automatically generated by GObject introspection. These accept keyword arguments that can be used to set properties during construction. This change fixes an annoying stack overflow error often encountered in the old constructor scheme.

A few constructors had to be changed to be compatible. Here are the most important breaking changes:

  • GtkBuilder - previously used keyword arguments to set a filename to load or a string to load. Now use GtkBuilder(filename::AbstractString) to load an XML file, or GtkBuilder(xml::AbstractString, -1) to load a string.
  • GtkFileFilter - previously used keyword arguments to set a pattern, mimetype, and name. Now the constructor takes pattern::String and mimetype::String as arguments. Use a keyword argument to set the "name" property.
  • GtkCssProvider - use GtkCssProvider(css::AbstractString) to open a string or GtkCssProvider(nothing, filename::AbstractString) to open a file.
  • GtkImage - a string argument loads a filename. The keyword based constructor for icon_name is gone, but one can use a constructor in G_ instead.
  • If you use the argumentless GtkWindow constructor, you'll have to call show() to make the window appear.

Diff since v0.3.5

Merged pull requests: