mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-24 17:18:24 +00:00
make the close button close the window
This commit is contained in:
parent
62375c7109
commit
8a51a5e978
@ -35,7 +35,9 @@ Copyright:
|
|||||||
this.resizable = false;
|
this.resizable = false;
|
||||||
this.title = _('Preferences');
|
this.title = _('Preferences');
|
||||||
this.buttons = [{
|
this.buttons = [{
|
||||||
text: _('Close')
|
text: _('Close'),
|
||||||
|
handler: this.onCloseButtonClick,
|
||||||
|
scope: this
|
||||||
},{
|
},{
|
||||||
text: _('Apply')
|
text: _('Apply')
|
||||||
},{
|
},{
|
||||||
@ -81,6 +83,10 @@ Copyright:
|
|||||||
this.on('show', this.onShow.bindWithEvent(this));
|
this.on('show', this.onShow.bindWithEvent(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onCloseButtonClick: function() {
|
||||||
|
this.hide();
|
||||||
|
},
|
||||||
|
|
||||||
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);
|
||||||
@ -97,7 +103,9 @@ Copyright:
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
|
if (!this.categoriesGrid.getSelectionModel().hasSelection()) {
|
||||||
|
this.categoriesGrid.getSelectionModel().selectFirstRow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user