fix the spinners on the various preference pages

This commit is contained in:
Damien Churchill 2010-04-30 22:06:32 +01:00
commit 5e78daf726
6 changed files with 128 additions and 227 deletions

View file

@ -49,87 +49,61 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
initComponent: function() { initComponent: function() {
Deluge.preferences.Bandwidth.superclass.initComponent.call(this); Deluge.preferences.Bandwidth.superclass.initComponent.call(this);
var optMan = deluge.preferences.getOptionsManager(); var om = deluge.preferences.getOptionsManager();
var fieldset = this.add({ var fieldset = this.add({
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Global Bandwidth Usage'), title: _('Global Bandwidth Usage'),
labelWidth: 200, labelWidth: 200,
defaultType: 'spinnerfield', defaultType: 'spinnerfield',
defaults: {
minValue: -1,
maxValue: 99999
},
style: 'margin-bottom: 0px; padding-bottom: 0px;', style: 'margin-bottom: 0px; padding-bottom: 0px;',
autoHeight: true autoHeight: true
}); });
optMan.bind('max_connections_global', fieldset.add({ om.bind('max_connections_global', fieldset.add({
name: 'max_connections_global', name: 'max_connections_global',
fieldLabel: _('Maximum Connections'), fieldLabel: _('Maximum Connections'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_upload_slots_global', fieldset.add({ om.bind('max_upload_slots_global', fieldset.add({
name: 'max_upload_slots_global', name: 'max_upload_slots_global',
fieldLabel: _('Maximum Upload Slots'), fieldLabel: _('Maximum Upload Slots'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_download_speed', fieldset.add({ om.bind('max_download_speed', fieldset.add({
name: 'max_download_speed', name: 'max_download_speed',
fieldLabel: _('Maximum Download Speed (KiB/s)'), fieldLabel: _('Maximum Download Speed (KiB/s)'),
width: 80, width: 80,
value: -1, value: -1.0,
strategy: { decimalPrecision: 1
xtype: 'number',
decimalPrecision: 1,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_upload_speed', fieldset.add({ om.bind('max_upload_speed', fieldset.add({
name: 'max_upload_speed', name: 'max_upload_speed',
fieldLabel: _('Maximum Upload Speed (KiB/s)'), fieldLabel: _('Maximum Upload Speed (KiB/s)'),
width: 80, width: 80,
value: -1, value: -1.0,
strategy: { decimalPrecision: 1
xtype: 'number',
decimalPrecision: 1,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_half_open_connections', fieldset.add({ om.bind('max_half_open_connections', fieldset.add({
name: 'max_half_open_connections', name: 'max_half_open_connections',
fieldLabel: _('Maximum Half-Open Connections'), fieldLabel: _('Maximum Half-Open Connections'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_connections_per_second', fieldset.add({ om.bind('max_connections_per_second', fieldset.add({
name: 'max_connections_per_second', name: 'max_connections_per_second',
fieldLabel: _('Maximum Connection Attempts per Second'), fieldLabel: _('Maximum Connection Attempts per Second'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
fieldset = this.add({ fieldset = this.add({
@ -140,14 +114,14 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
style: 'padding-top: 0px; padding-bottom: 5px; margin-top: 0px; margin-bottom: 0px;', style: 'padding-top: 0px; padding-bottom: 5px; margin-top: 0px; margin-bottom: 0px;',
autoHeight: true autoHeight: true
}); });
optMan.bind('ignore_limits_on_local_network', fieldset.add({ om.bind('ignore_limits_on_local_network', fieldset.add({
name: 'ignore_limits_on_local_network', name: 'ignore_limits_on_local_network',
height: 22, height: 22,
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
boxLabel: _('Ignore limits on local network') boxLabel: _('Ignore limits on local network')
})); }));
optMan.bind('rate_limit_ip_overhead', fieldset.add({ om.bind('rate_limit_ip_overhead', fieldset.add({
name: 'rate_limit_ip_overhead', name: 'rate_limit_ip_overhead',
height: 22, height: 22,
fieldLabel: '', fieldLabel: '',
@ -162,55 +136,39 @@ Deluge.preferences.Bandwidth = Ext.extend(Ext.form.FormPanel, {
style: 'margin-bottom: 0px; padding-bottom: 0px;', style: 'margin-bottom: 0px; padding-bottom: 0px;',
defaultType: 'spinnerfield', defaultType: 'spinnerfield',
labelWidth: 200, labelWidth: 200,
defaults: {
minValue: -1,
maxValue: 99999
},
autoHeight: true autoHeight: true
}); });
optMan.bind('max_connections_per_torrent', fieldset.add({ om.bind('max_connections_per_torrent', fieldset.add({
name: 'max_connections_per_torrent', name: 'max_connections_per_torrent',
fieldLabel: _('Maximum Connections'), fieldLabel: _('Maximum Connections'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_upload_slots_per_torrent', fieldset.add({ om.bind('max_upload_slots_per_torrent', fieldset.add({
name: 'max_upload_slots_per_torrent', name: 'max_upload_slots_per_torrent',
fieldLabel: _('Maximum Upload Slots'), fieldLabel: _('Maximum Upload Slots'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_download_speed_per_torrent', fieldset.add({ om.bind('max_download_speed_per_torrent', fieldset.add({
name: 'max_download_speed_per_torrent', name: 'max_download_speed_per_torrent',
fieldLabel: _('Maximum Download Speed (KiB/s)'), fieldLabel: _('Maximum Download Speed (KiB/s)'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 1,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('max_upload_speed_per_torrent', fieldset.add({ om.bind('max_upload_speed_per_torrent', fieldset.add({
name: 'max_upload_speed_per_torrent', name: 'max_upload_speed_per_torrent',
fieldLabel: _('Maximum Upload Speed (KiB/s)'), fieldLabel: _('Maximum Upload Speed (KiB/s)'),
width: 80, width: 80,
value: -1, value: -1,
strategy: { decimalPrecision: 0
xtype: 'number',
decimalPrecision: 1,
minValue: -1,
maxValue: 99999
}
})); }));
} }
}); });

View file

@ -36,19 +36,15 @@ Ext.namespace('Deluge.preferences');
* @extends Ext.form.FormPanel * @extends Ext.form.FormPanel
*/ */
Deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, { Deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
title: _('Cache'), title: _('Cache'),
layout: 'form' layout: 'form',
}, config);
Deluge.preferences.Cache.superclass.constructor.call(this, config);
},
initComponent: function() { initComponent: function() {
Deluge.preferences.Cache.superclass.initComponent.call(this); Deluge.preferences.Cache.superclass.initComponent.call(this);
var optMan = deluge.preferences.getOptionsManager(); var om = deluge.preferences.getOptionsManager();
var fieldset = this.add({ var fieldset = this.add({
xtype: 'fieldset', xtype: 'fieldset',
@ -56,31 +52,24 @@ Deluge.preferences.Cache = Ext.extend(Ext.form.FormPanel, {
title: _('Settings'), title: _('Settings'),
autoHeight: true, autoHeight: true,
labelWidth: 180, labelWidth: 180,
defaultType: 'spinnerfield' defaultType: 'spinnerfield',
defaults: {
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
}); });
optMan.bind('cache_size', fieldset.add({ om.bind('cache_size', fieldset.add({
fieldLabel: _('Cache Size (16 KiB Blocks)'), fieldLabel: _('Cache Size (16 KiB Blocks)'),
name: 'cache_size', name: 'cache_size',
width: 60, width: 60,
value: 512, value: 512
strategy: {
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
optMan.bind('cache_expiry', fieldset.add({ om.bind('cache_expiry', fieldset.add({
fieldLabel: _('Cache Expiry (seconds)'), fieldLabel: _('Cache Expiry (seconds)'),
name: 'cache_expiry', name: 'cache_expiry',
width: 60, width: 60,
value: 60, value: 60
strategy: {
xtype: 'number',
decimalPrecision: 0,
minValue: -1,
maxValue: 99999
}
})); }));
} }
}); });

View file

@ -36,19 +36,15 @@ Ext.namespace('Deluge.preferences');
* @extends Ext.form.FormPanel * @extends Ext.form.FormPanel
*/ */
Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, { Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
title: _('Daemon'), title: _('Daemon'),
layout: 'form' layout: 'form',
}, config);
Deluge.preferences.Daemon.superclass.constructor.call(this, config);
},
initComponent: function() { initComponent: function() {
Deluge.preferences.Daemon.superclass.initComponent.call(this); Deluge.preferences.Daemon.superclass.initComponent.call(this);
var optMan = deluge.preferences.getOptionsManager(); var om = deluge.preferences.getOptionsManager();
var fieldset = this.add({ var fieldset = this.add({
xtype: 'fieldset', xtype: 'fieldset',
@ -57,16 +53,13 @@ Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
autoHeight: true, autoHeight: true,
defaultType: 'spinnerfield' defaultType: 'spinnerfield'
}); });
optMan.bind('daemon_port', fieldset.add({ om.bind('daemon_port', fieldset.add({
fieldLabel: _('Daemon port'), fieldLabel: _('Daemon port'),
name: 'daemon_port', name: 'daemon_port',
value: 58846, value: 58846,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
fieldset = this.add({ fieldset = this.add({
@ -77,7 +70,7 @@ Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox'
}); });
optMan.bind('allow_remote', fieldset.add({ om.bind('allow_remote', fieldset.add({
fieldLabel: '', fieldLabel: '',
height: 22, height: 22,
labelSeparator: '', labelSeparator: '',
@ -93,7 +86,7 @@ Deluge.preferences.Daemon = Ext.extend(Ext.form.FormPanel, {
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox'
}); });
optMan.bind('new_release_check', fieldset.add({ om.bind('new_release_check', fieldset.add({
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
height: 40, height: 40,

View file

@ -36,19 +36,15 @@ Ext.namespace('Deluge.preferences');
* @extends Ext.form.FormPanel * @extends Ext.form.FormPanel
*/ */
Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, { Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
title: _('Interface'), title: _('Interface'),
layout: 'form' layout: 'form',
}, config);
Deluge.preferences.Interface.superclass.constructor.call(this, config);
},
initComponent: function() { initComponent: function() {
Deluge.preferences.Interface.superclass.initComponent.call(this); Deluge.preferences.Interface.superclass.initComponent.call(this);
var optMan = this.optionsManager = new Deluge.OptionsManager(); var om = this.optionsManager = new Deluge.OptionsManager();
this.on('show', this.onPageShow, this); this.on('show', this.onPageShow, this);
var fieldset = this.add({ var fieldset = this.add({
@ -60,21 +56,21 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox'
}); });
optMan.bind('show_session_speed', fieldset.add({ om.bind('show_session_speed', fieldset.add({
name: 'show_session_speed', name: 'show_session_speed',
height: 22, height: 22,
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
boxLabel: _('Show session speed in titlebar') boxLabel: _('Show session speed in titlebar')
})); }));
optMan.bind('sidebar_show_zero', fieldset.add({ om.bind('sidebar_show_zero', fieldset.add({
name: 'sidebar_show_zero', name: 'sidebar_show_zero',
height: 22, height: 22,
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
boxLabel: _('Show filters with zero torrents') boxLabel: _('Show filters with zero torrents')
})); }));
optMan.bind('sidebar_multiple_filters', fieldset.add({ om.bind('sidebar_multiple_filters', fieldset.add({
name: 'sidebar_multiple_filters', name: 'sidebar_multiple_filters',
height: 22, height: 22,
fieldLabel: '', fieldLabel: '',
@ -139,27 +135,21 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
width: 80 width: 80
} }
}); });
optMan.bind('session_timeout', fieldset.add({ om.bind('session_timeout', fieldset.add({
name: 'session_timeout', name: 'session_timeout',
fieldLabel: _('Session Timeout'), fieldLabel: _('Session Timeout'),
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
optMan.bind('port', fieldset.add({ om.bind('port', fieldset.add({
name: 'port', name: 'port',
fieldLabel: _('Port'), fieldLabel: _('Port'),
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
this.httpsField = optMan.bind('https', fieldset.add({ this.httpsField = om.bind('https', fieldset.add({
xtype: 'checkbox', xtype: 'checkbox',
name: 'https', name: 'https',
hideLabel: true, hideLabel: true,
@ -168,14 +158,14 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
boxLabel: _('Use SSL (paths relative to Deluge config folder)') boxLabel: _('Use SSL (paths relative to Deluge config folder)')
})); }));
this.httpsField.on('check', this.onSSLCheck, this); this.httpsField.on('check', this.onSSLCheck, this);
this.pkeyField = optMan.bind('pkey', fieldset.add({ this.pkeyField = om.bind('pkey', fieldset.add({
xtype: 'textfield', xtype: 'textfield',
disabled: true, disabled: true,
name: 'pkey', name: 'pkey',
width: 180, width: 180,
fieldLabel: _('Private Key') fieldLabel: _('Private Key')
})); }));
this.certField = optMan.bind('cert', fieldset.add({ this.certField = om.bind('cert', fieldset.add({
xtype: 'textfield', xtype: 'textfield',
disabled: true, disabled: true,
name: 'cert', name: 'cert',

View file

@ -37,14 +37,9 @@ Ext.ns('Deluge.preferences');
*/ */
Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, { Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
autoHeight: true, autoHeight: true,
labelWidth: 70 labelWidth: 70,
}, config);
Deluge.preferences.ProxyField.superclass.constructor.call(this, config);
},
initComponent: function() { initComponent: function() {
Deluge.preferences.ProxyField.superclass.initComponent.call(this); Deluge.preferences.ProxyField.superclass.initComponent.call(this);
@ -82,12 +77,9 @@ Deluge.preferences.ProxyField = Ext.extend(Ext.form.FieldSet, {
name: 'port', name: 'port',
fieldLabel: _('Port'), fieldLabel: _('Port'),
width: 80, width: 80,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
}); });
this.username = this.add({ this.username = this.add({

View file

@ -36,19 +36,15 @@ Ext.namespace('Deluge.preferences');
* @extends Ext.form.FormPanel * @extends Ext.form.FormPanel
*/ */
Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, { Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
constructor: function(config) {
config = Ext.apply({
border: false, border: false,
title: _('Queue'), title: _('Queue'),
layout: 'form' layout: 'form',
}, config);
Deluge.preferences.Queue.superclass.constructor.call(this, config);
},
initComponent: function() { initComponent: function() {
Deluge.preferences.Queue.superclass.initComponent.call(this); Deluge.preferences.Queue.superclass.initComponent.call(this);
var optMan = deluge.preferences.getOptionsManager(); var om = deluge.preferences.getOptionsManager();
var fieldset = this.add({ var fieldset = this.add({
xtype: 'fieldset', xtype: 'fieldset',
@ -59,7 +55,7 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox'
}); });
optMan.bind('queue_new_to_top', fieldset.add({ om.bind('queue_new_to_top', fieldset.add({
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
height: 22, height: 22,
@ -76,43 +72,34 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
defaultType: 'spinnerfield', defaultType: 'spinnerfield',
style: 'margin-bottom: 0px; padding-bottom: 0px;' style: 'margin-bottom: 0px; padding-bottom: 0px;'
}); });
optMan.bind('max_active_limit', fieldset.add({ om.bind('max_active_limit', fieldset.add({
fieldLabel: _('Total Active'), fieldLabel: _('Total Active'),
name: 'max_active_limit', name: 'max_active_limit',
value: 8, value: 8,
width: 80, width: 80,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
optMan.bind('max_active_downloading', fieldset.add({ om.bind('max_active_downloading', fieldset.add({
fieldLabel: _('Total Active Downloading'), fieldLabel: _('Total Active Downloading'),
name: 'max_active_downloading', name: 'max_active_downloading',
value: 3, value: 3,
width: 80, width: 80,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
optMan.bind('max_active_seeding', fieldset.add({ om.bind('max_active_seeding', fieldset.add({
fieldLabel: _('Total Active Seeding'), fieldLabel: _('Total Active Seeding'),
name: 'max_active_seeding', name: 'max_active_seeding',
value: 5, value: 5,
width: 80, width: 80,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
optMan.bind('dont_count_slow_torrents', fieldset.add({ om.bind('dont_count_slow_torrents', fieldset.add({
xtype: 'checkbox', xtype: 'checkbox',
name: 'dont_count_slow_torrents', name: 'dont_count_slow_torrents',
height: 40, height: 40,
@ -129,41 +116,36 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
defaultType: 'spinnerfield', defaultType: 'spinnerfield',
style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;' style: 'margin-bottom: 0px; padding-bottom: 0px; margin-top: 0; padding-top: 0;'
}); });
optMan.bind('share_ratio_limit', fieldset.add({ om.bind('share_ratio_limit', fieldset.add({
fieldLabel: _('Share Ratio Limit'), fieldLabel: _('Share Ratio Limit'),
name: 'share_ratio_limit', name: 'share_ratio_limit',
value: 8, value: 8,
width: 80, width: 80,
strategy: { incrementValue: 0.1,
xtype: 'number',
decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999,
} alternateIncrementValue: 1,
decimalPrecision: 2
})); }));
optMan.bind('seed_time_ratio_limit', fieldset.add({ om.bind('seed_time_ratio_limit', fieldset.add({
fieldLabel: _('Share Time Ratio'), fieldLabel: _('Share Time Ratio'),
name: 'seed_time_ratio_limit', name: 'seed_time_ratio_limit',
value: 3, value: 3,
width: 80, width: 80,
strategy: { incrementValue: 0.1,
xtype: 'number',
decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999,
} alternateIncrementValue: 1,
decimalPrecision: 2
})); }));
optMan.bind('seed_time_limit', fieldset.add({ om.bind('seed_time_limit', fieldset.add({
fieldLabel: _('Seed Time (m)'), fieldLabel: _('Seed Time (m)'),
name: 'seed_time_limit', name: 'seed_time_limit',
value: 5, value: 5,
width: 80, width: 80,
strategy: {
xtype: 'number',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
}
})); }));
fieldset = this.add({ fieldset = this.add({
@ -186,25 +168,22 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
boxLabel: _('Stop seeding when share ratio reaches:') boxLabel: _('Stop seeding when share ratio reaches:')
}); });
this.stopAtRatio.on('check', this.onStopRatioCheck, this); this.stopAtRatio.on('check', this.onStopRatioCheck, this);
optMan.bind('stop_seed_at_ratio', this.stopAtRatio); om.bind('stop_seed_at_ratio', this.stopAtRatio);
this.stopRatio = fieldset.add({ this.stopRatio = fieldset.add({
xtype: 'spinnerfield', xtype: 'spinnerfield',
name: 'stop_seed_ratio', name: 'stop_seed_ratio',
ctCls: 'x-deluge-indent-checkbox', ctCls: 'x-deluge-indent-checkbox',
disabled: true, disabled: true,
value: 2.0, value: '2.0',
width: 60, width: 60,
strategy: { incrementValue: 0.1,
xtype: 'number',
minValue: -1, minValue: -1,
maxValue: 99999, maxValue: 99999,
incrementValue: 0.1,
alternateIncrementValue: 1, alternateIncrementValue: 1,
decimalPrecision: 1 decimalPrecision: 2
}
}); });
optMan.bind('stop_seed_ratio', this.stopRatio); om.bind('stop_seed_ratio', this.stopRatio);
this.removeAtRatio = fieldset.add({ this.removeAtRatio = fieldset.add({
name: 'remove_seed_at_ratio', name: 'remove_seed_at_ratio',
@ -213,7 +192,7 @@ Deluge.preferences.Queue = Ext.extend(Ext.form.FormPanel, {
disabled: true, disabled: true,
colspan: 2 colspan: 2
}); });
optMan.bind('remove_seed_at_ratio', this.removeAtRatio); om.bind('remove_seed_at_ratio', this.removeAtRatio);
}, },
onStopRatioCheck: function(e, checked) { onStopRatioCheck: function(e, checked) {