fix search plugin

This commit is contained in:
Zach Tibbitts 2007-02-15 00:53:21 +00:00
parent 725ca07a25
commit da24fafa85
2 changed files with 3 additions and 1 deletions

View File

@ -116,6 +116,7 @@ class plugin_Search:
pass pass
def torrent_search(self, widget=None): def torrent_search(self, widget=None):
import dcommon
print "Searching with engine", self.se print "Searching with engine", self.se
url = self.engines.get(self.se) url = self.engines.get(self.se)
entry = self.search_entry.get_text() entry = self.search_entry.get_text()
@ -127,6 +128,7 @@ class plugin_Search:
url = url.replace('${query}', entry) url = url.replace('${query}', entry)
print 'URL =', url print 'URL =', url
print 'Entry =', entry print 'Entry =', entry
dcommon.open_url_in_browser(url)
def populate_search_menu(self): def populate_search_menu(self):
import gtk import gtk

View File

@ -155,7 +155,7 @@ def get_glade_file(fname):
def get_pixmap(fname): def get_pixmap(fname):
return PIXMAP_DIR + "/" + fname return PIXMAP_DIR + "/" + fname
def open_url_in_browser(dialog, link): def open_url_in_browser(link):
try: try:
webbrowser.open(link) webbrowser.open(link)
except webbrowser.Error: except webbrowser.Error: