fix the quick limits menus
fix displaying speeds with limits
This commit is contained in:
parent
dd866f07de
commit
51555cab83
|
@ -34,7 +34,7 @@ Copyright:
|
|||
|
||||
deluge.menus = {
|
||||
onTorrentAction: function(item, e) {
|
||||
var selection = Deluge.Torrents.getSelections();
|
||||
var selection = deluge.torrents.getSelections();
|
||||
var ids = [];
|
||||
Ext.each(selection, function(record) {
|
||||
ids.push(record.id);
|
||||
|
@ -451,9 +451,9 @@ function onLimitChanged(item, checked) {
|
|||
} else {
|
||||
config = {}
|
||||
config[item.group] = item.value
|
||||
Deluge.Client.core.set_config(config, {
|
||||
deluge.client.core.set_config(config, {
|
||||
success: function() {
|
||||
Deluge.UI.update();
|
||||
deluge.ui.update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -92,8 +92,8 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
|||
var updateStat = function(name, config) {
|
||||
var item = this.items.get('statusbar-' + name);
|
||||
if (config.limit.value > 0) {
|
||||
var value = (config.value.formatter) ? config.value.formatter(config.value.value) : config.value.value;
|
||||
var limit = (config.limit.formatter) ? config.limit.formatter(config.limit.value) : config.limit.value;
|
||||
var value = (config.value.formatter) ? config.value.formatter(config.value.value, true) : config.value.value;
|
||||
var limit = (config.limit.formatter) ? config.limit.formatter(config.limit.value, true) : config.limit.value;
|
||||
var str = String.format(config.format, value, limit);
|
||||
} else {
|
||||
var str = (config.value.formatter) ? config.value.formatter(config.value.value, true) : config.value.value;
|
||||
|
|
Loading…
Reference in New Issue