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
/
keyboard_proposal.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
93 lines
/**
* File: keyboard_proposal.ycp
*
* $Id: keyboard_proposal.ycp 25808 2005-10-05 15:13:41Z jsuchome $
*
* Author: Klaus Kaempf <kkaempf@suse.de>
*
* Purpose: Proposal function dispatcher - keyboard.
*
* See also file proposal-API.txt for details.
*/
{
textdomain "country";
import "Arch";
import "Keyboard";
import "Wizard";
include "keyboard/dialogs.ycp";
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;
// call some function that makes a proposal here:
//
// DummyMod::MakeProposal( force_reset );
// Fill return map
ret =
$[
"raw_proposal" : [ Keyboard::MakeProposal( force_reset, language_changed ) ],
"language_changed": false
];
}
else if ( func == "AskUser" )
{
if (Arch::s390 ())
{
ret = $[
"workflow_sequence" : `next,
"language_changed" : false
];
return ret;
}
if (!Keyboard::CalledRestore())
{
Keyboard::Restore();
}
Keyboard::Read (); // save the inital values
map argmap = $[
"enable_back" : true,
"enable_next" : param["has_next"]:false
];
Wizard::OpenAcceptDialog();
symbol result = KeyboardDialog (argmap);
Wizard::CloseDialog ();
// Fill return map
ret = $[
"workflow_sequence" : result,
"language_changed" : false
];
}
else if ( func == "Description" )
{
// Fill return map.
//
// Static values do just nicely here, no need to call a function.
ret =
$[
// summary item
"rich_text_title" : _("Keyboard Layout"),
// menue label text
"menu_title" : _("&Keyboard Layout"),
"id" : "keyboard_stuff"
];
}
return ret;
}