2
2
Script: Deluge.Preferences.Downloads.js
3
The downloads preferences page.
3
The downloads preferences page.
6
(C) Damien Churchill 2009 <damoxc@gmail.com>
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 3, or (at your option)
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, write to:
19
The Free Software Foundation, Inc.,
20
51 Franklin Street, Fifth Floor
21
Boston, MA 02110-1301, USA.
23
In addition, as a special exception, the copyright holders give
24
permission to link the code of portions of this program with the OpenSSL
26
You must obey the GNU General Public License in all respects for all of
27
the code used other than OpenSSL. If you modify file(s) with this
28
exception, you may extend this exception to your version of the file(s),
29
but you are not obligated to do so. If you do not wish to do so, delete
30
this exception statement from your version. If you delete this exception
31
statement from all source files in the program, then also delete it here.
6
(C) Damien Churchill 2009 <damoxc@gmail.com>
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 3, or (at your option)
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, write to:
19
The Free Software Foundation, Inc.,
20
51 Franklin Street, Fifth Floor
21
Boston, MA 02110-1301, USA.
23
In addition, as a special exception, the copyright holders give
24
permission to link the code of portions of this program with the OpenSSL
26
You must obey the GNU General Public License in all respects for all of
27
the code used other than OpenSSL. If you modify file(s) with this
28
exception, you may extend this exception to your version of the file(s),
29
but you are not obligated to do so. If you do not wish to do so, delete
30
this exception statement from your version. If you delete this exception
31
statement from all source files in the program, then also delete it here.
34
34
Ext.namespace('Ext.deluge.preferences');
35
35
Ext.deluge.preferences.Downloads = Ext.extend(Ext.FormPanel, {
36
constructor: function(config) {
39
title: _('Downloads'),
43
Ext.deluge.preferences.Downloads.superclass.constructor.call(this, config);
46
initComponent: function() {
47
Ext.deluge.preferences.Downloads.superclass.initComponent.call(this);
49
var optMan = Deluge.Preferences.getOptionsManager();
50
var fieldset = this.add({
55
defaultType: 'textfield',
59
style: 'margin-bottom: 5px; padding-bottom: 5px;'
61
optMan.bind('download_location', fieldset.add({
62
name: 'download_location',
63
fieldLabel: _('Download to'),
66
optMan.bind('move_completed_path', fieldset.add({
67
name: 'move_completed_path',
68
fieldLabel: _('Move completed to'),
72
optMan.bind('torrentfiles_location', fieldset.add({
73
name: 'torrentfiles_location',
74
fieldLabel: _('Copy of .torrent files to'),
78
optMan.bind('autoadd_location', fieldset.add({
79
name: 'autoadd_location',
80
fieldLabel: _('Autoadd .torrent files from'),
88
title: _('Allocation'),
91
defaultType: 'radiogroup',
92
style: 'margin-bottom: 5px; padding-bottom: 5px;',
95
optMan.bind('compact_allocation', fieldset.add({
96
name: 'compact_allocation',
99
{boxLabel: _('Compact') + ' ', inputValue: true, name: 'compact_allocation'},
100
{boxLabel: _('Full'), inputValue: false, name: 'compact_allocation'}
104
fieldset = this.add({
110
defaultType: 'checkbox',
113
optMan.bind('prioritize_first_last_pieces', fieldset.add({
114
name: 'prioritize_first_last_pieces',
116
boxLabel: _('Prioritize first and last pieces of torrent')
118
optMan.bind('add_paused', fieldset.add({
121
boxLabel: _('Add torrents in Paused state')
124
this.on('show', this.onShow, this);
128
Ext.deluge.preferences.Downloads.superclass.onShow.call(this);
36
constructor: function(config) {
39
title: _('Downloads'),
44
Ext.deluge.preferences.Downloads.superclass.constructor.call(this, config);
47
initComponent: function() {
48
Ext.deluge.preferences.Downloads.superclass.initComponent.call(this);
50
var optMan = Deluge.Preferences.getOptionsManager();
51
var fieldset = this.add({
56
defaultType: 'togglefield',
60
style: 'margin-bottom: 5px; padding-bottom: 5px;'
63
optMan.bind('download_location', fieldset.add({
65
name: 'download_location',
66
fieldLabel: _('Download to'),
70
var field = fieldset.add({
71
name: 'move_completed_path',
72
fieldLabel: _('Move completed to'),
75
optMan.bind('move_completed', field.toggle);
76
optMan.bind('move_completed_path', field.input);
78
field = fieldset.add({
79
name: 'torrentfiles_location',
80
fieldLabel: _('Copy of .torrent files to'),
83
optMan.bind('copy_torrent_file', field.toggle);
84
optMan.bind('torrentfiles_location', field.input);
86
field = fieldset.add({
87
name: 'autoadd_location',
88
fieldLabel: _('Autoadd .torrent files from'),
91
optMan.bind('autoadd_enable', field.toggle);
92
optMan.bind('autoadd_location', field.input);
97
title: _('Allocation'),
100
defaultType: 'radiogroup',
101
style: 'margin-bottom: 5px; margin-top: 0; padding-bottom: 5px; padding-top: 0;',
104
optMan.bind('compact_allocation', fieldset.add({
105
name: 'compact_allocation',
111
name: 'compact_allocation'
114
boxLabel: _('Use Full'),
117
boxLabel: _('Use Compact'),
122
fieldset = this.add({
128
defaultType: 'checkbox',
129
style: 'margin-bottom: 0; padding-bottom: 0;',
132
optMan.bind('prioritize_first_last_pieces', fieldset.add({
133
name: 'prioritize_first_last_pieces',
136
boxLabel: _('Prioritize first and last pieces of torrent')
138
optMan.bind('add_paused', fieldset.add({
142
boxLabel: _('Add torrents in Paused state')
145
this.on('show', this.onShow, this);
149
Ext.deluge.preferences.Downloads.superclass.onShow.call(this);
131
Deluge.Preferences.addPage(new Ext.deluge.preferences.Downloads());
b'\\ No newline at end of file'
152
Deluge.Preferences.addPage(new Ext.deluge.preferences.Downloads());