From 5e66a28e889ffb90e6b889069cd20f7af709d8b8 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 29 Jan 2008 08:51:46 +0000 Subject: [PATCH] check dht status in start() and dont get dht nodes when dht is off --- deluge/ui/gtkui/statusbar.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deluge/ui/gtkui/statusbar.py b/deluge/ui/gtkui/statusbar.py index efa2d1fdc..e0853bca6 100644 --- a/deluge/ui/gtkui/statusbar.py +++ b/deluge/ui/gtkui/statusbar.py @@ -142,9 +142,6 @@ class StatusBar(component.Component): self.upload_item.get_eventbox(), expand=False, fill=False) self.dht_item = StatusBarItem( image=deluge.common.get_pixmap("dht16.png")) - if client.get_config("dht"): - self.hbox.pack_start( - self.dht_item.get_eventbox(), expand=False, fill=False) # Get some config values client.get_config_value( @@ -197,6 +194,7 @@ class StatusBar(component.Component): def send_status_request(self): # Sends an async request for data from the core client.get_num_connections(self._on_get_num_connections) + client.get_config_value(self._on_dht, "dht") client.get_dht_nodes(self._on_get_dht_nodes) client.get_download_rate(self._on_get_download_rate) client.get_upload_rate(self._on_get_upload_rate) @@ -225,7 +223,6 @@ class StatusBar(component.Component): self.hbox.pack_start( self.dht_item.get_eventbox(), expand=False, fill=False) - def _on_max_download_speed(self, max_download_speed): self.max_download_speed = max_download_speed self.update_download_label()