diff options
author | Jamie McCracken <jamiemcc@src.gnome.org> | 2007-03-06 22:42:44 +0000 |
---|---|---|
committer | Jamie McCracken <jamiemcc@src.gnome.org> | 2007-03-06 22:42:44 +0000 |
commit | 2943abf2f989d58d0536c44302560b78250bba3c (patch) | |
tree | 45913a4695c293ea1e77eda230d6295a38289a76 /python | |
parent | 335d7a92c80e6dd733d71d33768d0a2977a0297b (diff) | |
download | tracker-2943abf2f989d58d0536c44302560b78250bba3c.tar.gz |
added check for tracker in activatable names list
svn path=/trunk/; revision=532
Diffstat (limited to 'python')
-rw-r--r-- | python/deskbar-handler/tracker-handler.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/deskbar-handler/tracker-handler.py b/python/deskbar-handler/tracker-handler.py index 546d51c46..cd8c51d12 100644 --- a/python/deskbar-handler/tracker-handler.py +++ b/python/deskbar-handler/tracker-handler.py @@ -27,6 +27,15 @@ def _check_requirements (): try : if getattr(dbus, 'version', (0,0,0)) >= (0,41,0): import dbus.glib + + # Check that Tracker can be started via dbus activation, we will have trouble if it's not + bus = dbus.SessionBus() + proxy_obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus') + dbus_iface = dbus.Interface(proxy_obj, 'org.freedesktop.DBus') + activatables = dbus_iface.ListActivatableNames() + if not "org.freedesktop.Tracker" in activatables: + return (deskbar.Handler.HANDLER_IS_NOT_APPLICABLE, "Tracker is not activatable via dbus", None) + except: return (deskbar.Handler.HANDLER_IS_NOT_APPLICABLE, "Python dbus.glib bindings not found.", None) return (deskbar.Handler.HANDLER_IS_HAPPY, None, None) |