home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
clients
/
vm_disks_proposal.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
71 lines
/**
* Module: vm_disks_proposal.ycp
*
* Authors: Ladislav Slezak <lslezak@suse.cz>
*
* Purpose: Proposal for virtual disk configuration
*
* $Id: vm_disks_proposal.ycp 29389 2006-03-26 05:40:23Z mgfritch $
*
*/
{
textdomain "vm";
import "VM";
import "VM_Common";
import "HTML";
string func = (string) WFM::Args (0);
map param = (map) WFM::Args (1);
map ret = $[];
if ( func == "MakeProposal" )
{
boolean force_reset = param["force_reset" ]:false;
boolean language_changed = param["language_changed"]:false;
if (force_reset)
{
VM::ResetDiskConfig();
}
list<string> tmp = VM::GetDiskProposal();
ret = VM::GetDiskProposalWarning();
ret = add(ret, "preformatted_proposal", HTML::List(tmp));
}
else if ( func == "AskUser" )
{
boolean has_next = param["has_next"]:false;
// call some function that displays a user dialog
// or a sequence of dialogs here:
//
// sequence = DummyMod::AskUser( has_next );
symbol result = (symbol) WFM::CallFunction ("inst_vm_disks",
[true, has_next]);
// Fill return map
ret = $[ "workflow_sequence" : result ];
}
else if ( func == "Description" )
{
if (VM_Common::proposal_type == "boot")
ret = $[];
else
ret =
$[
// this is a heading
"rich_text_title" : _("Disks"),
// this is a menu entry
"menu_title" : _("&Disks"),
"id" : "vm_disk_stuff"
];
}
return ret;
}