mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
add some basic doc strings
This commit is contained in:
parent
454321614b
commit
dc764b2ad5
1 changed files with 61 additions and 31 deletions
|
@ -31,11 +31,33 @@ Copyright:
|
||||||
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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class Deluge.Plugin
|
||||||
|
* @extends Ext.util.Observable
|
||||||
|
*/
|
||||||
Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plugins name
|
||||||
|
* @property name
|
||||||
|
* @type {String}
|
||||||
|
*/
|
||||||
|
name: null,
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
this.name = config.name;
|
this.name = config.name;
|
||||||
this.addEvents({
|
this.addEvents({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event enabled
|
||||||
|
* @param {Plugin} plugin the plugin instance
|
||||||
|
*/
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @event disabled
|
||||||
|
* @param {Plugin} plugin the plugin instance
|
||||||
|
*/
|
||||||
"disabled": true
|
"disabled": true
|
||||||
});
|
});
|
||||||
this.isDelugePlugin = true;
|
this.isDelugePlugin = true;
|
||||||
|
@ -43,11 +65,19 @@ Deluge.Plugin = Ext.extend(Ext.util.Observable, {
|
||||||
Deluge.Plugin.superclass.constructor.call(this, config);
|
Deluge.Plugin.superclass.constructor.call(this, config);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables the plugin, firing the "{@link #disabled}" event and
|
||||||
|
* then executing the plugins clean up method onDisabled.
|
||||||
|
*/
|
||||||
disable: function() {
|
disable: function() {
|
||||||
this.fireEvent("disabled", this);
|
this.fireEvent("disabled", this);
|
||||||
if (this.onDisable) this.onDisable();
|
if (this.onDisable) this.onDisable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables the plugin, firing the "{@link #enabled}" event and
|
||||||
|
* then executes the plugins setup method, onEnabled.
|
||||||
|
*/
|
||||||
enable: function() {
|
enable: function() {
|
||||||
this.fireEvent("enable", this);
|
this.fireEvent("enable", this);
|
||||||
if (this.onEnable) this.onEnable();
|
if (this.onEnable) this.onEnable();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue