aboutsummaryrefslogtreecommitdiff
path: root/src/status-provider-pidgin.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-07-26 23:45:32 -0500
committerTed Gould <ted@canonical.com>2009-07-26 23:45:32 -0500
commit935037f30000d1dfba4fa2917d7fc0b5c03f6fe8 (patch)
treee213c17bb3c0e403f27de7f90c3ca3badecf8314 /src/status-provider-pidgin.c
parentfe8cb5044f5c599460efb5e221cc4b0e474cad08 (diff)
parent0417e7049a32ceb45e19705992dfccef5d858893 (diff)
downloadayatana-indicator-session-935037f30000d1dfba4fa2917d7fc0b5c03f6fe8.tar.gz
ayatana-indicator-session-935037f30000d1dfba4fa2917d7fc0b5c03f6fe8.tar.bz2
ayatana-indicator-session-935037f30000d1dfba4fa2917d7fc0b5c03f6fe8.zip
* Lock screen works
* Pidgin proxy gets setup and doesn't crash
Diffstat (limited to 'src/status-provider-pidgin.c')
-rw-r--r--src/status-provider-pidgin.c16
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];