add a new preferences page for encryption

This commit is contained in:
Damien Churchill 2009-08-12 00:42:48 +00:00
parent a207e1010b
commit 58c3b60ca7
3 changed files with 83 additions and 1 deletions

View File

@ -0,0 +1,81 @@
Ext.namespace('Ext.deluge.preferences');
Ext.deluge.preferences.Encryption = Ext.extend(Ext.form.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false,
title: _('Encryption'),
layout: 'form'
}, config);
Ext.deluge.preferences.Encryption.superclass.constructor.call(this, config);
},
initComponent: function() {
Ext.deluge.preferences.Encryption.superclass.initComponent.call(this);
var optMan = Deluge.Preferences.getOptionsManager();
var fieldset = this.add({
xtype: 'fieldset',
border: false,
title: _('Settings'),
autoHeight: true,
defaultType: 'combo'
});
optMan.bind('enc_in_policy', fieldset.add({
fieldLabel: _('Inbound'),
mode: 'local',
width: 150,
store: new Ext.data.SimpleStore({
fields: ['id', 'text'],
data: [
[0, _('Forced')],
[1, _('Enabled')],
[2, _('Disabled')]
]
}),
triggerAction: 'all',
valueField: 'id',
displayField: 'text'
}));
optMan.bind('enc_out_policy', fieldset.add({
fieldLabel: _('Outbound'),
mode: 'local',
width: 150,
store: new Ext.data.SimpleStore({
fields: ['id', 'text'],
data: [
[0, _('Forced')],
[1, _('Enabled')],
[2, _('Disabled')]
]
}),
triggerAction: 'all',
valueField: 'id',
displayField: 'text'
}));
optMan.bind('enc_level', fieldset.add({
fieldLabel: _('Level'),
mode: 'local',
width: 150,
store: new Ext.data.SimpleStore({
fields: ['id', 'text'],
data: [
[0, _('Handshake')],
[1, _('Full Stream')],
[2, _('Either')]
]
}),
triggerAction: 'all',
valueField: 'id',
displayField: 'text'
}));
optMan.bind('enc_prefer_rc4', fieldset.add({
xtype: 'checkbox',
name: 'enc_prefer_rc4',
height: 40,
hideLabel: true,
boxLabel: _('Encrypt entire stream')
}));
}
});
Deluge.Preferences.addPage(new Ext.deluge.preferences.Encryption());

View File

@ -1,4 +1,4 @@
DELUGE_FILES="Deluge.js Deluge.Formatters.js Deluge.Menus.js Deluge.Events.js Deluge.OptionsManager.js Deluge.MultiOptionsManager.js Deluge.Add.js Deluge.Add.File.js Deluge.Add.Url.js Deluge.Client.js Deluge.ConnectionManager.js Deluge.Details.js Deluge.Details.Status.js Deluge.Details.Details.js Deluge.Details.Files.js Deluge.Details.Peers.js Deluge.Details.Options.js Deluge.EditTrackers.js Deluge.Keys.js Deluge.Login.js Deluge.Preferences.js Deluge.Preferences.Downloads.js Deluge.Preferences.Network.js Deluge.Preferences.Bandwidth.js Deluge.Preferences.Interface.js Deluge.Preferences.Other.js Deluge.Preferences.Daemon.js Deluge.Preferences.Queue.js Deluge.Preferences.Proxy.js Deluge.Preferences.Notification.js Deluge.Preferences.Cache.js Deluge.Preferences.Plugins.js Deluge.Remove.js Deluge.Sidebar.js Deluge.Statusbar.js Deluge.Toolbar.js Deluge.Torrents.js Deluge.UI.js"
DELUGE_FILES="Deluge.js Deluge.Formatters.js Deluge.Menus.js Deluge.Events.js Deluge.OptionsManager.js Deluge.MultiOptionsManager.js Deluge.Add.js Deluge.Add.File.js Deluge.Add.Url.js Deluge.Client.js Deluge.ConnectionManager.js Deluge.Details.js Deluge.Details.Status.js Deluge.Details.Details.js Deluge.Details.Files.js Deluge.Details.Peers.js Deluge.Details.Options.js Deluge.EditTrackers.js Deluge.Keys.js Deluge.Login.js Deluge.Preferences.js Deluge.Preferences.Downloads.js Deluge.Preferences.Network.js Deluge.Preferences.Encryption.js Deluge.Preferences.Bandwidth.js Deluge.Preferences.Interface.js Deluge.Preferences.Other.js Deluge.Preferences.Daemon.js Deluge.Preferences.Queue.js Deluge.Preferences.Proxy.js Deluge.Preferences.Notification.js Deluge.Preferences.Cache.js Deluge.Preferences.Plugins.js Deluge.Remove.js Deluge.Sidebar.js Deluge.Statusbar.js Deluge.Toolbar.js Deluge.Torrents.js Deluge.UI.js"
ALL_FILES="ext-extensions-debug.js $DELUGE_FILES"
[ -e /usr/bin/jsdoc_toolkit ] && JSDOC="/usr/bin/jsdoc_toolkit"

View File

@ -301,6 +301,7 @@ class TopLevel(resource.Resource):
"/js/Deluge.Preferences.js",
"/js/Deluge.Preferences.Downloads.js",
"/js/Deluge.Preferences.Network.js",
"/js/Deluge.Preferences.Encryption.js",
"/js/Deluge.Preferences.Bandwidth.js",
"/js/Deluge.Preferences.Interface.js",
"/js/Deluge.Preferences.Other.js",