Skip to content

object: Only accept plain-object property bags in GObject constructors

We have, for a long time, allowed these objects to be any objects. However, this causes problems, because people do things like this:

new Gio.FileIcon(myFile)

instead of

new Gio.FileIcon({file: myFile})

whereas Gio.FileIcon doesn't support a null file property. Probably this is a confusion with g_file_icon_new().

On the other hand, sometimes it probably just works. And maybe there are cases where people are doing it intentionally.

We'll land this early in the GNOME 47 cycle and back it out if it really causes problems with existing code.

Closes: #580 (closed)

Merge request reports