mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-01 11:30:43 +00:00
store the other menu item when we encounter it looping over for later
This commit is contained in:
parent
7c5dacba5f
commit
183064f857
@ -251,6 +251,7 @@ Deluge.StatusbarMenu = Ext.extend(Ext.menu.Menu, {
|
|||||||
// set the new value
|
// set the new value
|
||||||
value = (value == 0) ? -1 : value;
|
value = (value == 0) ? -1 : value;
|
||||||
|
|
||||||
|
var other = null;
|
||||||
// uncheck all items
|
// uncheck all items
|
||||||
this.items.each(function(item) {
|
this.items.each(function(item) {
|
||||||
if (item.setChecked) {
|
if (item.setChecked) {
|
||||||
@ -263,14 +264,15 @@ Deluge.StatusbarMenu = Ext.extend(Ext.menu.Menu, {
|
|||||||
}
|
}
|
||||||
item.resumeEvents();
|
item.resumeEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.value == 'other') other = item;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (beenSet) return;
|
if (beenSet) return;
|
||||||
|
|
||||||
var item = this.items.get('other');
|
other.suspendEvents();
|
||||||
item.suspendEvents();
|
other.setChecked(true);
|
||||||
item.setChecked(true);
|
other.resumeEvents();
|
||||||
item.resumeEvents();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user