summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJamie McCracken <jamiemcc@src.gnome.org>2007-03-06 22:42:44 +0000
committerJamie McCracken <jamiemcc@src.gnome.org>2007-03-06 22:42:44 +0000
commit2943abf2f989d58d0536c44302560b78250bba3c (patch)
tree45913a4695c293ea1e77eda230d6295a38289a76 /python
parent335d7a92c80e6dd733d71d33768d0a2977a0297b (diff)
downloadtracker-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.py9
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)