diff options
author | Ted Gould <ted@gould.cx> | 2010-03-12 15:08:25 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-12 15:08:25 -0600 |
commit | fced2aaae755846922b46fa55a6444f0e0406c8d (patch) | |
tree | 0474415e5dea1f15f3d7f3698d3c6072eb655621 | |
parent | 05dbbb9a09bfa74c23683c8110bf0853635a635e (diff) | |
download | ayatana-indicator-session-fced2aaae755846922b46fa55a6444f0e0406c8d.tar.gz ayatana-indicator-session-fced2aaae755846922b46fa55a6444f0e0406c8d.tar.bz2 ayatana-indicator-session-fced2aaae755846922b46fa55a6444f0e0406c8d.zip |
Building us a proxy! Now we are dangerous.
-rw-r--r-- | src/indicator-session.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c index a815e40..0b8d77e 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -55,6 +55,7 @@ struct _IndicatorSession { IndicatorServiceManager * service; GtkImage * status_image; DbusmenuGtkMenu * menu; + DBusGProxy * service_proxy; }; GType indicator_session_get_type (void); @@ -109,6 +110,12 @@ indicator_session_init (IndicatorSession *self) dbusmenu_client_add_type_handler(client, MENU_SWITCH_TYPE, build_menu_switch); dbusmenu_client_add_type_handler(client, USER_ITEM_TYPE, new_user_item); + DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + self->service_proxy = dbus_g_proxy_new_for_name(session_bus, + INDICATOR_SESSION_DBUS_NAME, + INDICATOR_SESSION_SERVICE_DBUS_OBJECT, + INDICATOR_SESSION_SERVICE_DBUS_IFACE); + return; } @@ -122,6 +129,11 @@ indicator_session_dispose (GObject *object) self->service = NULL; } + if (self->service_proxy != NULL) { + g_object_unref(self->service_proxy); + self->service_proxy = NULL; + } + G_OBJECT_CLASS (indicator_session_parent_class)->dispose (object); return; } |