I’ll list in this thread development questions about using preferences in plugins.
- Is it possible to dynamically change the content of lists in the plugin preferences?
For instance, load a list of items from another file.
Or to change the content of a list depending on user selection on other widgets? For instance, suppose that we have a list of servers that the user must select. Based on the server selected, the content of another list must change.
The list preference was not conceived to be dinamically changed. And the plugin preferences code in daemon miss the mechanics to handle it.
If you have a good solution, please submit a patch for review!
Both global and per account preferences should be accessible through the
PluginPreferenceHandler by using
default or a valid account id as parameter.
I used Watermark text and Watermark image as an example to illustrate the question. In the context of my plugin, the user can select a server from a predefined list of servers, or exclusive enter her own server parameters into entry fields. But she can’t select both options at the same time. I would like to offer such exclusive option, like a radio button to select one option between multiple options.
Can such an exclusive choice behaviour be programmed with the plugin preferences available? Or should I need to place a
type=Switch preference before each group of settings and let the user select the group she wants to use?