From 42e75fbcdd7772591b01f69b315697d4408fe0c9 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 10 Feb 2008 15:29:15 +0000 Subject: [PATCH] Fix test port button. --- deluge/ui/gtkui/preferences.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 6499ac5c1..1b24ba4b8 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -542,9 +542,11 @@ class Preferences(component.Component): def on_test_port_clicked(self, data): log.debug("on_test_port_clicked") - url = "http://deluge-torrent.org/test-port.php?port=%s" % \ - client.get_listen_port() - client.open_url_in_browser(url) + def on_get_listen_port(port): + deluge.common.open_url_in_browser( + "http://deluge-torrent.org/test-port.php?port=%s" % port) + client.get_listen_port(on_get_listen_port) + client.force_call() def on_plugin_toggled(self, renderer, path): log.debug("on_plugin_toggled")