summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2013-02-17 15:00:27 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2013-02-17 15:00:27 +0000
commit72b58d19c1f88e8c8b4a345021f4baaf337d368b (patch)
treec00dc3b18701fa8a46db1993278da30a7cd3c2ec
parentbbf17772acb7b46c201698bca1391299ff99a13e (diff)
downloaddeluge-72b58d19c1f88e8c8b4a345021f4baaf337d368b.tar.gz
deluge-72b58d19c1f88e8c8b4a345021f4baaf337d368b.tar.bz2
deluge-72b58d19c1f88e8c8b4a345021f4baaf337d368b.zip
Build webui js and gettext
-rw-r--r--deluge/ui/web/gettext.js33
-rw-r--r--deluge/ui/web/js/deluge-all-debug.js53
-rw-r--r--deluge/ui/web/js/deluge-all.js8
3 files changed, 61 insertions, 33 deletions
diff --git a/deluge/ui/web/gettext.js b/deluge/ui/web/gettext.js
index 59bc3ff7a..0ff128609 100644
--- a/deluge/ui/web/gettext.js
+++ b/deluge/ui/web/gettext.js
@@ -86,7 +86,7 @@ GetText.add('Add', '${escape(_("Add"))}')
// AddConnectionWindow.js:40
GetText.add('Add Connection', '${escape(_("Add Connection"))}')
-// OptionsTab.js:144
+// OptionsTab.js:161
GetText.add('Add In Paused State', '${escape(_("Add In Paused State"))}')
// AddWindow.js:37
@@ -110,7 +110,7 @@ GetText.add('Added', '${escape(_("Added"))}')
// FilterPanel.js:124
GetText.add('All', '${escape(_("All"))}')
-// OptionsTab.js:77, DownloadsPage.js:100
+// OptionsTab.js:94, DownloadsPage.js:100
GetText.add('Allocation', '${escape(_("Allocation"))}')
// DaemonPage.js:77
@@ -134,7 +134,7 @@ GetText.add('Avail', '${escape(_("Avail"))}')
// FileBrowser.js:47
GetText.add('Back', '${escape(_("Back"))}')
-// OptionsTab.js:88, OptionsTab.js:107, BandwidthPage.js:42
+// OptionsTab.js:88, OptionsTab.js:124, BandwidthPage.js:42
GetText.add('Bandwidth', '${escape(_("Bandwidth"))}')
// OtherPage.js:66
@@ -176,7 +176,7 @@ GetText.add('Close', '${escape(_("Close"))}')
// DetailsTab.js:51
GetText.add('Comment', '${escape(_("Comment"))}')
-// OptionsTab.js:100
+// OptionsTab.js:117
GetText.add('Compact', '${escape(_("Compact"))}')
// InterfacePage.js:105
@@ -341,13 +341,13 @@ GetText.add('Forward', '${escape(_("Forward"))}')
// Statusbar.js:216
GetText.add('Freespace in download location', '${escape(_("Freespace in download location"))}')
-// OptionsTab.js:93
+// OptionsTab.js:110
GetText.add('Full', '${escape(_("Full"))}')
// EncryptionPage.js:98
GetText.add('Full Stream', '${escape(_("Full Stream"))}')
-// OptionsTab.js:293, OptionsTab.js:137, QueuePage.js:52
+// OptionsTab.js:293, OptionsTab.js:154, QueuePage.js:52
GetText.add('General', '${escape(_("General"))}')
// OtherPage.js:97
@@ -380,7 +380,7 @@ GetText.add('Highest Priority', '${escape(_("Highest Priority"))}')
// FileBrowser.js:56
GetText.add('Home', '${escape(_("Home"))}')
-// ConnectionManager.js:74, AddConnectionWindow.js:66, ProxyField.js:71
+// ConnectionManager.js:74, AddConnectionWindow.js:66, ProxyField.js:74
GetText.add('Host', '${escape(_("Host"))}')
// BandwidthPage.js:122
@@ -437,19 +437,19 @@ GetText.add('Login Failed', '${escape(_("Login Failed"))}')
// Toolbar.js:114
GetText.add('Logout', '${escape(_("Logout"))}')
-// OptionsTab.js:150, OptionsTab.js:126
+// OptionsTab.js:150, OptionsTab.js:143
GetText.add('Max Connections', '${escape(_("Max Connections"))}')
-// OptionsTab.js:116
+// OptionsTab.js:133
GetText.add('Max Down Speed', '${escape(_("Max Down Speed"))}')
// OptionsTab.js:97
GetText.add('Max Download Speed', '${escape(_("Max Download Speed"))}')
-// OptionsTab.js:121
+// OptionsTab.js:138
GetText.add('Max Up Speed', '${escape(_("Max Up Speed"))}')
-// OptionsTab.js:173, OptionsTab.js:131
+// OptionsTab.js:173, OptionsTab.js:148
GetText.add('Max Upload Slots', '${escape(_("Max Upload Slots"))}')
// OptionsTab.js:123
@@ -479,6 +479,9 @@ GetText.add('Move', '${escape(_("Move"))}')
// OptionsTab.js:262
GetText.add('Move Completed', '${escape(_("Move Completed"))}')
+// OptionsTab.js:72
+GetText.add('Move Completed Location', '${escape(_("Move Completed Location"))}')
+
// Menus.js:242, MoveStorage.js:38
GetText.add('Move Storage', '${escape(_("Move Storage"))}')
@@ -536,7 +539,7 @@ GetText.add('Outbound', '${escape(_("Outbound"))}')
// NetworkPage.js:104
GetText.add('Outgoing Ports', '${escape(_("Outgoing Ports"))}')
-// AddConnectionWindow.js:88, LoginWindow.js:70, ProxyField.js:95, InterfacePage.js:84, InterfacePage.js:214
+// AddConnectionWindow.js:88, LoginWindow.js:70, ProxyField.js:101, InterfacePage.js:84, InterfacePage.js:214
GetText.add('Password', '${escape(_("Password"))}')
// DetailsTab.js:48
@@ -572,7 +575,7 @@ GetText.add('Plugin Egg', '${escape(_("Plugin Egg"))}')
// PluginsPage.js:41
GetText.add('Plugins', '${escape(_("Plugins"))}')
-// AddConnectionWindow.js:72, ProxyField.js:78, DaemonPage.js:52, InterfacePage.js:147
+// AddConnectionWindow.js:72, ProxyField.js:82, DaemonPage.js:52, InterfacePage.js:147
GetText.add('Port', '${escape(_("Port"))}')
// Toolbar.js:94, PreferencesWindow.js:47
@@ -581,7 +584,7 @@ GetText.add('Preferences', '${escape(_("Preferences"))}')
// OptionsTab.js:308
GetText.add('Prioritize First/Last', '${escape(_("Prioritize First/Last"))}')
-// OptionsTab.js:150
+// OptionsTab.js:167
GetText.add('Prioritize First/Last Pieces', '${escape(_("Prioritize First/Last Pieces"))}')
// DownloadsPage.js:140
@@ -809,7 +812,7 @@ GetText.add('Use Random Ports', '${escape(_("Use Random Ports"))}')
// InterfacePage.js:158
GetText.add('Use SSL (paths relative to Deluge config folder)', '${escape(_("Use SSL (paths relative to Deluge config folder)"))}')
-// AddConnectionWindow.js:83, ProxyField.js:88
+// AddConnectionWindow.js:83, ProxyField.js:93
GetText.add('Username', '${escape(_("Username"))}')
// ConnectionManager.js:80
diff --git a/deluge/ui/web/js/deluge-all-debug.js b/deluge/ui/web/js/deluge-all-debug.js
index 199f1a966..40e776cfe 100644
--- a/deluge/ui/web/js/deluge-all-debug.js
+++ b/deluge/ui/web/js/deluge-all-debug.js
@@ -1993,7 +1993,7 @@ Deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, {
region: 'south',
margins: '5 5 5 5',
activeTab: 0,
- height: 220,
+ height: 265,
initComponent: function() {
Deluge.add.OptionsPanel.superclass.initComponent.call(this);
@@ -2184,13 +2184,30 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
fieldLabel: '',
style: 'padding-bottom: 5px; margin-bottom: 0px;'
});
-
- this.optionsManager.bind('download_location', fieldset.add({
- fieldLabel: '',
- name: 'download_location',
- width: 400,
- labelSeparator: ''
- }));
+ this.optionsManager.bind('download_location', fieldset.add({
+ fieldLabel: '',
+ name: 'download_location',
+ width: 400,
+ labelSeparator: ''
+ }));
+
+ var fieldset = this.add({
+ xtype: 'fieldset',
+ title: _('Move Completed Location'),
+ border: false,
+ autoHeight: true,
+ defaultType: 'togglefield',
+ labelWidth: 1,
+ fieldLabel: '',
+ style: 'padding-bottom: 5px; margin-bottom: 0px;'
+ });
+ var field = fieldset.add({
+ fieldLabel: '',
+ name: 'move_completed_path',
+ width: 425
+ });
+ this.optionsManager.bind('move_completed', field.toggle)
+ this.optionsManager.bind('move_completed_path', field.input)
var panel = this.add({
border: false,
@@ -2201,7 +2218,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
title: _('Allocation'),
border: false,
autoHeight: true,
- defaultType: 'radio',
+ defaultType: 'radio'
});
this.optionsManager.bind('compact_allocation', fieldset.add({
@@ -2280,6 +2297,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
getDefaults: function() {
var keys = ['add_paused','compact_allocation','download_location',
'max_connections_per_torrent','max_download_speed_per_torrent',
+ 'move_completed', 'move_completed_path',
'max_upload_slots_per_torrent','max_upload_speed_per_torrent',
'prioritize_first_last_pieces'];
@@ -2290,6 +2308,8 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
'add_paused': config.add_paused,
'compact_allocation': config.compact_allocation,
'download_location': config.download_location,
+ 'move_completed': config.move_completed,
+ 'move_completed_path': config.move_completed_path,
'max_connections': config.max_connections_per_torrent,
'max_download_speed': config.max_download_speed_per_torrent,
'max_upload_slots': config.max_upload_slots_per_torrent,
@@ -4266,7 +4286,7 @@ Deluge.preferences.PreferencesWindow = Ext.extend(Ext.Window, {
});
/*!
* Deluge.preferences.ProxyField.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -4324,19 +4344,23 @@ Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
[3, _('Socksv5 with Auth')],
[4, _('HTTP')],
[5, _('HTTP with Auth')]
- ]
- }),
+ ]
+ }),
editable: false,
triggerAction: 'all',
valueField: 'id',
displayField: 'text'
});
+ this.proxyType.on('change', this.onFieldChange, this);
+ this.proxyType.on('select', this.onTypeSelect, this);
+
this.hostname = this.add({
xtype: 'textfield',
name: 'hostname',
fieldLabel: _('Host'),
width: 220
});
+ this.hostname.on('change', this.onFieldChange, this);
this.port = this.add({
xtype: 'spinnerfield',
@@ -4347,6 +4371,7 @@ Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
minValue: -1,
maxValue: 99999
});
+ this.port.on('change', this.onFieldChange, this);
this.username = this.add({
xtype: 'textfield',
@@ -4354,6 +4379,7 @@ Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
fieldLabel: _('Username'),
width: 220
});
+ this.username.on('change', this.onFieldChange, this);
this.password = this.add({
xtype: 'textfield',
@@ -4362,9 +4388,8 @@ Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
inputType: 'password',
width: 220
});
+ this.password.on('change', this.onFieldChange, this);
- this.proxyType.on('change', this.onFieldChange, this);
- this.proxyType.on('select', this.onTypeSelect, this);
this.setting = false;
},
diff --git a/deluge/ui/web/js/deluge-all.js b/deluge/ui/web/js/deluge-all.js
index a414632e5..70608bf45 100644
--- a/deluge/ui/web/js/deluge-all.js
+++ b/deluge/ui/web/js/deluge-all.js
@@ -445,7 +445,7 @@ Ext.namespace("Ext.deluge.add");
* this exception statement from your version. If you delete this exception
* statement from all source files in the program, then also delete it here.
*/
-Ext.ns("Deluge.add");Deluge.add.OptionsPanel=Ext.extend(Ext.TabPanel,{torrents:{},region:"south",margins:"5 5 5 5",activeTab:0,height:220,initComponent:function(){Deluge.add.OptionsPanel.superclass.initComponent.call(this);this.files=this.add(new Deluge.add.FilesTab());this.form=this.add(new Deluge.add.OptionsTab());this.files.on("fileschecked",this.onFilesChecked,this)},addTorrent:function(c){this.torrents[c.info_hash]=c;var b={};this.walkFileTree(c.files_tree,function(e,g,h,f){if(g!="file"){return}b[h.index]=h.download},this);var a=[];Ext.each(Ext.keys(b),function(e){a[e]=b[e]});var d=this.form.optionsManager.changeId(c.info_hash,true);this.form.optionsManager.setDefault("file_priorities",a);this.form.optionsManager.changeId(d,true)},clear:function(){this.files.clearFiles();this.form.optionsManager.resetAll()},getFilename:function(a){return this.torrents[a]["filename"]},getOptions:function(a){var c=this.form.optionsManager.changeId(a,true);var b=this.form.optionsManager.get();this.form.optionsManager.changeId(c,true);Ext.each(b.file_priorities,function(e,d){b.file_priorities[d]=(e)?1:0});return b},setTorrent:function(b){if(!b){return}this.torrentId=b;this.form.optionsManager.changeId(b);this.files.clearFiles();var a=this.files.getRootNode();var c=this.form.optionsManager.get("file_priorities");this.form.setDisabled(false);if(this.torrents[b]["files_tree"]){this.walkFileTree(this.torrents[b]["files_tree"],function(e,f,h,d){var g=new Ext.tree.TreeNode({download:(h.index)?c[h.index]:true,filename:e,fileindex:h.index,leaf:f!="dir",size:h.length});d.appendChild(g);if(f=="dir"){return g}},this,a);a.firstChild.expand();this.files.setDisabled(false);this.files.show()}else{this.form.show();this.files.setDisabled(true)}},walkFileTree:function(g,h,e,a){for(var b in g.contents){var f=g.contents[b];var d=f.type;if(e){var c=h.apply(e,[b,d,f,a])}else{var c=h(b,d,f,a)}if(d=="dir"){this.walkFileTree(f,h,e,c)}}},onFilesChecked:function(a,c,b){if(this.form.optionsManager.get("compact_allocation")){Ext.Msg.show({title:_("Unable to set file priority!"),msg:_("File prioritization is unavailable when using Compact allocation. Would you like to switch to Full allocation?"),buttons:Ext.Msg.YESNO,fn:function(d){if(d=="yes"){this.form.optionsManager.update("compact_allocation",false);Ext.each(a,function(f){if(f.attributes.fileindex<0){return}var e=this.form.optionsManager.get("file_priorities");e[f.attributes.fileindex]=c;this.form.optionsManager.update("file_priorities",e)},this)}else{this.files.setDownload(a[0],b,true)}},scope:this,icon:Ext.MessageBox.QUESTION})}else{Ext.each(a,function(e){if(e.attributes.fileindex<0){return}var d=this.form.optionsManager.get("file_priorities");d[e.attributes.fileindex]=c;this.form.optionsManager.update("file_priorities",d)},this)}}});
+Ext.ns("Deluge.add");Deluge.add.OptionsPanel=Ext.extend(Ext.TabPanel,{torrents:{},region:"south",margins:"5 5 5 5",activeTab:0,height:265,initComponent:function(){Deluge.add.OptionsPanel.superclass.initComponent.call(this);this.files=this.add(new Deluge.add.FilesTab());this.form=this.add(new Deluge.add.OptionsTab());this.files.on("fileschecked",this.onFilesChecked,this)},addTorrent:function(c){this.torrents[c.info_hash]=c;var b={};this.walkFileTree(c.files_tree,function(e,g,h,f){if(g!="file"){return}b[h.index]=h.download},this);var a=[];Ext.each(Ext.keys(b),function(e){a[e]=b[e]});var d=this.form.optionsManager.changeId(c.info_hash,true);this.form.optionsManager.setDefault("file_priorities",a);this.form.optionsManager.changeId(d,true)},clear:function(){this.files.clearFiles();this.form.optionsManager.resetAll()},getFilename:function(a){return this.torrents[a]["filename"]},getOptions:function(a){var c=this.form.optionsManager.changeId(a,true);var b=this.form.optionsManager.get();this.form.optionsManager.changeId(c,true);Ext.each(b.file_priorities,function(e,d){b.file_priorities[d]=(e)?1:0});return b},setTorrent:function(b){if(!b){return}this.torrentId=b;this.form.optionsManager.changeId(b);this.files.clearFiles();var a=this.files.getRootNode();var c=this.form.optionsManager.get("file_priorities");this.form.setDisabled(false);if(this.torrents[b]["files_tree"]){this.walkFileTree(this.torrents[b]["files_tree"],function(e,f,h,d){var g=new Ext.tree.TreeNode({download:(h.index)?c[h.index]:true,filename:e,fileindex:h.index,leaf:f!="dir",size:h.length});d.appendChild(g);if(f=="dir"){return g}},this,a);a.firstChild.expand();this.files.setDisabled(false);this.files.show()}else{this.form.show();this.files.setDisabled(true)}},walkFileTree:function(g,h,e,a){for(var b in g.contents){var f=g.contents[b];var d=f.type;if(e){var c=h.apply(e,[b,d,f,a])}else{var c=h(b,d,f,a)}if(d=="dir"){this.walkFileTree(f,h,e,c)}}},onFilesChecked:function(a,c,b){if(this.form.optionsManager.get("compact_allocation")){Ext.Msg.show({title:_("Unable to set file priority!"),msg:_("File prioritization is unavailable when using Compact allocation. Would you like to switch to Full allocation?"),buttons:Ext.Msg.YESNO,fn:function(d){if(d=="yes"){this.form.optionsManager.update("compact_allocation",false);Ext.each(a,function(f){if(f.attributes.fileindex<0){return}var e=this.form.optionsManager.get("file_priorities");e[f.attributes.fileindex]=c;this.form.optionsManager.update("file_priorities",e)},this)}else{this.files.setDownload(a[0],b,true)}},scope:this,icon:Ext.MessageBox.QUESTION})}else{Ext.each(a,function(e){if(e.attributes.fileindex<0){return}var d=this.form.optionsManager.get("file_priorities");d[e.attributes.fileindex]=c;this.form.optionsManager.update("file_priorities",d)},this)}}});
/*
* Deluge.add.OptionsPanel.js
*
@@ -477,7 +477,7 @@ Ext.ns("Deluge.add");Deluge.add.OptionsPanel=Ext.extend(Ext.TabPanel,{torrents:{
* this exception statement from your version. If you delete this exception
* statement from all source files in the program, then also delete it here.
*/
-Ext.ns("Deluge.add");Deluge.add.OptionsTab=Ext.extend(Ext.form.FormPanel,{title:_("Options"),height:170,border:false,bodyStyle:"padding: 5px",disabled:true,labelWidth:1,initComponent:function(){Deluge.add.OptionsTab.superclass.initComponent.call(this);this.optionsManager=new Deluge.MultiOptionsManager();var a=this.add({xtype:"fieldset",title:_("Download Location"),border:false,autoHeight:true,defaultType:"textfield",labelWidth:1,fieldLabel:"",style:"padding-bottom: 5px; margin-bottom: 0px;"});this.optionsManager.bind("download_location",a.add({fieldLabel:"",name:"download_location",width:400,labelSeparator:""}));var b=this.add({border:false,layout:"column",defaultType:"fieldset"});a=b.add({title:_("Allocation"),border:false,autoHeight:true,defaultType:"radio",});this.optionsManager.bind("compact_allocation",a.add({xtype:"radiogroup",columns:1,vertical:true,labelSeparator:"",width:80,items:[{name:"compact_allocation",value:false,inputValue:false,boxLabel:_("Full"),fieldLabel:"",labelSeparator:""},{name:"compact_allocation",value:true,inputValue:true,boxLabel:_("Compact"),fieldLabel:"",labelSeparator:""}]}));a=b.add({title:_("Bandwidth"),border:false,autoHeight:true,bodyStyle:"margin-left: 7px",labelWidth:105,width:200,defaultType:"spinnerfield"});this.optionsManager.bind("max_download_speed",a.add({fieldLabel:_("Max Down Speed"),name:"max_download_speed",width:60}));this.optionsManager.bind("max_upload_speed",a.add({fieldLabel:_("Max Up Speed"),name:"max_upload_speed",width:60}));this.optionsManager.bind("max_connections",a.add({fieldLabel:_("Max Connections"),name:"max_connections",width:60}));this.optionsManager.bind("max_upload_slots",a.add({fieldLabel:_("Max Upload Slots"),name:"max_upload_slots",width:60}));a=b.add({title:_("General"),border:false,autoHeight:true,defaultType:"checkbox"});this.optionsManager.bind("add_paused",a.add({name:"add_paused",boxLabel:_("Add In Paused State"),fieldLabel:"",labelSeparator:""}));this.optionsManager.bind("prioritize_first_last_pieces",a.add({name:"prioritize_first_last_pieces",boxLabel:_("Prioritize First/Last Pieces"),fieldLabel:"",labelSeparator:""}))},getDefaults:function(){var a=["add_paused","compact_allocation","download_location","max_connections_per_torrent","max_download_speed_per_torrent","max_upload_slots_per_torrent","max_upload_speed_per_torrent","prioritize_first_last_pieces"];deluge.client.core.get_config_values(a,{success:function(c){var b={file_priorities:[],add_paused:c.add_paused,compact_allocation:c.compact_allocation,download_location:c.download_location,max_connections:c.max_connections_per_torrent,max_download_speed:c.max_download_speed_per_torrent,max_upload_slots:c.max_upload_slots_per_torrent,max_upload_speed:c.max_upload_speed_per_torrent,prioritize_first_last_pieces:c.prioritize_first_last_pieces};this.optionsManager.options=b;this.optionsManager.resetAll()},scope:this})}});
+Ext.ns("Deluge.add");Deluge.add.OptionsTab=Ext.extend(Ext.form.FormPanel,{title:_("Options"),height:170,border:false,bodyStyle:"padding: 5px",disabled:true,labelWidth:1,initComponent:function(){Deluge.add.OptionsTab.superclass.initComponent.call(this);this.optionsManager=new Deluge.MultiOptionsManager();var a=this.add({xtype:"fieldset",title:_("Download Location"),border:false,autoHeight:true,defaultType:"textfield",labelWidth:1,fieldLabel:"",style:"padding-bottom: 5px; margin-bottom: 0px;"});this.optionsManager.bind("download_location",a.add({fieldLabel:"",name:"download_location",width:400,labelSeparator:""}));var a=this.add({xtype:"fieldset",title:_("Move Completed Location"),border:false,autoHeight:true,defaultType:"togglefield",labelWidth:1,fieldLabel:"",style:"padding-bottom: 5px; margin-bottom: 0px;"});var c=a.add({fieldLabel:"",name:"move_completed_path",width:425});this.optionsManager.bind("move_completed",c.toggle);this.optionsManager.bind("move_completed_path",c.input);var b=this.add({border:false,layout:"column",defaultType:"fieldset"});a=b.add({title:_("Allocation"),border:false,autoHeight:true,defaultType:"radio"});this.optionsManager.bind("compact_allocation",a.add({xtype:"radiogroup",columns:1,vertical:true,labelSeparator:"",width:80,items:[{name:"compact_allocation",value:false,inputValue:false,boxLabel:_("Full"),fieldLabel:"",labelSeparator:""},{name:"compact_allocation",value:true,inputValue:true,boxLabel:_("Compact"),fieldLabel:"",labelSeparator:""}]}));a=b.add({title:_("Bandwidth"),border:false,autoHeight:true,bodyStyle:"margin-left: 7px",labelWidth:105,width:200,defaultType:"spinnerfield"});this.optionsManager.bind("max_download_speed",a.add({fieldLabel:_("Max Down Speed"),name:"max_download_speed",width:60}));this.optionsManager.bind("max_upload_speed",a.add({fieldLabel:_("Max Up Speed"),name:"max_upload_speed",width:60}));this.optionsManager.bind("max_connections",a.add({fieldLabel:_("Max Connections"),name:"max_connections",width:60}));this.optionsManager.bind("max_upload_slots",a.add({fieldLabel:_("Max Upload Slots"),name:"max_upload_slots",width:60}));a=b.add({title:_("General"),border:false,autoHeight:true,defaultType:"checkbox"});this.optionsManager.bind("add_paused",a.add({name:"add_paused",boxLabel:_("Add In Paused State"),fieldLabel:"",labelSeparator:""}));this.optionsManager.bind("prioritize_first_last_pieces",a.add({name:"prioritize_first_last_pieces",boxLabel:_("Prioritize First/Last Pieces"),fieldLabel:"",labelSeparator:""}))},getDefaults:function(){var a=["add_paused","compact_allocation","download_location","max_connections_per_torrent","max_download_speed_per_torrent","move_completed","move_completed_path","max_upload_slots_per_torrent","max_upload_speed_per_torrent","prioritize_first_last_pieces"];deluge.client.core.get_config_values(a,{success:function(c){var b={file_priorities:[],add_paused:c.add_paused,compact_allocation:c.compact_allocation,download_location:c.download_location,move_completed:c.move_completed,move_completed_path:c.move_completed_path,max_connections:c.max_connections_per_torrent,max_download_speed:c.max_download_speed_per_torrent,max_upload_slots:c.max_upload_slots_per_torrent,max_upload_speed:c.max_upload_speed_per_torrent,prioritize_first_last_pieces:c.prioritize_first_last_pieces};this.optionsManager.options=b;this.optionsManager.resetAll()},scope:this})}});
/*
* Deluge.add.UrlWindow.js
*
@@ -864,7 +864,7 @@ Ext.namespace("Deluge.preferences");Deluge.preferences.Plugins=Ext.extend(Ext.Pa
Ext.namespace("Deluge.preferences");PreferencesRecord=Ext.data.Record.create([{name:"name",type:"string"}]);Deluge.preferences.PreferencesWindow=Ext.extend(Ext.Window,{currentPage:null,title:_("Preferences"),layout:"border",width:485,height:500,buttonAlign:"right",closeAction:"hide",closable:true,iconCls:"x-deluge-preferences",plain:true,resizable:false,pages:{},initComponent:function(){Deluge.preferences.PreferencesWindow.superclass.initComponent.call(this);this.list=new Ext.list.ListView({store:new Ext.data.Store(),columns:[{id:"name",renderer:fplain,dataIndex:"name"}],singleSelect:true,listeners:{selectionchange:{fn:this.onPageSelect,scope:this}},hideHeaders:true,autoExpandColumn:"name",deferredRender:false,autoScroll:true,collapsible:true});this.add({region:"west",title:_("Categories"),items:[this.list],width:120,margins:"5 0 5 5",cmargins:"5 0 5 5"});this.configPanel=this.add({type:"container",autoDestroy:false,region:"center",layout:"card",layoutConfig:{deferredRender:true},autoScroll:true,width:300,margins:"5 5 5 5",cmargins:"5 5 5 5"});this.addButton(_("Close"),this.onClose,this);this.addButton(_("Apply"),this.onApply,this);this.addButton(_("Ok"),this.onOk,this);this.optionsManager=new Deluge.OptionsManager();this.on("afterrender",this.onAfterRender,this);this.on("show",this.onShow,this);this.initPages()},initPages:function(){deluge.preferences=this;this.addPage(new Deluge.preferences.Downloads());this.addPage(new Deluge.preferences.Network());this.addPage(new Deluge.preferences.Encryption());this.addPage(new Deluge.preferences.Bandwidth());this.addPage(new Deluge.preferences.Interface());this.addPage(new Deluge.preferences.Other());this.addPage(new Deluge.preferences.Daemon());this.addPage(new Deluge.preferences.Queue());this.addPage(new Deluge.preferences.Proxy());this.addPage(new Deluge.preferences.Cache());this.addPage(new Deluge.preferences.Plugins())},onApply:function(b){var c=this.optionsManager.getDirty();if(!Ext.isObjectEmpty(c)){deluge.client.core.set_config(c,{success:this.onSetConfig,scope:this})}for(var a in this.pages){if(this.pages[a].onApply){this.pages[a].onApply()}}},getOptionsManager:function(){return this.optionsManager},addPage:function(c){var a=this.list.getStore();var b=c.title;a.add([new PreferencesRecord({name:b})]);c.bodyStyle="padding: 5px";c.preferences=this;this.pages[b]=this.configPanel.add(c);this.pages[b].index=-1;return this.pages[b]},removePage:function(c){var b=c.title;var a=this.list.getStore();a.removeAt(a.find("name",b));this.configPanel.remove(c);delete this.pages[c.title]},selectPage:function(a){if(this.pages[a].index<0){this.pages[a].index=this.configPanel.items.indexOf(this.pages[a])}this.list.select(this.pages[a].index)},doSelectPage:function(a){if(this.pages[a].index<0){this.pages[a].index=this.configPanel.items.indexOf(this.pages[a])}this.configPanel.getLayout().setActiveItem(this.pages[a].index);this.currentPage=a},onGotConfig:function(a){this.getOptionsManager().set(a)},onPageSelect:function(c,a){var b=c.getRecord(a[0]);this.doSelectPage(b.get("name"))},onSetConfig:function(){this.getOptionsManager().commit()},onAfterRender:function(){if(!this.list.getSelectionCount()){this.list.select(0)}this.configPanel.getLayout().setActiveItem(0)},onShow:function(){if(!deluge.client.core){return}deluge.client.core.get_config({success:this.onGotConfig,scope:this})},onClose:function(){this.hide()},onOk:function(){var b=this.optionsManager.getDirty();if(!Ext.isObjectEmpty(b)){deluge.client.core.set_config(b,{success:this.onSetConfig,scope:this})}for(var a in this.pages){if(this.pages[a].onOk){this.pages[a].onOk()}}this.hide()}});
/*
* Deluge.preferences.ProxyField.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -893,7 +893,7 @@ Ext.namespace("Deluge.preferences");PreferencesRecord=Ext.data.Record.create([{n
* this exception statement from your version. If you delete this exception
* statement from all source files in the program, then also delete it here.
*/
-Ext.ns("Deluge.preferences");Deluge.preferences.ProxyField=Ext.extend(Ext.form.FieldSet,{border:false,autoHeight:true,labelWidth:70,initComponent:function(){Deluge.preferences.ProxyField.superclass.initComponent.call(this);this.proxyType=this.add({xtype:"combo",fieldLabel:_("Type"),name:"proxytype",mode:"local",width:150,store:new Ext.data.ArrayStore({fields:["id","text"],data:[[0,_("None")],[1,_("Socksv4")],[2,_("Socksv5")],[3,_("Socksv5 with Auth")],[4,_("HTTP")],[5,_("HTTP with Auth")]]}),editable:false,triggerAction:"all",valueField:"id",displayField:"text"});this.hostname=this.add({xtype:"textfield",name:"hostname",fieldLabel:_("Host"),width:220});this.port=this.add({xtype:"spinnerfield",name:"port",fieldLabel:_("Port"),width:80,decimalPrecision:0,minValue:-1,maxValue:99999});this.username=this.add({xtype:"textfield",name:"username",fieldLabel:_("Username"),width:220});this.password=this.add({xtype:"textfield",name:"password",fieldLabel:_("Password"),inputType:"password",width:220});this.proxyType.on("change",this.onFieldChange,this);this.proxyType.on("select",this.onTypeSelect,this);this.setting=false},getName:function(){return this.initialConfig.name},getValue:function(){return{type:this.proxyType.getValue(),hostname:this.hostname.getValue(),port:Number(this.port.getValue()),username:this.username.getValue(),password:this.password.getValue()}},setValue:function(c){this.setting=true;this.proxyType.setValue(c.type);var b=this.proxyType.getStore().find("id",c.type);var a=this.proxyType.getStore().getAt(b);this.hostname.setValue(c.hostname);this.port.setValue(c.port);this.username.setValue(c.username);this.password.setValue(c.password);this.onTypeSelect(this.type,a,b);this.setting=false},onFieldChange:function(e,d,c){if(this.setting){return}var b=this.getValue();var a=Ext.apply({},b);a[e.getName()]=c;this.fireEvent("change",this,b,a)},onTypeSelect:function(d,a,b){var c=a.get("id");if(c>0){this.hostname.show();this.port.show()}else{this.hostname.hide();this.port.hide()}if(c==3||c==5){this.username.show();this.password.show()}else{this.username.hide();this.password.hide()}}});
+Ext.ns("Deluge.preferences");Deluge.preferences.ProxyField=Ext.extend(Ext.form.FieldSet,{border:false,autoHeight:true,labelWidth:70,initComponent:function(){Deluge.preferences.ProxyField.superclass.initComponent.call(this);this.proxyType=this.add({xtype:"combo",fieldLabel:_("Type"),name:"proxytype",mode:"local",width:150,store:new Ext.data.ArrayStore({fields:["id","text"],data:[[0,_("None")],[1,_("Socksv4")],[2,_("Socksv5")],[3,_("Socksv5 with Auth")],[4,_("HTTP")],[5,_("HTTP with Auth")]]}),editable:false,triggerAction:"all",valueField:"id",displayField:"text"});this.proxyType.on("change",this.onFieldChange,this);this.proxyType.on("select",this.onTypeSelect,this);this.hostname=this.add({xtype:"textfield",name:"hostname",fieldLabel:_("Host"),width:220});this.hostname.on("change",this.onFieldChange,this);this.port=this.add({xtype:"spinnerfield",name:"port",fieldLabel:_("Port"),width:80,decimalPrecision:0,minValue:-1,maxValue:99999});this.port.on("change",this.onFieldChange,this);this.username=this.add({xtype:"textfield",name:"username",fieldLabel:_("Username"),width:220});this.username.on("change",this.onFieldChange,this);this.password=this.add({xtype:"textfield",name:"password",fieldLabel:_("Password"),inputType:"password",width:220});this.password.on("change",this.onFieldChange,this);this.setting=false},getName:function(){return this.initialConfig.name},getValue:function(){return{type:this.proxyType.getValue(),hostname:this.hostname.getValue(),port:Number(this.port.getValue()),username:this.username.getValue(),password:this.password.getValue()}},setValue:function(c){this.setting=true;this.proxyType.setValue(c.type);var b=this.proxyType.getStore().find("id",c.type);var a=this.proxyType.getStore().getAt(b);this.hostname.setValue(c.hostname);this.port.setValue(c.port);this.username.setValue(c.username);this.password.setValue(c.password);this.onTypeSelect(this.type,a,b);this.setting=false},onFieldChange:function(e,d,c){if(this.setting){return}var b=this.getValue();var a=Ext.apply({},b);a[e.getName()]=c;this.fireEvent("change",this,b,a)},onTypeSelect:function(d,a,b){var c=a.get("id");if(c>0){this.hostname.show();this.port.show()}else{this.hostname.hide();this.port.hide()}if(c==3||c==5){this.username.show();this.password.show()}else{this.username.hide();this.password.hide()}}});
/*
* Deluge.preferences.ProxyPage.js
*