Add refresh interval as option in settings
This commit is contained in:
parent
bca382d100
commit
e94f511892
@ -26,6 +26,8 @@ MyDesklet.prototype = {
|
||||
// initialize settings
|
||||
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, "refresh-interval", "refresh_interval", this.on_setting_changed);
|
||||
|
||||
|
||||
// initialize desklet GUI
|
||||
this.setupUI();
|
||||
|
||||
@ -27,5 +27,18 @@
|
||||
"type": "colorchooser",
|
||||
"default": "rgba(50,168,82,1.0)",
|
||||
"description": "Line color"
|
||||
},
|
||||
"refresh-interval": {
|
||||
"type": "spinbutton",
|
||||
"default": 2,
|
||||
"step": 1,
|
||||
"min": 1,
|
||||
"max": 30,
|
||||
"units": "seconds",
|
||||
"description": "Refresh interval",
|
||||
"tooltip": "Increase or decrease refresh interval in seconds."
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user