Author: ug
Date: Tue Jan 8 09:51:38 2008
New Revision: 43314
URL: http://svn.opensuse.org/viewcvs/yast?rev=43314&view=rev
Log:
experimental script feedback code changed
Modified:
trunk/autoinstallation/src/modules/AutoinstScripts.ycp
Modified: trunk/autoinstallation/src/modules/AutoinstScripts.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstScripts.ycp?rev=43314&r1=43313&r2=43314&view=diff
==============================================================================
--- trunk/autoinstallation/src/modules/AutoinstScripts.ycp (original)
+++ trunk/autoinstallation/src/modules/AutoinstScripts.ycp Tue Jan 8 09:51:38 2008
@@ -617,7 +617,7 @@
textdomain "autoinst";
define map splitParams( string s ) ``{
- list<string> l = splitstring( s, ":" );
+ list<string> l = splitstring( s, "|" );
map ret = $[];
l = remove( l, 0 );
foreach( string element, l, ``{
@@ -647,14 +647,11 @@
if( size(line) == 0 )
continue;
data["stdout"] = line;
+ y2milestone("working on line %1", line);
if( substring( data["stdout"]:"", 0, 8 ) == "__EXIT__" ) {
if ( widget == "radiobutton" ) {
vbox = add( vbox, `PushButton(`id(`ok), Label::OKButton() ) );
- UI::OpenDialog(
- `RadioButtonGroup(`id(`rb),
- vbox
- )
- );
+ UI::OpenDialog( `RadioButtonGroup(`id(`rb), vbox) );
}
if( ok_button == true ) {
UI::ChangeWidget(`id(`ok) , `Enabled, true);
@@ -662,6 +659,9 @@
if( widget == "radiobutton" ) {
any val = UI::QueryWidget(`id(`rb), `CurrentButton);
SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", val ), $[]);
+ } else if( widget == "entry" ) {
+ any val = UI::QueryWidget(`id(`ay_entry), `Value);
+ SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", (string)(val) ), $[]);
}
ok_button = false;
}
@@ -690,13 +690,21 @@
widget = "text";
} else if( substring( data["stdout"]:"", 0, 9 ) == "__ENTRY__" ) {
map params = splitParams( data["stdout"]:"" );
- UI::OpenDialog(
- `VBox( `TextEntry( `id(`ay_entry), params["label"]:"", params["default"]:"" ), `PushButton(`id(`ok), Label::OKButton() ) )
- );
- any ret = UI::UserInput();
- any val = UI::QueryWidget(`id(`ay_entry), `Value);
- SCR::Execute (.target.bash, sformat("echo \"%1\" > /tmp/ay_ipipe", (string)(val) ), $[]);
+ if( haskey( params, "description" ) ) {
+ vbox = add( vbox, `HSpacing(40) );
+ vbox = add( vbox, `RichText( params["description"]:"" ) );
+ }
+ vbox = add( vbox, `TextEntry( `id(`ay_entry), params["label"]:"", params["default"]:"" ) );
+ vbox = add( vbox, `PushButton(`id(`ok), Label::OKButton() ) );
+ UI::OpenDialog( vbox );
+ widget = "entry";
+ ok_button = true;
} else if( substring( data["stdout"]:"", 0, 15 ) == "__RADIOBUTTON__" ) {
+ map params = splitParams( data["stdout"]:"" );
+ if( haskey( params, "description" ) ) {
+ vbox = add( vbox, `HSpacing(60) );
+ vbox = add( vbox, `RichText( params["description"]:"" ) );
+ }
widget = "radiobutton";
ok_button = true;
} else {
@@ -722,6 +730,4 @@
UI::CloseDialog();
}
-
-
*/
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org