mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
fix page switching
This commit is contained in:
parent
8a51a5e978
commit
c28574502c
1 changed files with 35 additions and 6 deletions
|
@ -90,16 +90,21 @@ Copyright:
|
||||||
addPage: function(name, page) {
|
addPage: function(name, page) {
|
||||||
var store = this.categoriesGrid.getStore();
|
var store = this.categoriesGrid.getStore();
|
||||||
store.loadData([[name]], true);
|
store.loadData([[name]], true);
|
||||||
this.pages[name] = page;
|
page['bodyStyle'] = 'margin: 5px';
|
||||||
|
page['hidden'] = true;
|
||||||
|
this.pages[name] = this.configPanel.add(page);
|
||||||
|
this.doLayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageSelect: function(selModel, rowIndex, r) {
|
onPageSelect: function(selModel, rowIndex, r) {
|
||||||
this.configPanel.removeAll();
|
if (this.currentPage) {
|
||||||
this.currentPage = rowIndex;
|
this.currentPage.hide();
|
||||||
|
}
|
||||||
var name = r.get('name');
|
var name = r.get('name');
|
||||||
|
|
||||||
|
this.pages[name].show();
|
||||||
this.configPanel.setTitle(name);
|
this.configPanel.setTitle(name);
|
||||||
this.pages[name] = this.configPanel.add(this.pages[name]);
|
this.currentPage = this.pages[name];
|
||||||
this.doLayout();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
@ -125,7 +130,31 @@ Deluge.Preferences.addPage(_('Bandwidth'), {
|
||||||
});
|
});
|
||||||
Deluge.Preferences.addPage(_('Interface'), {
|
Deluge.Preferences.addPage(_('Interface'), {
|
||||||
border: false,
|
border: false,
|
||||||
html: 'interface'
|
xtype: 'form',
|
||||||
|
items: [{
|
||||||
|
xtype: 'fieldset',
|
||||||
|
border: false,
|
||||||
|
title: _('Window'),
|
||||||
|
labelWidth: 10,
|
||||||
|
items: [{
|
||||||
|
xtype: 'checkbox',
|
||||||
|
fieldLabel: '',
|
||||||
|
labelSeparator: '',
|
||||||
|
boxLabel: _('Show session speed in titlebar'),
|
||||||
|
id: 'show_session_speed'
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
xtype: 'fieldset',
|
||||||
|
border: false,
|
||||||
|
title: _('Sidebar'),
|
||||||
|
items: [{
|
||||||
|
xtype: 'checkbox',
|
||||||
|
fieldLabel: '',
|
||||||
|
labelSeparator: '',
|
||||||
|
boxLabel: _('Hide filters with 0 torrents'),
|
||||||
|
id: 'hide_sidebar_zero'
|
||||||
|
}]
|
||||||
|
}]
|
||||||
});
|
});
|
||||||
Deluge.Preferences.addPage(_('Other'), {
|
Deluge.Preferences.addPage(_('Other'), {
|
||||||
border: false,
|
border: false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue