Add 'max_upload_rate' and 'max_download_rate' to tray tooltip.
Will now display 'Unlimited' if the max is -1
This commit is contained in:
parent
8454c4b416
commit
a132c6a038
|
@ -836,8 +836,14 @@ class DelugeGTK:
|
||||||
connections = core_state['num_peers']
|
connections = core_state['num_peers']
|
||||||
dlrate = common.frate(core_state['download_rate'])
|
dlrate = common.frate(core_state['download_rate'])
|
||||||
ulrate = common.frate(core_state['upload_rate'])
|
ulrate = common.frate(core_state['upload_rate'])
|
||||||
dlrate_max = common.frate(self.config.get("max_download_rate_bps"))
|
if self.config.get("max_download_rate") < 0:
|
||||||
ulrate_max = common.frate(self.config.get("max_upload_rate_bps"))
|
dlrate_max = _("Unlimited")
|
||||||
|
else:
|
||||||
|
dlrate_max = common.frate(self.config.get("max_download_rate_bps"))
|
||||||
|
if self.config.get("max_upload_rate") < 0:
|
||||||
|
ulrate_max = _("Unlimited")
|
||||||
|
else:
|
||||||
|
ulrate_max = common.frate(self.config.get("max_upload_rate_bps"))
|
||||||
|
|
||||||
self.statusbar_temp_msg = '%s: %s %s: %s (%s) %s: %s (%s)'%(
|
self.statusbar_temp_msg = '%s: %s %s: %s (%s) %s: %s (%s)'%(
|
||||||
_('Connections'), connections, _('Download'),
|
_('Connections'), connections, _('Download'),
|
||||||
|
@ -853,7 +859,7 @@ class DelugeGTK:
|
||||||
|
|
||||||
msg = _("Deluge Bittorrent Client") + "\n" + \
|
msg = _("Deluge Bittorrent Client") + "\n" + \
|
||||||
_("Connections") + ": " + str(connections) + "\n" + _("Download") + ": " + \
|
_("Connections") + ": " + str(connections) + "\n" + _("Download") + ": " + \
|
||||||
dlrate + "\n" + _("Upload") + ": " + ulrate
|
dlrate + " (" + dlrate_max + ")" + "\n" + _("Upload") + ": " + ulrate + " (" + ulrate_max + ")"
|
||||||
|
|
||||||
self.tray_icon.set_tooltip(msg)
|
self.tray_icon.set_tooltip(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue