-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore ability to call g_object_new (XDP_TYPE_PORTAL, ...)
Calling `g_object_new()` for an XdpPortal used to work before 0.7, but no longer sets up the GDBusConnection, making most method calls fail with `assertion 'G_IS_DBUS_CONNECTION (connection)' failed`. This makes #119 an incompatible change. In particular, the GTK 4 test app calls `new Xdp.Portal()`, which is a JavaScript binding for `g_object_new()` and fails in this way. GObject documentation suggests that bindings should automatically detect types that implement GInitable and call GInitable.init in the higher-level language's constructor, but it seems that neither gjs nor pygobject actually does this. Mostly preserve previous functionality by moving the actual initialization back to the GObject instance init function, and making the GInitable init function just report a pre-existing error if any. Signed-off-by: Simon McVittie <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters