From 23ec87724eee67d3b11e93b85b66273c1b3fa729 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 14 Apr 2009 21:50:58 +0000 Subject: [PATCH] add the bandwidth page --- deluge/ui/web/js/deluge-preferences.js | 101 +++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 6 deletions(-) diff --git a/deluge/ui/web/js/deluge-preferences.js b/deluge/ui/web/js/deluge-preferences.js index f878cee00..015157d33 100644 --- a/deluge/ui/web/js/deluge-preferences.js +++ b/deluge/ui/web/js/deluge-preferences.js @@ -25,8 +25,8 @@ Copyright: PreferencesWindow = function(config) { Ext.apply(this, config); this.layout = 'border'; - this.width = 475; - this.height = 450; + this.width = 485; + this.height = 500; this.buttonAlign = 'right'; this.closeAction = 'hide'; this.closable = true; @@ -179,13 +179,102 @@ Copyright: xtype: 'form', layout: 'form', items: [] - }); + });*/ Deluge.Preferences.addPage(_('Bandwidth'), { border: false, xtype: 'form', layout: 'form', - items: [] - });*/ + labelWidth: 10, + items: [{ + xtype: 'fieldset', + border: false, + title: _('Global Bandwidth Usage'), + autoHeight: true, + labelWidth: 200, + style: 'margin-bottom: 0px; padding-bottom: 0px;', + defaultType: 'uxspinner', + items: [{ + name: 'max_connections', + fieldLabel: _('Maximum Connections'), + width: 60, + value: -1 + }, { + name: 'max_upload_slots', + fieldLabel: _('Maximum Upload Slots'), + width: 60, + value: -1 + }, { + name: 'max_download_speed', + fieldLabel: _('Maximum Download Speed (KiB/s)'), + width: 60, + value: -1 + }, { + name: 'max_upload_speed', + fieldLabel: _('Maximum Upload Speed (KiB/s)'), + width: 60, + value: -1 + }, { + name: 'max_half_open_connections', + fieldLabel: _('Maximum Half-Open Connections'), + width: 60, + value: -1 + }, { + name: 'max_connections_per_second', + fieldLabel: _('Maximum Connection Attempts per Second'), + width: 60, + value: -1 + }] + }, { + xtype: 'fieldset', + border: false, + title: '', + autoHeight: true, + style: 'padding-top: 0px; margin-top: 0px; margin-bottom: 0px;', + items: [{ + xtype: 'checkbox', + name: 'ignore_local', + fieldLabel: '', + labelSeparator: '', + boxLabel: _('Ignore limits on local network'), + value: -1 + }, { + xtype: 'checkbox', + name: 'limit_ip_overhead', + fieldLabel: '', + labelSeparator: '', + boxLabel: _('Rate limit IP overhead'), + value: -1 + }] + }, { + xtype: 'fieldset', + border: false, + title: _('Per Torrent Bandwidth Usage'), + autoHeight: true, + labelWidth: 200, + defaultType: 'uxspinner', + items: [{ + name: 'max_connections_per_torrent', + fieldLabel: _('Maximum Connections'), + width: 60, + value: -1 + }, { + name: 'max_upload_slots_per_torrent', + fieldLabel: _('Maximum Upload Slots'), + width: 60, + value: -1 + }, { + name: 'max_download_speed_per_torrent', + fieldLabel: _('Maximum Download Speed (KiB/s)'), + width: 60, + value: -1 + }, { + name: 'max_upload_speed_per_torrent', + fieldLabel: _('Maximum Upload Speed (KiB/s)'), + width: 60, + value: -1 + }] + }] + }); Deluge.Preferences.addPage(_('Interface'), { border: false, xtype: 'form', @@ -213,7 +302,7 @@ Copyright: xtype: 'checkbox', fieldLabel: '', labelSeparator: '', - boxLabel: _('Hide filters with 0 torrents'), + boxLabel: _('Hide filters with zero torrents'), id: 'hide_sidebar_zero' }] }, {