diff --git a/src/common.py b/src/common.py index c847deaa3..9600600ed 100644 --- a/src/common.py +++ b/src/common.py @@ -29,8 +29,6 @@ # statement from all source files in the program, then also delete it here. import os.path -import threading -import webbrowser import xdg.BaseDirectory PROGRAM_NAME = "Deluge" @@ -114,13 +112,22 @@ def get_pixmap(fname): return os.path.join(PIXMAP_DIR, fname) def open_url_in_browser(link): - class LaunchBrowser(threading.Thread): - def run(self): - try: - webbrowser.open(link) - except webbrowser.Error: - print _("Error: no webbrowser found") - LaunchBrowser().start() + import webbrowser + + # why this method with causes up to 1 minutes delays when opening url in + # deluge ? when you run it from console - works instantly. maybe it has + # something to do with libtorrent's threads or with boost mt/nomt ? + + #import threading + #class LaunchBrowser(threading.Thread): + # def run(self): + # try: + # webbrowser.open(link) + # except webbrowser.Error: + # print _("Error: no webbrowser found") + #LaunchBrowser().start() + + webbrowser.open(link) def is_url(url): import re