mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 09:58:39 +00:00
breaks off browser calls so the client doesnt hang
This commit is contained in:
parent
27d5db228a
commit
ad8e685743
1 changed files with 8 additions and 4 deletions
|
@ -31,6 +31,7 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
import threading
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import xdg
|
import xdg
|
||||||
import xdg.BaseDirectory
|
import xdg.BaseDirectory
|
||||||
|
@ -118,10 +119,13 @@ def get_pixmap(fname):
|
||||||
return os.path.join(PIXMAP_DIR, fname)
|
return os.path.join(PIXMAP_DIR, fname)
|
||||||
|
|
||||||
def open_url_in_browser(dialog, link):
|
def open_url_in_browser(dialog, link):
|
||||||
try:
|
class LaunchBrowser(threading.Thread):
|
||||||
webbrowser.open(link)
|
def run(self):
|
||||||
except webbrowser.Error:
|
try:
|
||||||
print _("Error: no webbrowser found")
|
webbrowser.open(link)
|
||||||
|
except webbrowser.Error:
|
||||||
|
print _("Error: no webbrowser found")
|
||||||
|
LaunchBrowser().start()
|
||||||
|
|
||||||
# Encryption States
|
# Encryption States
|
||||||
class EncState:
|
class EncState:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue