home *** CD-ROM | disk | FTP | other *** search
- /**
- * File:
- * include/bootloader/zipl/widgets.ycp
- *
- * Module:
- * Bootloader installation and configuration
- *
- * Summary:
- * Widgets specific for ZIPL bootloader
- *
- * Authors:
- * Jiri Srain <jsrain@suse.cz>
- *
- * $Id: widgets.ycp 27748 2006-02-08 15:15:11Z jplack $
- *
- */
-
-
- {
-
- textdomain "bootloader";
-
- import "Label";
- import "Mode";
- import "BootCommon";
- import "TablePopup";
- include "bootloader/routines/popups.ycp";
-
-
- /**
- * Init function of widget
- * @param widget string id of the widget
- */
- void ZIPLTargetInit (string widget) {
- UI::ChangeWidget (`id (widget), `Value,
- BootCommon::current_section["target"]:"");
- }
-
- /**
- * Store function of a widget
- * @param widget string widget key
- * @param event map event that caused the operation
- */
- void ZIPLTargetStore (string widget, map event) {
- BootCommon::current_section["target"] = (string)
- UI::QueryWidget (`id (widget), `Value);
- }
-
- /**
- * Cache for Widgets function
- */
- map<string,map<string,any> > _widgets = nil;
-
- /**
- * Get widgets specific for ZIPL
- * @return a map describing all ZIPL-specific widgets
- */
- global map<string,map<string,any> > Widgets () {
- if (_widgets == nil)
- {
- _widgets = $[
- // ugly, but then there is no need to replace dialog
- // used for ZIPL target
- "vga" : $[
- // text entry
- "label" : _("ZIPL &Target"),
- "widget" : `textentry,
- "init" : ZIPLTargetInit,
- "store" : ZIPLTargetStore,
- ],
- ];
- }
- return _widgets;
- }
-
-
- }
-