diff --git a/python/applet/applet.py b/python/applet/applet.py index 6487d23..5ffeb5a 100755 --- a/python/applet/applet.py +++ b/python/applet/applet.py @@ -1,27 +1,31 @@ +#!/usr/bin/env python + import os import gtk -import dbus class TrackerStatusIcon(gtk.StatusIcon): def __init__(self): gtk.StatusIcon.__init__(self) menu = ''' - - - - - - - - - - + + + + + + + + + + + + ''' actions = [ - ('Menu', None, 'Menu'), + ('Menu', None, 'Menu'), ('Search', None, '_Search...', None, 'Search files with MetaTracker', self.on_activate), ('Preferences', gtk.STOCK_PREFERENCES, '_Preferences...', None, 'Change MetaTracker preferences', self.on_preferences), - ('About', gtk.STOCK_ABOUT, '_About...', None, 'About MetaTracker', self.on_about)] + ('About', gtk.STOCK_ABOUT, '_About...', None, 'About MetaTracker', self.on_about), + ('Quit', gtk.STOCK_QUIT, '_Quit...', None, 'Quit Status Applet', gtk.main_quit)] ag = gtk.ActionGroup('Actions') ag.add_actions(actions) self.manager = gtk.UIManager() @@ -41,20 +45,22 @@ class TrackerStatusIcon(gtk.StatusIcon): self.connect('popup-menu', self.on_popup_menu) def on_activate(self, data): - os.spawnlpe(os.P_NOWAIT, 'tracker-search-tool', os.environ) + tst="tracker-search-tool" + os.spawnlp (os.P_NOWAIT, tst, tst) def on_popup_menu(self, status, button, time): self.menu.popup(None, None, None, button, time) def on_preferences(self, data): - os.spawnlpe(os.P_NOWAIT, 'tracker-preferences',os.environ) + tp="tracker-preferences" + os.spawnlp (os.P_NOWAIT, tp, tp) def on_about(self, data): dialog = gtk.AboutDialog() dialog.set_name('MetaTracker') dialog.set_version('0.6.0') dialog.set_comments('A desktop indexing and search tool') - dialog.set_website('www.freedesktop.org/Tracker') + dialog.set_website('http://www.tracker-project.org/') dialog.set_logo(gtk.gdk.pixbuf_new_from_file_at_size('applet.svg', 64, 64)) dialog.run() dialog.destroy()