ACC SHELL
/**
* Module: inst_media.ycp
*
* Authors: Arvin Schnell <arvin@suse.de>
*
* Purpose: Show some stuff about the installation media.
*
* $Id: inst_media.ycp 39526 2007-07-19 11:46:47Z lslezak $
*
*/
{
textdomain "packager";
import "Label";
import "Popup";
import "Wizard";
import "Packages";
import "String";
list source_list = [];
integer num = size (Packages::theSources);
if (num <= 0)
{
y2error ("Invalid repository");
}
else
{
foreach (integer i, Packages::theSources, {
map new_product = Pkg::SourceProductData (i);
source_list = add (source_list,
`item (`id (i), new_product["label"]:_("Unknown")));
});
}
// screen title
string title = _("Installation Media");
// label for showing repositories
string label = _("Registered Repositories");
// help text for dialog to show repositories
string help_text = _("<p>All registered repositories are shown here.
</p>
");
term contents =
`VBox (
`HCenter (
`HSquash (
`VBox (
`HSpacing( 40 ), // force minimum width
`Left (`Label (label)),
`Table (`id (`sources),
// table header
`header (_("Name")),
source_list)
)
)
),
`VSpacing (2)
);
Wizard::OpenAcceptDialog ();
Wizard::SetContents (title, contents, help_text,
(boolean) WFM::Args(0), (boolean) WFM::Args(1));
any ret = nil;
while (true)
{
ret = Wizard::UserInput ();
if (ret == `abort && Popup::ConfirmAbort (`painless))
break;
if (ret == `cancel || ret == `back || ret == `next)
break;
}
Wizard::CloseDialog ();
return ret;
}
ACC SHELL 2018