add everything aside from encryption to the network preferences

This commit is contained in:
Damien Churchill 2009-08-07 07:33:35 +00:00
parent 38aaea29a0
commit 2bece0e03d
1 changed files with 113 additions and 1 deletions

View File

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