From 0417e7049a32ceb45e19705992dfccef5d858893 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 26 Jul 2009 23:44:19 -0500 Subject: Setting up the Pidgin proxy --- src/status-provider-pidgin.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/status-provider-pidgin.c b/src/status-provider-pidgin.c index ebb701b..529f457 100644 --- a/src/status-provider-pidgin.c +++ b/src/status-provider-pidgin.c @@ -86,6 +86,21 @@ status_provider_pidgin_init (StatusProviderPidgin *self) priv->proxy = NULL; priv->pg_status = PG_STATUS_OFFLINE; + DBusGConnection * bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + g_return_if_fail(bus != NULL); /* Can't do anymore DBus stuff without this, + all non-DBus stuff should be done */ + + GError * error = NULL; + priv->proxy = dbus_g_proxy_new_for_name_owner (bus, + "im.pidgin.purple.PurpleService", + "/im/pidgin/purple/PurpleObject", + "im.pidgin.purple.PurpleInterface", + &error); + if (error != NULL) { + g_debug("Unable to get Pidgin proxy: %s", error->message); + g_error_free(error); + } + return; } -- cgit v1.2.3