fixes #1046, changing the option name in the ui rather than the core which would break the other uis

This commit is contained in:
Damien Churchill 2009-10-27 09:12:22 +00:00
parent 208eef713a
commit acc850dab9
1 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
'max_upload_speed': -1, 'max_upload_speed': -1,
'max_connections': -1, 'max_connections': -1,
'max_upload_slots': -1, 'max_upload_slots': -1,
'is_auto_managed': false, 'auto_managed': false,
'stop_at_ratio': false, 'stop_at_ratio': false,
'stop_ratio': 2.0, 'stop_ratio': 2.0,
'remove_at_ratio': false, 'remove_at_ratio': false,
@ -207,7 +207,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
} }
}); });
this.fields.is_auto_managed = this.fieldsets.queue.add({ this.fields.auto_managed = this.fieldsets.queue.add({
xtype: 'checkbox', xtype: 'checkbox',
fieldLabel: '', fieldLabel: '',
labelSeparator: '', labelSeparator: '',
@ -419,6 +419,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
this.fields['private'].setValue(torrent['private']); this.fields['private'].setValue(torrent['private']);
this.fields['private'].setDisabled(true); this.fields['private'].setDisabled(true);
delete torrent['private']; delete torrent['private'];
torrent['auto_managed'] = torrent['is_auto_managed'];
this.optionsManager.setDefault(torrent); this.optionsManager.setDefault(torrent);
var stop_at_ratio = this.optionsManager.get('stop_at_ratio'); var stop_at_ratio = this.optionsManager.get('stop_at_ratio');
this.fields.remove_at_ratio.setDisabled(!stop_at_ratio); this.fields.remove_at_ratio.setDisabled(!stop_at_ratio);