diff options
author | Ted Gould <ted@canonical.com> | 2009-10-20 17:06:34 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-20 17:06:34 -0500 |
commit | 81afbd1f77b832d8ebef880a5ae6f8869b6a663c (patch) | |
tree | d6049ec4f660188425e74f115a7e5c3a32d45a7e /src/libcustomindicator | |
parent | 484b489a81fcfa902bee346b8c158274de8a44f4 (diff) | |
download | ayatana-indicator-application-81afbd1f77b832d8ebef880a5ae6f8869b6a663c.tar.gz ayatana-indicator-application-81afbd1f77b832d8ebef880a5ae6f8869b6a663c.tar.bz2 ayatana-indicator-application-81afbd1f77b832d8ebef880a5ae6f8869b6a663c.zip |
Okay, connecting this little thing into DBus already.
Diffstat (limited to 'src/libcustomindicator')
-rw-r--r-- | src/libcustomindicator/custom-indicator.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libcustomindicator/custom-indicator.c b/src/libcustomindicator/custom-indicator.c index 82abd0e..a4081cd 100644 --- a/src/libcustomindicator/custom-indicator.c +++ b/src/libcustomindicator/custom-indicator.c @@ -8,6 +8,9 @@ #include "libcustomindicator/custom-indicator.h" #include "libcustomindicator/custom-indicator-enum-types.h" +#include "notification-item-server.h" +#include "notification-watcher-client.h" + /** CustomIndicatorPrivate: @id: The ID of the indicator. Maps to CustomIndicator::id. @@ -216,6 +219,10 @@ custom_indicator_class_init (CustomIndicatorClass *klass) NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN, G_TYPE_NONE); + + /* Initialize the object as a DBus type */ + dbus_g_object_type_install_info(CUSTOM_INDICATOR_TYPE, + &dbus_glib__notification_item_server_object_info); return; } @@ -235,6 +242,18 @@ custom_indicator_init (CustomIndicator *self) priv->watcher_proxy = NULL; + /* Put the object on DBus */ + GError * error = NULL; + DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); + if (error != NULL) { + g_error("Unable to connect to the session bus when creating custom indicator: %s", error->message); + g_error_free(error); + return; + } + dbus_g_connection_register_g_object(connection, + "/need/a/path", + G_OBJECT(self)); + return; } |