From da24fafa8527338cd8d641400c15e2f09224d9b6 Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Thu, 15 Feb 2007 00:53:21 +0000 Subject: [PATCH] fix search plugin --- plugins/TorrentSearch/plugin.py | 2 ++ src/dcommon.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/TorrentSearch/plugin.py b/plugins/TorrentSearch/plugin.py index 53c76c78d..3fdc923b6 100644 --- a/plugins/TorrentSearch/plugin.py +++ b/plugins/TorrentSearch/plugin.py @@ -116,6 +116,7 @@ class plugin_Search: pass def torrent_search(self, widget=None): + import dcommon print "Searching with engine", self.se url = self.engines.get(self.se) entry = self.search_entry.get_text() @@ -127,6 +128,7 @@ class plugin_Search: url = url.replace('${query}', entry) print 'URL =', url print 'Entry =', entry + dcommon.open_url_in_browser(url) def populate_search_menu(self): import gtk diff --git a/src/dcommon.py b/src/dcommon.py index dde02228c..440bf5908 100644 --- a/src/dcommon.py +++ b/src/dcommon.py @@ -155,7 +155,7 @@ def get_glade_file(fname): def get_pixmap(fname): return PIXMAP_DIR + "/" + fname -def open_url_in_browser(dialog, link): +def open_url_in_browser(link): try: webbrowser.open(link) except webbrowser.Error: