Hey,
here is the patch for the bug reported in the debian BTS[1] regarding
tracker-handler and t-s-t being missing. With this patch,
tracker-handler shows a gtk dialog on the first entered search when
t-s-t is missing and no action will be taken.
This report affects only the deskbar <2.19 handler as with the new
deskbar prerequisites for different handlers in one file are handled
correctly.
Cheers, Marcus
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441889
diff --git a/python/deskbar-handler/tracker-handler.py b/python/deskbar-handler/tracker-handler.py
index 89f99b0..5982284 100644
--- a/python/deskbar-handler/tracker-handler.py
+++ b/python/deskbar-handler/tracker-handler.py
@@ -17,6 +17,7 @@ import sys
import os.path
import time
import urllib
+import gtk
import gnome
import gobject
@@ -123,9 +124,19 @@ class TrackerSearchToolHandler(deskbar.Handler.Handler):
def __init__(self):
deskbar.Handler.Handler.__init__(self, 'tracker')
+ self._have_tst = deskbar.Utils.is_program_in_path ('tracker-search-tool')
+ self._showed_warning = False
def query(self, query):
- return [TrackerSearchToolMatch(self, name=query)]
+ if self._have_tst:
+ return [TrackerSearchToolMatch(self, name=query)]
+ if not self._showed_warning:
+ self._showed_warning = True
+ d = gtk.MessageDialog (None, gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK,
+ 'tracker-search-tool could not be found. Search with tracker-search-tool will not be available.')
+ d.connect ("response", lambda w,d: w.destroy ())
+ d.run ()
+ return []
@staticmethod
def requirements ():
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list