YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Local Variables

Info:

File: include/security/widgets.ycp Module: Security configuration Summary: Security widgets definitions Authors: Michal Svec

$Id$

This file contains the definitions of all widgets used by the security module. They are all in one map (function) called WIDGETS.

The WIDGETS format: -------------------

map WIDGETS = $[ "Item unique ID" : $[ "Widget" : "ComboBox", "Label" : "Item Label", "Options" : [ "option1", "option2", ... ], "Value" : "option2" ], ... ];

The "Value" is the current value of this option and one from "Options".

Particular "Options" can be either or [ , ]. In the latter case, the first string is used as ID and the second is displayed. For example: [ "option1", ["option2",_("Option2 translation")], ... ].

Possible "Widget" values so far: "ComboBox, CheckBox, TextEntry".

Implementation: ---------------

map2widget("ID") - look up the "ID" in the "WIDGETS" map - create the widget

widget2value("ID") - query UI for the widget with `id(ID) - return its current value

updatewidget("ID") - look up the "ID" and change its "Value" to the "val" - updates the WIDGETS map - called after start and after each subdialog [OK] - must check if the value is in "Options"! (TODO)

processinput() - return true (OK) or false (abort, back, nil, help!, ...)

local WIDGETS -> map

All widgets are here