From 2f1cfd8546c07dbaadae904ea5679fef6adcf57d Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 29 Jun 2007 05:09:37 +0000 Subject: [PATCH] Fix download/upload tray menu speed list --- src/interface.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/interface.py b/src/interface.py index 96d0de098..60554dd6c 100644 --- a/src/interface.py +++ b/src/interface.py @@ -220,7 +220,7 @@ class DelugeGTK: menuitem = gtk.RadioMenuItem(group, str(value)) group = menuitem - + if value == pref_value and pref_value != None: menuitem.set_active(True) @@ -728,16 +728,15 @@ class DelugeGTK: # We need to prepend this value and remove the last value in the list self.config.get("tray_downloadspeedlist").insert(0, self.config.get("max_download_rate")) self.config.get("tray_downloadspeedlist").pop() - # Re-build the sub-menu to display new option - self.build_tray_bwsetsubmenu() + # Do the same for the upload speed limits if self.config.get("max_upload_rate") not in self.config.get("tray_uploadspeedlist") and self.config.get("max_upload_rate") >= 0: # We need to prepend this value and remove the last value in the list self.config.get("tray_uploadspeedlist").insert(0, self.config.get("max_upload_rate")) self.config.get("tray_uploadspeedlist").pop() - # Re-build the sub-menu to display new option - self.build_tray_bwsetsubmenu() - + + # Re-build the tray sub-menu to display the correct active radio item + self.build_tray_bwsetsubmenu() # Apply the preferences in the core self.manager.apply_prefs()