From 6438cb01213969d42ba97ede543c7484f4e8dc53 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 22 Jan 2008 00:41:05 +0000 Subject: [PATCH] fix edit trackers to be async --- deluge/ui/gtkui/edittrackersdialog.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/deluge/ui/gtkui/edittrackersdialog.py b/deluge/ui/gtkui/edittrackersdialog.py index 0784e21f9..e7babaef2 100644 --- a/deluge/ui/gtkui/edittrackersdialog.py +++ b/deluge/ui/gtkui/edittrackersdialog.py @@ -86,12 +86,19 @@ class EditTrackersDialog: return # Get the trackers for this torrent - trackers = client.get_torrent_status(self.torrent_id, ["trackers"]) - for tracker in trackers["trackers"]: + + client.get_torrent_status(self._on_get_torrent_status, self.torrent_id,\ + ["trackers"]) + + def _on_get_torrent_status(self, status): + """Display trackers dialog""" + for tracker in status["trackers"]: self.add_tracker(tracker["tier"], tracker["url"]) self.dialog.show() - + + + def add_tracker(self, tier, url): """Adds a tracker to the list""" self.liststore.append([tier, url])