-
Notifications
You must be signed in to change notification settings - Fork 808
Open
Labels
Description
Distribution
Mint 22.2
Package version
6.4.8
Graphics hardware in use
No response
Frequency
Always
Bug description
In an applet, using a timechooser or datechooser setting via settings-schema.json then binding a JS callback to it via the method AppletSettings.bind makes the callback being called when any setting changes.
Steps to reproduce
- Unzip test@bug.zip content in
~/.local/share/cinnamon/applets, which consists essentially in:settings-schema.json:{ "switch": { "type": "switch", // … }, "timechooser": { "type": "timechooser", // … }, "datechooser": { "type": "datechooser", // … } }applet.js:const Applet = imports.ui.applet; const {AppletSettings} = imports.ui.settings; class ThisApplet extends Applet.TextApplet { constructor(metadata, orientation, panel_height, instance_id) { super(orientation, panel_height, instance_id); // … const settings = new AppletSettings(this, metadata.uuid, instance_id); settings.bind('timechooser', "", () => global.logError("timechooser changed")); settings.bind('datechooser', "", () => global.logError("datechooser changed")); } } // …
- Open Looking Glass logs (
Alt+F2then typelg). - Add the applet via the Applets menu.
- Open its settings window.
- Modify the
switchsetting and note that it triggers the messagestimechooser changedanddatechooser changedin the Looking Glass logs.
Expected behavior
The callback should be called only when the specific setting changes and not any other.
Additional information
I tested a few other settings such as soundfilechooser, fontchooser and keybinding and they didn't produce the issue.