mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 01:48:40 +00:00
fix download rate setting
This commit is contained in:
parent
85d3c16c6d
commit
41c4669149
1 changed files with 6 additions and 6 deletions
|
@ -189,9 +189,9 @@ class DelugeGTK:
|
||||||
for value in sorted(self.config.get("tray_downloadspeedlist")):
|
for value in sorted(self.config.get("tray_downloadspeedlist")):
|
||||||
subitem = gtk.RadioMenuItem(group, str(value) + " " + _("KiB/s"))
|
subitem = gtk.RadioMenuItem(group, str(value) + " " + _("KiB/s"))
|
||||||
group = subitem
|
group = subitem
|
||||||
self.submenu_bwdownset.append(subitem)
|
|
||||||
if value == self.config.get("max_download_rate"):
|
if value == self.config.get("max_download_rate"):
|
||||||
subitem.set_active(True)
|
subitem.set_active(True)
|
||||||
|
self.submenu_bwdownset.append(subitem)
|
||||||
subitem.connect("toggled", self.tray_setbwdown)
|
subitem.connect("toggled", self.tray_setbwdown)
|
||||||
|
|
||||||
subitem = gtk.RadioMenuItem(group, _("Unlimited"))
|
subitem = gtk.RadioMenuItem(group, _("Unlimited"))
|
||||||
|
@ -234,7 +234,7 @@ class DelugeGTK:
|
||||||
self.submenu_bwupset.show_all()
|
self.submenu_bwupset.show_all()
|
||||||
|
|
||||||
def tray_setbwdown(self, widget, data=None):
|
def tray_setbwdown(self, widget, data=None):
|
||||||
str_bwdown = widget.get_children()[0].get_text().rstrip(" "+_("KiB/s"))
|
str_bwdown = widget.get_children()[0].get_text().rstrip(" "+_("KiB/s"))
|
||||||
if str_bwdown == _("Unlimited"):
|
if str_bwdown == _("Unlimited"):
|
||||||
str_bwdown = -1
|
str_bwdown = -1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue