Applet Preferences Dialog

From AWN Wiki

Jump to: navigation, search

Contents

[edit] Utility arguments:

Instance: this is the location of the applet instance that is being configured. Required. If the Instance is distinct from the baseconf then the location should be in the form APPLET_NAME-UID.

Baseconf: This is the location of the base configuration. If this is ommitted then the Instance is also the base configuration.

Appletname: The name of the applet. Often, but not always, the same as one of the other two values. Used to lookup the schema-ini.

[edit] Relationships between Instance, Baseconf and schema-ini

Most configurations are a case of an instance and no baseconf.

Baseconf values will not necessarily be the same as the schema defaults.

An applet using an instance and baseconf setup should behave in the following manner. Values in an instance take precedence of those in the Baseconf. If the key is not present in the Instance then the Baseconf value is used.

A key must be present in the schema-ini to be displayed in the dialog.


[edit] Installation location for scheme-ini files

$PREFIX/share/avant-window-navigator/schemas

[edit] schema-ini Additional, option, descriptive keys.

Things that can be specified include:

Colour (ARGB or RGB), icon, font, executable.

For each preference:

- Path to underlying config key: GConf?.
- Friendly Label: "Username", "Number of Desktops", etc.
- Data type: string, int, bool, float, list.
- Field type: text box, slider, choice, color picker, file/folder chooser etc.
- Constraints: length, min, max, valid choices (for lists), default value?


[edit] Scope

Do we want ideally all applets to use this? Or only ones with simple preferences?

There should be a simple way to define new control types. For example if this existed when the weather control came along, which needs a Location Picker, how can it use PreferencesDialog? Must it abandon it all together or can it easily define a new control type within PreferencesDialog?

Should there be a way to define non-preference items like text or images? Could these be based on the value of keys?


[edit] Preparatory items todo

Tasks to be completed before development can begin:

1) Have build system install schema-ini.

2) Add applet name arg to shared_menuitem_create_applet_prefs() Convert to spawn utility instead of gconf-editor.

3) Convert a couple applet schema-ini files. Good candidates: shinyswitcher and webapplet.

Personal tools