~cmiller/ubuntu/quantal/deluge/fix-parameter-move-storage

« back to all changes in this revision

Viewing changes to deluge/ui/web/js/Deluge.Preferences.Daemon.js

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-11-13 02:39:45 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091113023945-te1bybo2912ejzuc
Tags: 1.2.0~rc3-4
* debian/control: bump build-dep on python-setuptools to (>= 0.6c9).
* debian/patches:
  - 25_r5921_fastresume_files.patch
    new, should fix problems with fresh configs;
  - 30_r5931_ipc_lockfile.patch:
    new, should fix an issue where Deluge will fail to start if there is a
    stale ipc lockfile. (Closes: #555849)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Script: Deluge.Preferences.Daemon.js
 
3
    The daemon preferences page.
 
4
 
 
5
Copyright:
 
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)
 
10
        any later version.
 
11
 
 
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.
 
16
 
 
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.
 
22
 
 
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
 
25
    library.
 
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.
 
32
*/
 
33
 
 
34
Ext.namespace('Ext.deluge.preferences');
 
35
Ext.deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
 
36
        constructor: function(config) {
 
37
                config = Ext.apply({
 
38
                        border: false,
 
39
                        title: _('Daemon'),
 
40
                        layout: 'form'
 
41
                }, config);
 
42
                Ext.deluge.preferences.Daemon.superclass.constructor.call(this, config);
 
43
        },
 
44
        
 
45
        initComponent: function() {
 
46
                Ext.deluge.preferences.Daemon.superclass.initComponent.call(this);
 
47
 
 
48
                var optMan = Deluge.Preferences.getOptionsManager();
 
49
                
 
50
                var fieldset = this.add({
 
51
                        xtype: 'fieldset',
 
52
                        border: false,
 
53
                        title: _('Port'),
 
54
                        autoHeight: true,
 
55
                        defaultType: 'uxspinner'
 
56
                });
 
57
                optMan.bind('daemon_port', fieldset.add({
 
58
                        fieldLabel: _('Daemon port'),
 
59
                        name: 'daemon_port',
 
60
                        value: 58846,
 
61
                        strategy: {
 
62
                                xtype: 'number',
 
63
                                decimalPrecision: 0,
 
64
                                minValue: -1,
 
65
                                maxValue: 99999
 
66
                        },
 
67
                }));
 
68
                
 
69
                fieldset = this.add({
 
70
                        xtype: 'fieldset',
 
71
                        border: false,
 
72
                        title: _('Connections'),
 
73
                        autoHeight: true,
 
74
                        labelWidth: 1,
 
75
                        defaultType: 'checkbox'
 
76
                });
 
77
                optMan.bind('allow_remote', fieldset.add({
 
78
                        fieldLabel: '',
 
79
                        labelSeparator: '',
 
80
                        boxLabel: _('Allow Remote Connections'),
 
81
                        name: 'allow_remote'
 
82
                }));
 
83
                
 
84
                fieldset = this.add({
 
85
                        xtype: 'fieldset',
 
86
                        border: false,
 
87
                        title: _('Other'),
 
88
                        autoHeight: true,
 
89
                        labelWidth: 1,
 
90
                        defaultType: 'checkbox'
 
91
                });
 
92
                optMan.bind('new_release_check', fieldset.add({
 
93
                        fieldLabel: '',
 
94
                        labelSeparator: '',
 
95
                        height: 40,
 
96
                        boxLabel: _('Periodically check the website for new releases'),
 
97
                        id: 'new_release_check'
 
98
                }));
 
99
        }
 
100
});
 
101
Deluge.Preferences.addPage(new Ext.deluge.preferences.Daemon());
 
 
b'\\ No newline at end of file'