mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 01:18:39 +00:00
fix the execute plugin disabling and change the namespace of the preferences page
This commit is contained in:
parent
50162694b5
commit
01e847b997
1 changed files with 7 additions and 8 deletions
|
@ -30,20 +30,20 @@ Copyright:
|
||||||
this exception statement from your version. If you delete this exception
|
this exception statement from your version. If you delete this exception
|
||||||
statement from all source files in the program, then also delete it here.
|
statement from all source files in the program, then also delete it here.
|
||||||
*/
|
*/
|
||||||
Ext.ns('Deluge.ux.execute');
|
Ext.ns('Deluge.ux.preferences');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Deluge.ux.execute.ExecutePreferencesPage
|
* @class Deluge.ux.preferences.ExecutePage
|
||||||
* @extends Ext.Panel
|
* @extends Ext.Panel
|
||||||
*/
|
*/
|
||||||
Deluge.ux.execute.ExecutePreferencesPage = Ext.extend(Ext.Panel, {
|
Deluge.ux.preferences.ExecutePage = Ext.extend(Ext.Panel, {
|
||||||
|
|
||||||
title: _('Execute'),
|
title: _('Execute'),
|
||||||
layout: 'border',
|
layout: 'border',
|
||||||
border: false,
|
border: false,
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
Deluge.ux.execute.ExecutePreferencesPage.superclass.initComponent.call(this);
|
Deluge.ux.preferences.ExecutePage.superclass.initComponent.call(this);
|
||||||
this.commands = this.add({
|
this.commands = this.add({
|
||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
region: 'center',
|
region: 'center',
|
||||||
|
@ -89,7 +89,7 @@ Deluge.ux.execute.ExecutePreferencesPage = Ext.extend(Ext.Panel, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
Deluge.ux.execute.ExecutePreferencesPage.superclass.onShow.call(this);
|
Deluge.ux.preferences.ExecutePage.superclass.onShow.call(this);
|
||||||
deluge.client.execute.get_commands({
|
deluge.client.execute.get_commands({
|
||||||
success: function(commands) {
|
success: function(commands) {
|
||||||
this.commands.getStore().loadData(commands);
|
this.commands.getStore().loadData(commands);
|
||||||
|
@ -104,11 +104,10 @@ Deluge.plugins.ExecutePlugin = Ext.extend(Deluge.Plugin, {
|
||||||
name: 'Execute',
|
name: 'Execute',
|
||||||
|
|
||||||
onDisable: function() {
|
onDisable: function() {
|
||||||
Deluge.Preferences.removePage(this.prefsPage);
|
deluge.preferences.removePage(this.prefsPage);
|
||||||
},
|
},
|
||||||
|
|
||||||
onEnable: function() {
|
onEnable: function() {
|
||||||
this.prefsPage = new Deluge.ux.execute.ExecutePreferencesPage();
|
this.prefsPage = deluge.preferences.addPage(new Deluge.ux.preferences.ExecutePage());
|
||||||
this.prefsPage = deluge.preferences.addPage(this.prefsPage);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue