Skip to content

Draft: gdbusproxy: Emit `g-name-owner` when it is initialized

Ian Douglas Scott requested to merge ids1024/glib:gdbusproxy into main

This makes code like the following correctly detect what the properly has been initialized to something other than null.

GLib = imports.gi.GLib;
Gio = imports.gi.Gio;

proxy = new Gio.DBusProxy({
    g_bus_type: Gio.BusType.SYSTEM,
    g_name: "org.freedesktop.systemd1",
    g_object_path: "/org/freedesktop/systemd1",
    g_interface_name: "org.freedesktop.systemd1.Manager"
});

print(proxy.g_name_owner);
proxy.connect("notify::g-name-owner", () => print(proxy.g_name_owner));

proxy.init_async(GLib.PRIORITY_DEFAULT, null, null);
GLib.MainLoop.new(null, false).run();
Edited by Ian Douglas Scott

Merge request reports