From 2bece0e03d29e91daafdf059edc53d6947406170 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 7 Aug 2009 07:33:35 +0000 Subject: [PATCH] add everything aside from encryption to the network preferences --- .../ui/web/js/Deluge.Preferences.Network.js | 114 +++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/deluge/ui/web/js/Deluge.Preferences.Network.js b/deluge/ui/web/js/Deluge.Preferences.Network.js index e3157e067..396a916f4 100644 --- a/deluge/ui/web/js/Deluge.Preferences.Network.js +++ b/deluge/ui/web/js/Deluge.Preferences.Network.js @@ -19,7 +19,7 @@ Ext.deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, { xtype: 'fieldset', border: false, title: _('Incoming Ports'), - style: 'margin-bottom: 0px; padding-bottom: 0px;', + style: 'margin-bottom: 5px; padding-bottom: 0px;', autoHeight: true, labelWidth: 1, defaultType: 'checkbox' @@ -73,6 +73,7 @@ Ext.deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, { xtype: 'fieldset', border: false, title: _('Outgoing Ports'), + style: 'margin-bottom: 5px; padding-bottom: 0px;', autoHeight: true, labelWidth: 1, defaultType: 'checkbox' @@ -119,6 +120,117 @@ Ext.deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, { }] }); optMan.bind('outgoing_ports', this.outgoingPorts); + + fieldset = this.add({ + xtype: 'fieldset', + border: false, + title: _('Network Interface'), + style: 'margin-bottom: 5px; padding-bottom: 0px;', + autoHeight: true, + labelWidth: 1, + defaultType: 'textfield' + }); + optMan.bind('listen_interface', fieldset.add({ + name: 'listen_interface', + fieldLabel: '', + labelSeparator: '', + width: 200 + })); + + fieldset = this.add({ + xtype: 'fieldset', + border: false, + title: _('TOS'), + style: 'margin-bottom: 5px; padding-bottom: 0px;', + bodyStyle: 'margin: 0px; padding: 0px', + autoHeight: true, + defaultType: 'textfield' + }); + optMan.bind('peer_tos', fieldset.add({ + name: 'peer_tos', + fieldLabel: _('Peer TOS Byte'), + width: 80 + })); + + fieldset = this.add({ + xtype: 'fieldset', + border: false, + title: _('Network Extras'), + autoHeight: true, + layout: 'table', + layoutConfig: { + columns: 3 + }, + defaultType: 'checkbox' + }); + optMan.bind('upnp', fieldset.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('UPnP'), + name: 'upnp' + })); + optMan.bind('natpmp', fieldset.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('NAT-PMP'), + ctCls: 'x-deluge-indent-checkbox', + name: 'natpmp' + })); + optMan.bind('utpex', fieldset.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('Peer Exchange'), + ctCls: 'x-deluge-indent-checkbox', + name: 'utpex' + })); + optMan.bind('lsd', fieldset.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('LSD'), + name: 'lsd' + })); + optMan.bind('dht', fieldset.add({ + fieldLabel: '', + labelSeparator: '', + boxLabel: _('DHT'), + ctCls: 'x-deluge-indent-checkbox', + name: 'dht' + })); + + /*fieldset = this.add({ + xtype: 'fieldset', + border: false, + title: _('Encryption'), + autoHeight: true, + layout: 'column', + defaultType: 'panel', + defaults: { + border: false, + layout: 'form', + defaultType: 'combo' + } + }); + + var column = fieldset.add({ + + }); + optMan.bind('enc_in_policy', column.add({ + fieldLabel: _('Inbound'), + mode: 'local', + store: [ + [0, _('Forced')], + [1, _('Enabled')], + [2, _('Disabled')] + ], + //new Ext.data.SimpleStore({ + // fields: ['id', 'text'], + // data: + //}), + width: 100, + //forceSelection: true, + //valueField: 'id', + //displayField: 'text' + }));*/ } }); Deluge.Preferences.addPage(new Ext.deluge.preferences.Network()); \ No newline at end of file