check dht value on start() and dont get_dht_nodes() when dht is off
This commit is contained in:
parent
8806704043
commit
c3061576f3
@ -141,9 +141,10 @@ class StatusBar(component.Component):
|
|||||||
self.hbox.pack_start(
|
self.hbox.pack_start(
|
||||||
self.upload_item.get_eventbox(), expand=False, fill=False)
|
self.upload_item.get_eventbox(), expand=False, fill=False)
|
||||||
self.dht_item = StatusBarItem(
|
self.dht_item = StatusBarItem(
|
||||||
image=deluge.common.get_pixmap("dht16.png"))
|
image=deluge.common.get_pixmap("dht16.png"))
|
||||||
self.hbox.pack_start(
|
if client.get_config("dht"):
|
||||||
self.dht_item.get_eventbox(), expand=False, fill=False)
|
self.hbox.pack_start(
|
||||||
|
self.dht_item.get_eventbox(), expand=False, fill=False)
|
||||||
|
|
||||||
# Get some config values
|
# Get some config values
|
||||||
client.get_config_value(
|
client.get_config_value(
|
||||||
@ -152,6 +153,8 @@ class StatusBar(component.Component):
|
|||||||
self._on_max_download_speed, "max_download_speed")
|
self._on_max_download_speed, "max_download_speed")
|
||||||
client.get_config_value(
|
client.get_config_value(
|
||||||
self._on_max_upload_speed, "max_upload_speed")
|
self._on_max_upload_speed, "max_upload_speed")
|
||||||
|
client.get_config_value(
|
||||||
|
self._on_dht, "dht")
|
||||||
|
|
||||||
self.send_status_request()
|
self.send_status_request()
|
||||||
|
|
||||||
@ -276,7 +279,8 @@ class StatusBar(component.Component):
|
|||||||
def update(self):
|
def update(self):
|
||||||
# Update the labels
|
# Update the labels
|
||||||
self.update_connections_label()
|
self.update_connections_label()
|
||||||
self.update_dht_label()
|
if self.dht_nodes != False:
|
||||||
|
self.update_dht_label()
|
||||||
self.update_download_label()
|
self.update_download_label()
|
||||||
self.update_upload_label()
|
self.update_upload_label()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user