Fix 'auto_end_seeding' preference to actually be used by apply_queue()
Fixed some text in the Download/Upload speed system tray menu
This commit is contained in:
parent
b5ac3b880b
commit
3e2332ecd3
|
@ -447,7 +447,7 @@ class Manager:
|
||||||
# ___ALL queuing code should be in this function, and ONLY here___
|
# ___ALL queuing code should be in this function, and ONLY here___
|
||||||
def apply_queue(self, efficient = True):
|
def apply_queue(self, efficient = True):
|
||||||
# Handle autoseeding - downqueue as needed
|
# Handle autoseeding - downqueue as needed
|
||||||
if self.get_pref('auto_seed_ratio') > 0:
|
if self.get_pref('auto_seed_ratio') > 0 and self.get_pref('auto_end_seeding'):
|
||||||
for unique_ID in self.unique_IDs:
|
for unique_ID in self.unique_IDs:
|
||||||
if self.get_core_torrent_state(unique_ID, efficient)['is_seed']:
|
if self.get_core_torrent_state(unique_ID, efficient)['is_seed']:
|
||||||
torrent_state = self.get_core_torrent_state(unique_ID, efficient)
|
torrent_state = self.get_core_torrent_state(unique_ID, efficient)
|
||||||
|
|
|
@ -191,22 +191,22 @@ class DelugeGTK:
|
||||||
self.submenu_bwdownset = gtk.Menu()
|
self.submenu_bwdownset = gtk.Menu()
|
||||||
self.submenu_bwupset = gtk.Menu()
|
self.submenu_bwupset = gtk.Menu()
|
||||||
|
|
||||||
subitem_downtmp = gtk.MenuItem(_("unlimited"))
|
subitem_downtmp = gtk.MenuItem(_("Unlimited"))
|
||||||
self.submenu_bwdownset.append(subitem_downtmp)
|
self.submenu_bwdownset.append(subitem_downtmp)
|
||||||
self.submenu_bwdownset.append(gtk.SeparatorMenuItem())
|
self.submenu_bwdownset.append(gtk.SeparatorMenuItem())
|
||||||
subitem_downtmp.connect("activate", self.tray_setbwdown)
|
subitem_downtmp.connect("activate", self.tray_setbwdown)
|
||||||
|
|
||||||
subitem_uptmp = gtk.MenuItem(_("unlimited"))
|
subitem_uptmp = gtk.MenuItem(_("Unlimited"))
|
||||||
self.submenu_bwupset.append(subitem_uptmp)
|
self.submenu_bwupset.append(subitem_uptmp)
|
||||||
self.submenu_bwupset.append(gtk.SeparatorMenuItem())
|
self.submenu_bwupset.append(gtk.SeparatorMenuItem())
|
||||||
subitem_uptmp.connect("activate", self.tray_setbwup)
|
subitem_uptmp.connect("activate", self.tray_setbwup)
|
||||||
|
|
||||||
for i in self.config.get("tray_downloadspeedlist").split(","):
|
for i in self.config.get("tray_downloadspeedlist").split(","):
|
||||||
subitem_downtmp = gtk.MenuItem(i+" "+_("kiB/s"))
|
subitem_downtmp = gtk.MenuItem(i+" "+_("KiB/s"))
|
||||||
self.submenu_bwdownset.append(subitem_downtmp)
|
self.submenu_bwdownset.append(subitem_downtmp)
|
||||||
subitem_downtmp.connect("activate", self.tray_setbwdown)
|
subitem_downtmp.connect("activate", self.tray_setbwdown)
|
||||||
for i in self.config.get("tray_uploadspeedlist").split(","):
|
for i in self.config.get("tray_uploadspeedlist").split(","):
|
||||||
subitem_uptmp = gtk.MenuItem(i+" "+_("kiB/s"))
|
subitem_uptmp = gtk.MenuItem(i+" "+_("KiB/s"))
|
||||||
self.submenu_bwupset.append(subitem_uptmp)
|
self.submenu_bwupset.append(subitem_uptmp)
|
||||||
subitem_uptmp.connect("activate", self.tray_setbwup)
|
subitem_uptmp.connect("activate", self.tray_setbwup)
|
||||||
|
|
||||||
|
@ -217,16 +217,16 @@ 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"
|
||||||
|
|
||||||
self.config.set("max_download_rate", str_bwdown)
|
self.config.set("max_download_rate", str_bwdown)
|
||||||
self.apply_prefs()
|
self.apply_prefs()
|
||||||
|
|
||||||
def tray_setbwup(self, widget, data=None):
|
def tray_setbwup(self, widget, data=None):
|
||||||
str_bwup = widget.get_children()[0].get_text().rstrip(" "+_("kiB/s"))
|
str_bwup = widget.get_children()[0].get_text().rstrip(" "+_("KiB/s"))
|
||||||
if str_bwup == _("unlimited"):
|
if str_bwup == _("Unlimited"):
|
||||||
str_bwup = "-1"
|
str_bwup = "-1"
|
||||||
|
|
||||||
self.config.set("max_upload_rate", str_bwup)
|
self.config.set("max_upload_rate", str_bwup)
|
||||||
|
|
Loading…
Reference in New Issue