Convert to 4-space indentation
This commit is contained in:
parent
04c42253eb
commit
d1c8e88e9f
@ -12,29 +12,29 @@ function main(metadata, desklet_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MyDesklet.prototype = {
|
MyDesklet.prototype = {
|
||||||
__proto__: Desklet.Desklet.prototype,
|
__proto__: Desklet.Desklet.prototype,
|
||||||
|
|
||||||
_init: function(metadata, desklet_id) {
|
_init: function(metadata, desklet_id) {
|
||||||
Desklet.Desklet.prototype._init.call(this, metadata, desklet_id);
|
Desklet.Desklet.prototype._init.call(this, metadata, desklet_id);
|
||||||
|
|
||||||
// initialize settings
|
// initialize settings
|
||||||
this.settings = new Settings.DeskletSettings(this, this.metadata["uuid"], desklet_id);
|
this.settings = new Settings.DeskletSettings(this, this.metadata["uuid"], desklet_id);
|
||||||
this.settings.bindProperty(Settings.BindingDirection.IN, "type", "type", this.on_setting_changed);
|
this.settings.bindProperty(Settings.BindingDirection.IN, "type", "type", this.on_setting_changed);
|
||||||
|
|
||||||
// initialize desklet GUI
|
// initialize desklet GUI
|
||||||
this.setupUI();
|
this.setupUI();
|
||||||
},
|
},
|
||||||
|
|
||||||
setupUI: function(){
|
setupUI: function(){
|
||||||
var type = this.type;
|
var type = this.type;
|
||||||
|
|
||||||
// creates container for one child
|
// creates container for one child
|
||||||
this.window = new St.Bin();
|
this.window = new St.Bin();
|
||||||
// creates a label with text
|
// creates a label with text
|
||||||
this.text = new St.Label({text: "Hello Desktop ".concat(type)});
|
this.text = new St.Label({text: "Hello Desktop ".concat(type)});
|
||||||
// adds label to container
|
// adds label to container
|
||||||
this.window.add_actor(this.text);
|
this.window.add_actor(this.text);
|
||||||
// Sets the container as content actor of the desklet
|
// Sets the container as content actor of the desklet
|
||||||
this.setContent(this.window);
|
this.setContent(this.window);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,31 +1,31 @@
|
|||||||
{
|
{
|
||||||
"head0": {
|
"head0": {
|
||||||
"type": "header",
|
"type": "header",
|
||||||
"description": "Settings for system-monitor-graph@rcassani"
|
"description": "Settings for system-monitor-graph@rcassani"
|
||||||
},
|
},
|
||||||
|
|
||||||
"head1": {
|
"head1": {
|
||||||
"type": "header",
|
"type": "header",
|
||||||
"description": "General"
|
"description": "General"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "combobox",
|
"type": "combobox",
|
||||||
"default": "cpu",
|
"default": "cpu",
|
||||||
"description": "System variable for graph",
|
"description": "System variable for graph",
|
||||||
"tooltip": "Select the system variable to monitor.",
|
"tooltip": "Select the system variable to monitor.",
|
||||||
"options" : {
|
"options" : {
|
||||||
"CPU" : "cpu",
|
"CPU" : "cpu",
|
||||||
"RAM": "ram"
|
"RAM": "ram"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"head2": {
|
||||||
|
"type": "header",
|
||||||
|
"description": "Visual"
|
||||||
|
},
|
||||||
|
"line-color": {
|
||||||
|
"type": "colorchooser",
|
||||||
|
"default": "rgba(50,168,82,1.0)",
|
||||||
|
"description": "Line color"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
"head2": {
|
|
||||||
"type": "header",
|
|
||||||
"description": "Visual"
|
|
||||||
},
|
|
||||||
"line-color": {
|
|
||||||
"type": "colorchooser",
|
|
||||||
"default": "rgba(50,168,82,1.0)",
|
|
||||||
"description": "Line color"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user