Open ccprog opened 8 years ago
Related with this, another example could be, show the real fonts family.
We don't know the fonts family in client machine. So, if we want to provide dinamically data in a combo, to select the font family, we can change ours metadata.json file dinamically with the client data and then perform an applet reload, or instead modify the Cinnamon copy of the metadata.json file in: ~/.cinnamon/configs/uuid/uuid.json directly.
The only problem occurs when Cinnamon Setting is open, because the new data don't force a dynamically reload of the extension settings.
Anyway, what is needed is a general filter to compare the current cinnamon-settings data with the current metadata.json file and only display the change to help avoiding a blink in any change.
Any change is currently detected by cinnamon settings, but only is filtered a change of the the value, not of all data in the file.
This is exactly what I propuse, some years ago, but for now, nothing.
Here is where the reload occurs: https://github.com/linuxmint/Cinnamon/blob/master/files/usr/share/cinnamon/cinnamon-settings/bin/XletSettingsWidgets.py#L66
Another thing is that i consider that could be good improve, is moved the metadata.json file monitor and the procedure to read and write the file to the c code, then implement a python client and a cjs client of this functionality outside the cinnamon main thread and outside the python settings and in only one place. Maybe the best place is the cinnamon settings daemon.
I do not support changing the structure of the settings page at any time. Dynamically determining presented options - not later than at init time - might be a valid strategy, but from the user standpoint, the settings must be a static structure.
My proposal therefore only concerns values.
I've added a diff to the above mentioned gist with what I see as a possible solution.
Not sure yet if it will address the original issue but someone is working on an overhaul of the XletSettingsWidgets for Cinnamon 3.2
@JosephMcc did that overhaul ever address the original issue?
Many thanks for submitting your feature request for Cinnamon. Your feature request has been documented and will be reviewed by the Linux Mint team.
For more information on our workflow and feature requests, read https://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/faq.html.
These issues continue to be present in Cinnamon 5.2. In particular, a change of options in a combobox is not reflected in the xlet-settings window, except when it is reloaded (ie closed, then re-opened).
I honestly always thought this was what was already happened.
This is OK using setValue, but not if using setOptions.
I am proposing the following feature for the settings page: if a setting is changed programatically while the settings page is open, display the changed value immediately.
To explain what this would be usefull for, here is an example: An applet draws in data from a webservice (think: weather data). Data can be supplied by multiple services, but might need different parameter values (IDs for the same location differ between weather.com and openweathermap).
Consider having a combobox for choosing the service and a entry field for the (location) parameter. Depending on the webservice choosen, the value for the parameter must also change. Ideally, the applet would remember the parameter the user has supplied for each service and automatically display it in the entry field as soon as a combobox option is choosen.
In terms of settings applied to the applet, this already works - use a generic field to store the value connected to each option in an object (see this gist).
What doesn't work is the value shown in the settings window. Although the programatically changed value is applied to the applet, the entry field still shows the old value. Close the settings page, open it again, and the new value will appear.
What i would like to see is a live update of the entry field.