Author: ug
Date: Mon May 10 15:30:52 2010
New Revision: 61977
URL: http://svn.opensuse.org/viewcvs/yast?rev=61977&view=rev
Log:
more cleanup
Modified:
trunk/autoinstallation/src/dialogs/ask.ycp
Modified: trunk/autoinstallation/src/dialogs/ask.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask.ycp?rev=61977&r1=61976&r2=61977&view=diff
==============================================================================
--- trunk/autoinstallation/src/dialogs/ask.ycp (original)
+++ trunk/autoinstallation/src/dialogs/ask.ycp Mon May 10 15:30:52 2010
@@ -28,6 +28,15 @@
return pos;
}
+ define term createWidget( term widget, string frametitle ) {
+ term ret = `Left( widget );
+
+ if( frametitle != "" )
+ ret = `Left( `Frame ( frametitle, widget ) );
+
+ return ret;
+ }
+
define boolean askDialog() {
boolean mod = false;
@@ -108,11 +117,7 @@
if( type == "boolean" ) {
boolean on=(ask["default"]:nil=="true")?(true):(false);
term widget = `CheckBox(`id(entry_id), `opt(`notify), question,on );
- if( frametitle != "" ) {
- dlg = `Left( `Frame ( frametitle, widget ) );
- } else {
- dlg = `Left( widget );
- }
+ dlg = createWidget( widget, frametitle );
} else if( type == "symbol" ) {
list<any> dummy = [];
foreach( map