From d585baaa4ae70e6603e6bacc7d2e4d8acbb914fe Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 27 May 2009 12:39:18 +0200 Subject: Starting the service if it isn't there --- src/indicator-messages.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/indicator-messages.c') diff --git a/src/indicator-messages.c b/src/indicator-messages.c index da80e4b..bccffe7 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -23,6 +23,8 @@ with this program. If not, see . #include #include #include +#include +#include #include INDICATOR_SET_VERSION @@ -57,6 +59,14 @@ get_icon (void) GtkMenu * get_menu (void) { + guint returnval = 0; + GError * error = NULL; + + DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); + DBusGProxy * proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); + + org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_MESSAGES_DBUS_NAME, 0, &returnval, &error); + return GTK_MENU(dbusmenu_gtkmenu_new(INDICATOR_MESSAGES_DBUS_NAME, INDICATOR_MESSAGES_DBUS_OBJECT)); } -- cgit v1.2.3