ACC SHELL

Path : /usr/share/YaST2/include/bootloader/grub/
File Upload :
Current File : //usr/share/YaST2/include/bootloader/grub/dialogs.ycp

/**
 * File:
 *      include/bootloader/grub/dialogs.ycp
 *
 * Module:
 *      Bootloader installation and configuration
 *
 * Summary:
 *      Dialogs for configuraion i386-specific functions
 *
 * Authors:
 *      Jiri Srain <jsrain@suse.cz>
 *
 * $Id: dialogs_i386.ycp 56563 2009-04-02 08:41:25Z jreidinger $
 *
 */


{
textdomain "bootloader";


import "Label";
import "Wizard";
import "CWM";
import "BootCommon";
import "Stage";

include "bootloader/grub/options.ycp";




/**
 * Run dialog to adjust installation on i386 and AMD64
 * @return symbol for wizard sequencer
 */
symbol i386InstallDetailsDialog () {
   term contents =  `HBox (`HStretch (), `VBox (
          `VStretch(),
          `Frame (_("Disk Order"),"disks_order"),
          `VStretch()),
        `HStretch());

  return CWM::ShowAndRun ($[
          "widget_descr": $[ "disks_order": DisksOrderWidget()],
          "widget_names": ["disks_order"],
          "contents": contents,
          "caption" : _("Disk order settings"),
          "back_button" : Label::BackButton (),
          "abort_button" : Label::CancelButton (),
          "next_button" : Label::OKButton ()
        ]);
}

/**
 * Run dialog for loader installation details on i386
 * @return symbol for wizard sequencer
 */
symbol i386LoaderDetailsDialog () {
    y2milestone ("Running i386 loader details dialog");

    term contents = `HBox (`HSpacing (2),`VBox (
        `VStretch (),
        `Frame (_("Boot Menu"),
          `HBox(
            `HSpacing(2),
            `VBox(
	      `Left("activate"),
	      `Left("generic_mbr"),
	      `HBox(
		  `VBox(`Left("debug"),
			`Left("hiddenmenu")
		  ),
		  `HSpacing(2),
		  `VBox(`Left("trusted_grub"),
			`Left("acoustic_signals")
		  )
	      ),
	      `Left("gfxmenu"),
	      `Left(`HSquash("timeout"))
            ),
            `HStretch()
          )
        ),
	//`VSpacing(1),
	`Left("password"),
	//`VSpacing(1),
        `Left("console"),
	`VStretch ()
        ),
     `HSpacing (2));

    list<string> widget_names = ["activate","debug","generic_mbr", "acoustic_signals",
       "trusted_grub","hiddenmenu","gfxmenu","timeout", "console","password"];
    string caption = _("Boot Loader Options");
    return CWM::ShowAndRun ($[
	"widget_descr" : GrubOptions(),
	"widget_names" : widget_names,
	"contents" : contents,
	"caption" : caption,
	"back_button" : Label::BackButton (),
	"abort_button" : Label::CancelButton (),
	"next_button" : Label::OKButton (),
    ]);
}

/**
 * Cache for genericWidgets function
 */
map<string,map<string,any> > _grub_widgets = nil;

/**
 * Get generic widgets
 * @return a map describing all generic widgets
 */
global map<string,map<string,any> > grubWidgets () {
    if (_grub_widgets == nil)
    {
	_grub_widgets = $[
	    "loader_location"	  : grubBootLoaderLocationWidget (),
	    "inst_details"	  : grubInstalationDetials (),
	];
    }
    return _grub_widgets;
}



} // EOF

ACC SHELL 2018