Author: kmachalkova Date: Wed Apr 16 10:24:25 2008 New Revision: 46696 URL: http://svn.opensuse.org/viewcvs/yast?rev=46696&view=rev Log: Generic tree dialog introduced - left help panel might be removed, but menu tree must stay (related to FaTE #303291) This fix has no bug ID assigned, it's for Uwe (and autoyast, of course :) ) Modified: trunk/yast2/library/wizard/src/Wizard.ycp Modified: trunk/yast2/library/wizard/src/Wizard.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/wizard/src/Wizard.y... ============================================================================== --- trunk/yast2/library/wizard/src/Wizard.ycp (original) +++ trunk/yast2/library/wizard/src/Wizard.ycp Wed Apr 16 10:24:25 2008 @@ -173,7 +173,6 @@ ); } - /** * @short Create a Generic Dialog * @@ -186,13 +185,10 @@ * @return term term describing the dialog. **/ global term GenericDialog( term button_box ) { - return `VBox( `id(`WizardDialog ), + return `VBox( `id(`WizardDialog), `ReplacePoint( `id(`topmenu ), `Empty() ), `HBox( `HSpacing(1), - // `HWeight( 30, `ReplacePoint( `id(`helpSpace), `RichText(`id(`HelpText), ""))), - // `HSpacing(1), - // `HWeight( 70, `VBox( `VBox( `VSpacing(0.2), `HBox( @@ -214,6 +210,46 @@ } + /** + * @short Create a Generic Tree Dialog + * + * @descr Returns a term describing a wizard dialog with left menu tree, + * right contents and a configurable button box. + * + * + * @stable + * + * @param button_box term that contains a `HBox() with buttons in it + * @return term term describing the dialog. + **/ + + global term GenericTreeDialog( term button_box ) { + return `VBox( `id(`WizardDialog), + `ReplacePoint( `id(`topmenu ), `Empty() ), + `HBox( + `HSpacing(1), + `HWeight( 30, `ReplacePoint( `id(`helpSpace), `Empty()/*`RichText(`id(`HelpText), "")*/)), + `HSpacing(1), + `HWeight( 70, `VBox( + `VSpacing(0.2), + `HBox( + // translators: dialog title to appear before any content is initialized + `Heading(`id(`title), `opt (`hstretch), _("YaST2\nInitializing ...")), + `HStretch() + ), + `VWeight( 1, // Layout trick: Lower layout priority with weight + `HVCenter(`opt(`hvstretch), + `ReplacePoint(`id(`contents), `Empty() ) + ) + ) + )), + `HSpacing(1) + ), + `ReplacePoint(`id(`rep_button_box), button_box ), + `VSpacing(0.2) + ); + } + /** * Check if the topmost dialog is a wizard dialog @@ -286,7 +322,7 @@ * @param dialog a wizard dialog, e.g. Wizard::GenericDialog() **/ global void OpenDialog( term dialog ) { - UI::OpenDialog( `opt(`wizardDialog ), dialog ); + UI::OpenDialog( `opt(`wizardDialog), dialog ); } @@ -471,7 +507,7 @@ if ( button_box == nil ) button_box = BackAbortNextButtonBox(); - UI::OpenDialog(`opt(`wizardDialog ), + UI::OpenDialog(`opt(`wizardDialog), GenericDialog( button_box ) ); if ( help_space_contents != nil ) @@ -1350,7 +1386,7 @@ } else { - Wizard::OpenDialog( NextBackDialog() ); + Wizard::OpenDialog( GenericTreeDialog( BackAbortNextButtonBox() ) ); UI::SetFocus(`id(`next) ); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org