From 4366233fc80583d49fc1133d16a1f5a76f81ad7d Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 2 Jul 2008 23:39:28 +0000 Subject: [PATCH] Fix issue where connectionmanager continues to poll servers even when closed. This also fixes the issue where tooltips would disappear after a second or so. --- deluge/ui/gtkui/connectionmanager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index fdd4aec67..6052b447c 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -128,7 +128,9 @@ class ConnectionManager(component.Component): client.set_core_uri(uri) self.hide() return - + + # This controls the timer, if it's set to false the update timer will stop. + self._do_update = True self._update() # Auto connect to a host if applicable @@ -181,6 +183,7 @@ class ConnectionManager(component.Component): def hide(self): self.connection_manager.hide() + self._do_update = False try: gobject.source_remove(self._update_timer) except AttributeError: @@ -230,7 +233,7 @@ class ConnectionManager(component.Component): if self.liststore.iter_n_children(None) > 0: # Then select the first row self.hostlist.get_selection().select_iter(self.liststore.get_iter_first()) - return True + return self._do_update def update_buttons(self): """Updates the buttons based on selection"""