Use dbus_g_proxy_new_from_proxy

Removes the need to have the dbus connection around.
This commit is contained in:
Bastien Nocera
2008-11-24 12:15:41 +00:00
committed by Daniel Drake
parent b225947a56
commit 6fc861a154
2 changed files with 4 additions and 8 deletions

View File

@ -55,9 +55,7 @@ static void list_fingerprints(DBusGProxy *dev, const char *username)
return;
}
p = dbus_g_proxy_new_for_name(connection,
"net.reactivated.Fprint", dbus_g_proxy_get_path (dev),
"org.freedesktop.DBus.Properties");
p = dbus_g_proxy_new_from_proxy(dev, "org.freedesktop.DBus.Properties", NULL);
if (!dbus_g_proxy_call (p, "GetAll", &error, G_TYPE_STRING, "net.reactivated.Fprint.Device", G_TYPE_INVALID,
dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props, G_TYPE_INVALID))
g_error("GetAll on the Properties interface failed: %s", error->message);