mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 23:48:40 +00:00
Fix exception on startup when the system tray icon is not enabled
This commit is contained in:
parent
2b3bd4f1f3
commit
789356d44d
1 changed files with 4 additions and 1 deletions
|
@ -165,7 +165,7 @@ class SystemTray(component.Component):
|
||||||
self.tray.set_tooltip(_("Deluge\nNot Connected.."))
|
self.tray.set_tooltip(_("Deluge\nNot Connected.."))
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self.config["enable_system_tray"]:
|
if self.config["enable_system_tray"]:
|
||||||
self.tray.set_visible(False)
|
self.tray.set_visible(False)
|
||||||
|
|
||||||
def send_status_request(self):
|
def send_status_request(self):
|
||||||
|
@ -196,6 +196,9 @@ class SystemTray(component.Component):
|
||||||
self.upload_rate = deluge.common.fsize(upload_rate)
|
self.upload_rate = deluge.common.fsize(upload_rate)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
if not self.config["enable_system_tray"]:
|
||||||
|
return
|
||||||
|
|
||||||
# Set the tool tip text
|
# Set the tool tip text
|
||||||
max_download_speed = self.max_download_speed
|
max_download_speed = self.max_download_speed
|
||||||
max_upload_speed = self.max_upload_speed
|
max_upload_speed = self.max_upload_speed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue