Module: deluge
Branch: master
Commit: 183064f85715cd21931f55607822881de1ea0a46

Author: Damien Churchill <[email protected]>
Date:   Tue Mar 30 14:31:36 2010 +0100

store the other menu item when we encounter it looping over for later

---

 deluge/ui/web/js/deluge-all/Menus.js |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/Menus.js 
b/deluge/ui/web/js/deluge-all/Menus.js
index 082204e..6951633 100644
--- a/deluge/ui/web/js/deluge-all/Menus.js
+++ b/deluge/ui/web/js/deluge-all/Menus.js
@@ -251,6 +251,7 @@ Deluge.StatusbarMenu = Ext.extend(Ext.menu.Menu, {
                // set the new value
                value = (value == 0) ? -1 : value;
 
+               var other = null;
                // uncheck all items
                this.items.each(function(item) {
                        if (item.setChecked) {
@@ -263,14 +264,15 @@ Deluge.StatusbarMenu = Ext.extend(Ext.menu.Menu, {
                                }
                                item.resumeEvents();
                        }
+
+                       if (item.value == 'other') other = item;
                });
 
                if (beenSet) return;
 
-               var item = this.items.get('other');
-               item.suspendEvents();
-               item.setChecked(true);
-               item.resumeEvents();
+               other.suspendEvents();
+               other.setChecked(true);
+               other.resumeEvents();
        }
 });
 

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to