Author: ug Date: Tue May 11 15:11:47 2010 New Revision: 61995 URL: http://svn.opensuse.org/viewcvs/yast?rev=61995&view=rev Log: elements on an ask-dialog can be grouped by a frame now Modified: trunk/autoinstallation/doc/ASKSection.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/dialogs/ask.ycp Modified: trunk/autoinstallation/doc/ASKSection.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/ASKSection.xml?rev=61995&r1=61994&r2=61995&view=diff ============================================================================== --- trunk/autoinstallation/doc/ASKSection.xml (original) +++ trunk/autoinstallation/doc/ASKSection.xml Tue May 11 15:11:47 2010 @@ -176,7 +176,7 @@ <row> <entry>frametitle (available since SL 10.3 and SLES10 SP2)</entry> <entry>Since OpenSUSE 10.3 you can have more than one question per dialog. Each question on a dialog has - a frame that can have a frametitle. A small caption for each question if you want so. + a frame that can have a frametitle. A small caption for each question if you want so. Since openSUSE 11.3 you can put multiple elements into one frame. They have to have the same frametitle then. <para><screen><frametitle>User data</frametitle></screen></para></entry> <entry>optional (default is no frametitle)</entry> </row> Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=61995&r1=61994&r2=61995&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Tue May 11 15:11:47 2010 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue May 11 15:02:26 CEST 2010 - ug@suse.de + +- elements on an ask-dialog can be grouped by a frame now + +------------------------------------------------------------------- Wed Apr 28 14:02:30 CEST 2010 - ug@suse.de - old callback behavior (popups) for add-ons if no Modified: trunk/autoinstallation/src/dialogs/ask.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask.ycp?rev=61995&r1=61994&r2=61995&view=diff ============================================================================== --- trunk/autoinstallation/src/dialogs/ask.ycp (original) +++ trunk/autoinstallation/src/dialogs/ask.ycp Tue May 11 15:11:47 2010 @@ -31,9 +31,6 @@ define term createWidget( term widget, string frametitle ) { term ret = `Left( widget ); - if( frametitle != "" ) - ret = `Left( `Frame ( frametitle, widget ) ); - return ret; } @@ -83,6 +80,9 @@ integer element_cnt = 0; integer timeout = 0; history = add( history, dialog_nr ); + term frameBuffer = nil; + term frameBufferVBox = nil; + string frameBufferTitle = ""; foreach( map ask, (list<map>)dialogs[dialog_nr]:[], ``{ string pathStr = ask["path"]:""; string type = ask["type"]:""; @@ -149,9 +149,34 @@ } } } - dialog_term = add( dialog_term, dlg ); - dialog_term = add( dialog_term, `VSpacing(1) ); + if( frametitle != "" ) { + if( frameBuffer == nil ) { + frameBufferVBox = `VBox( dlg ); + } else { + if( frametitle == frameBufferTitle ) { + frameBufferVBox = add( frameBufferVBox, dlg ); + } else { + dialog_term = add( dialog_term, frameBuffer ); + dialog_term = add( dialog_term, `VSpacing(1) ); + frameBufferVBox = `VBox( dlg ); + } + } + frameBuffer = `Frame( frametitle, frameBufferVBox ); + frameBufferTitle = frametitle; + } else { + if( frameBuffer != nil ) { + dialog_term = add( dialog_term, frameBuffer ); + dialog_term = add( dialog_term, `VSpacing(1) ); + frameBuffer = nil; + frameBufferVBox = nil; + } + dialog_term = add( dialog_term, dlg ); + dialog_term = add( dialog_term, `VSpacing(1) ); + } }); + if( frameBuffer != nil ) + dialog_term = add( dialog_term, frameBuffer ); + if( helptext != "" ) help_term = `HWeight(30, `RichText( helptext )); if( title != "" ) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org