diff options
author | Ted Gould <ted@gould.cx> | 2010-01-07 12:29:33 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-07 12:29:33 -0600 |
commit | 199f3d22a194b89241a2d29519aae587f5c4b5a8 (patch) | |
tree | 684f3a0d54d991e2f4cd76534a2ed411c0b134fb /src | |
parent | 17476bdd4ceaf0b3ecc279a555ac82838e2d8016 (diff) | |
download | libayatana-appindicator-199f3d22a194b89241a2d29519aae587f5c4b5a8.tar.gz libayatana-appindicator-199f3d22a194b89241a2d29519aae587f5c4b5a8.tar.bz2 libayatana-appindicator-199f3d22a194b89241a2d29519aae587f5c4b5a8.zip |
Allowing for the default path if one is not given.
Diffstat (limited to 'src')
-rw-r--r-- | src/application-service-watcher.c | 8 | ||||
-rw-r--r-- | src/dbus-shared.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index 81fae36..f2823dd 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -169,7 +169,13 @@ _notification_watcher_server_register_status_notifier_item (ApplicationServiceWa { ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher); - application_service_appstore_application_add(priv->appstore, dbus_g_method_get_sender(method), service); + const gchar * finalservice = NOTIFICATION_ITEM_DEFAULT_OBJ; + + if (service[0] == '/') { + finalservice = service; + } + + application_service_appstore_application_add(priv->appstore, dbus_g_method_get_sender(method), finalservice); dbus_g_method_return(method, G_TYPE_NONE); return TRUE; diff --git a/src/dbus-shared.h b/src/dbus-shared.h index da9dfef..efc57a4 100644 --- a/src/dbus-shared.h +++ b/src/dbus-shared.h @@ -28,4 +28,5 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #define NOTIFICATION_WATCHER_DBUS_IFACE "org.freedesktop.StatusNotifierWatcher" #define NOTIFICATION_ITEM_DBUS_IFACE "org.freedesktop.StatusNotifierItem" +#define NOTIFICATION_ITEM_DEFAULT_OBJ "/StatusNotifierItem" |