fix the quick limits menus

fix displaying speeds with limits
This commit is contained in:
Damien Churchill 2010-03-18 23:01:42 +00:00
parent dd866f07de
commit 51555cab83
2 changed files with 5 additions and 5 deletions

View File

@ -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();
}
});
}

View File

@ -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;