Cinnamon desklet 不获取更改

Cinnamon desklet does not pick up changes

我想写一个 Cinnamon desklet,但我没有得到正确的开发周期。 我从一个 hello world desklet 开始。 文件在 ~/.local/share/cinnamon/desklets/hello@world

desklet.js

const Desklet = imports.ui.desklet;

function HelloDesklet(metadata, desklet_id) {
    this._init(metadata, desklet_id);
}

HelloDesklet.prototype = {
    __proto__: Desklet.Desklet.prototype
    ,_init: function(metadata, desklet_id) {
        Desklet.Desklet.prototype._init.call(this, metadata);
        this._cont = new St.Label();
        this._cont.set_text("Hello, world!");
        this.setContent(this._cont);
    }
}

function main(metadata, desklet_id) {
    return new HelloDesklet(metadata, desklet_id);
}

metadata.json

{
    "uuid": "hello@world",
    "name": "Hello World",
    "description": "Say hello",
    "prevent-decorations": false
}

到目前为止一切正常运行,我可以添加 desklet,它会显示 Hello World 消息。

现在,如果我将代码更改为编写 "Hello, new world!" 而不是 "Hello, world!",删除 desklet 并再次添加它,旧消息仍然显示。 如何让 Cinnamon 接收我的更改?

参考:Desklet modifications not taken into account at reload.

This is a known issue with Cinnamon 3.6, its been fixed in Cinnamon 3.8.

For now you will have to restart Cinnamon, sorry.

检查您的 Cinnamon 版本。

其他选择是重启 Cinnamon (Ctrl+Alt+Esc 或通过 Looking Glass/Melange).