diff options
Diffstat (limited to 'src/status-provider-pidgin.c')
-rw-r--r-- | src/status-provider-pidgin.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/status-provider-pidgin.c b/src/status-provider-pidgin.c index 600ee79..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; } @@ -124,6 +139,7 @@ status_provider_pidgin_new (void) static void set_status (StatusProvider * sp, StatusProviderStatus status) { + g_debug("\tSetting Pidgin Status: %d", status); g_return_if_fail(IS_STATUS_PROVIDER_PIDGIN(sp)); StatusProviderPidginPrivate * priv = STATUS_PROVIDER_PIDGIN_GET_PRIVATE(sp); pg_status_t pg_status = sp_to_pg_map[status]; |