mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +00:00
hide all the preferences page upon the first page change and don't set the width/height
This commit is contained in:
parent
0c4cc4d0e2
commit
5998eea0bd
1 changed files with 10 additions and 5 deletions
|
@ -33,6 +33,9 @@ Copyright:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
|
Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
|
||||||
|
|
||||||
|
currentPage: null,
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
layout: 'border',
|
layout: 'border',
|
||||||
|
@ -45,8 +48,7 @@ Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
|
||||||
plain: true,
|
plain: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
title: _('Preferences'),
|
title: _('Preferences'),
|
||||||
|
|
||||||
currentPage: false,
|
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
region: 'west',
|
region: 'west',
|
||||||
|
@ -113,8 +115,6 @@ Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
|
||||||
store.loadData([[name]], true);
|
store.loadData([[name]], true);
|
||||||
page['bodyStyle'] = 'margin: 5px';
|
page['bodyStyle'] = 'margin: 5px';
|
||||||
this.pages[name] = this.configPanel.add(page);
|
this.pages[name] = this.configPanel.add(page);
|
||||||
this.pages[name].setWidth(365);
|
|
||||||
this.pages[name].setHeight(410);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,9 +130,14 @@ Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onPageSelect: function(selModel, rowIndex, r) {
|
onPageSelect: function(selModel, rowIndex, r) {
|
||||||
if (this.currentPage) {
|
if (this.currentPage == null) {
|
||||||
|
for (var page in this.pages) {
|
||||||
|
this.pages[page].hide();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
this.currentPage.hide();
|
this.currentPage.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
var name = r.get('name');
|
var name = r.get('name');
|
||||||
|
|
||||||
this.pages[name].show();
|
this.pages[name].show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue