home *** CD-ROM | disk | FTP | other *** search
- /**
- * Module: vm_source_proposal.ycp
- *
- * Authors: Ladislav Slezak <lslezak@suse.cz>
- *
- * Purpose: Proposal for installation source configuration
- *
- * $Id: vm_source_proposal.ycp 29389 2006-03-26 05:40:23Z mgfritch $
- *
- */
- {
- textdomain "vm";
-
- import "VM";
- import "VM_Common";
- import "HTML";
-
- import "Report";
- Report::DisplayErrors(true, 0);
-
- 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::ResetSource();
- }
-
- ret = $[ "preformatted_proposal" : HTML::List(VM::GetSourceProposal()) ];
-
- map warn = VM::GetSourceProposalWarning();
- if (warn != nil && size(warn) > 0)
- {
- ret = union(ret, warn);
- }
- }
- else if ( func == "AskUser" )
- {
- boolean has_next = param["has_next"]:false;
-
- symbol result = (symbol) WFM::CallFunction ("inst_vm_source",
- [true, has_next]);
-
- ret = $[ "workflow_sequence" : result ];
- }
- else if ( func == "Description" )
- {
-
- if (VM_Common::proposal_type == "install") {
- ret = $[
- // this is a heading
- "rich_text_title" : _("Operating System Installation"),
- // this is a menu entry
- "menu_title" : _("Operating &System Installation"),
- "id" : "vm_source_stuff"
- ];
- }
- else if (VM::GetVirtualizationType() == "para") {
- ret = $[
- // this is a heading
- "rich_text_title" : _("Operating System Boot"),
- // this is a menu entry
- "menu_title" : _("Operating &System Boot"),
- "id" : "vm_source_stuff"
- ];
- }
- else {
- ret = $[];
- }
- }
-
- return ret;
- }
-