From ad8e685743e3ee882d9642b01714081619dec666 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 13 Jul 2007 05:41:59 +0000 Subject: [PATCH] breaks off browser calls so the client doesnt hang --- src/common.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/common.py b/src/common.py index bf2a6f06a..7028682fe 100644 --- a/src/common.py +++ b/src/common.py @@ -31,6 +31,7 @@ import sys import os import os.path +import threading import webbrowser import xdg import xdg.BaseDirectory @@ -118,10 +119,13 @@ def get_pixmap(fname): return os.path.join(PIXMAP_DIR, fname) def open_url_in_browser(dialog, link): - try: - webbrowser.open(link) - except webbrowser.Error: - print _("Error: no webbrowser found") + class LaunchBrowser(threading.Thread): + def run(self): + try: + webbrowser.open(link) + except webbrowser.Error: + print _("Error: no webbrowser found") + LaunchBrowser().start() # Encryption States class EncState: