Settings

Per Instance Settings

There are two main design patterns to store settings for an applet:

There is actually a third case, which is rather rare, though: per-screen settings. It might be that some applets control some per-screen settings, like the layout of the workspaces. There is currently no API to help with this as it is a very specific case that you will probably never have to deal with for a usual applet.

Per Instance Settings

In order to store per instance settings for an applet it is recommended to use GSettings. The Panel Applet Library privides a function named panel_applet_settings_new() for this purpose. You need to provide a GSettings schema file for your applet and the Panel Applet library will setup the GSettings object for you.

TODO: describe settings-oriented API in more detail and give an example for per instance settings.