mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-16 06:17:50 +00:00
use external browser always for active port test
This commit is contained in:
parent
659c1c5f34
commit
dacebd2eec
@ -153,10 +153,10 @@ def get_logo(size):
|
|||||||
return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), \
|
return gtk.gdk.pixbuf_new_from_file_at_size(get_pixmap("deluge.svg"), \
|
||||||
size, size)
|
size, size)
|
||||||
|
|
||||||
def open_url_in_browser(link):
|
def open_url_in_browser(link, force_ext=None):
|
||||||
import pref
|
import pref
|
||||||
config = pref.Preferences(os.path.join(os.path.expanduser("~"), 'deluge', "prefs.state"))
|
config = pref.Preferences(os.path.join(os.path.expanduser("~"), 'deluge', "prefs.state"))
|
||||||
if config.get("use_internal"):
|
if config.get("use_internal") and not force_ext:
|
||||||
import browser
|
import browser
|
||||||
browser.Browser(link)
|
browser.Browser(link)
|
||||||
else:
|
else:
|
||||||
@ -195,6 +195,13 @@ def exec_command(executable, *parameters):
|
|||||||
import os
|
import os
|
||||||
command = [executable]
|
command = [executable]
|
||||||
command.extend(parameters)
|
command.extend(parameters)
|
||||||
|
if windows_check():
|
||||||
|
try:
|
||||||
|
from subprocess import Popen
|
||||||
|
Popen(command)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
os.WEXITSTATUS(os.system(command[0] + " \"%s\"" %command[1]))
|
os.WEXITSTATUS(os.system(command[0] + " \"%s\"" %command[1]))
|
||||||
except OSError:
|
except OSError:
|
||||||
|
@ -334,7 +334,7 @@ class PreferencesDlg:
|
|||||||
self.plugins.configure_plugin(plugin_name, self.dialog)
|
self.plugins.configure_plugin(plugin_name, self.dialog)
|
||||||
|
|
||||||
def TestPort(self, widget):
|
def TestPort(self, widget):
|
||||||
common.open_url_in_browser('http://www.deluge-torrent.org/test-port.php?port=%s' % self.active_port)
|
common.open_url_in_browser('http://www.deluge-torrent.org/test-port.php?port=%s' % self.active_port, "force_ext")
|
||||||
|
|
||||||
def toggle_ui(self, widget):
|
def toggle_ui(self, widget):
|
||||||
value = widget.get_active()
|
value = widget.get_active()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user