Webui applies changes when OK clicked in Preferences

This commit is contained in:
Calum Lind 2012-01-24 22:58:00 +00:00
parent ba60ae09d5
commit ec27028f1b
1 changed files with 27 additions and 16 deletions

View File

@ -239,7 +239,18 @@ Deluge.preferences.PreferencesWindow = Ext.extend(Ext.Window, {
// private
onOk: function() {
deluge.client.core.set_config(this.optionsManager.getDirty());
var changed = this.optionsManager.getDirty();
if (!Ext.isObjectEmpty(changed)) {
deluge.client.core.set_config(changed, {
success: this.onSetConfig,
scope: this
});
}
for (var page in this.pages) {
if (this.pages[page].onOk) this.pages[page].onOk();
}
this.hide();
}
});