add an onOk event handler that saves and closes the preferences window

This commit is contained in:
Damien Churchill 2009-08-10 10:24:45 +00:00
parent 78df3d10ce
commit 2de8069c9f
1 changed files with 6 additions and 1 deletions

View File

@ -108,6 +108,11 @@ Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
onClose: function() {
this.hide();
},
onOk: function() {
Deluge.Client.core.set_config(this.optionsManager.getDirty());
this.hide();
},
addPage: function(page) {
var store = this.categoriesGrid.getStore();
@ -161,4 +166,4 @@ Ext.deluge.PreferencesWindow = Ext.extend(Ext.Window, {
}
});
Deluge.Preferences = new Ext.deluge.PreferencesWindow();
Deluge.Preferences = new Ext.deluge.PreferencesWindow();