Author: sh-sh-sh Date: Thu Sep 4 15:36:21 2008 New Revision: 50686 URL: http://svn.opensuse.org/viewcvs/yast?rev=50686&view=rev Log: Added `opt(`relaxSanityCheck) for `ButtonBox (bnc #422612) Added: trunk/ycp-ui-bindings/examples/ButtonBox3-relaxed.ycp Modified: trunk/ycp-ui-bindings/VERSION trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes trunk/ycp-ui-bindings/src/YCPDialogParser.cc trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in Modified: trunk/ycp-ui-bindings/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/VERSION?rev=50686&r1=50685&r2=50686&view=diff ============================================================================== --- trunk/ycp-ui-bindings/VERSION (original) +++ trunk/ycp-ui-bindings/VERSION Thu Sep 4 15:36:21 2008 @@ -1 +1 @@ -2.17.3 +2.17.4 Added: trunk/ycp-ui-bindings/examples/ButtonBox3-relaxed.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/examples/ButtonBox3-relaxed.ycp?rev=50686&view=auto ============================================================================== --- trunk/ycp-ui-bindings/examples/ButtonBox3-relaxed.ycp (added) +++ trunk/ycp-ui-bindings/examples/ButtonBox3-relaxed.ycp Thu Sep 4 15:36:21 2008 @@ -0,0 +1,21 @@ +// Example for ButtonBox: Relaxed sanity check. +// +// Normally, a ButtonBox with more than one button is required to have one +// `okButton and one `cancelButton. With `opt(`relaxSanityCheck), this +// requirement is not enforced. +// +// Still, that option should only be used in very rare exceptions. +{ + UI::OpenDialog(`VBox( + `HVCenter( + `Label( "Error: Your CPU is under water." ) + ), + `ButtonBox(`opt(`relaxSanityCheck), + `PushButton(`id(`ok), "&OK" ), + `PushButton(`id(`details), "&Details..." ) + ) + ) + ); + UI::UserInput(); + UI::CloseDialog(); +} Modified: trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes?rev=50686&r1=50685&r2=50686&view=diff ============================================================================== --- trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes (original) +++ trunk/ycp-ui-bindings/package/yast2-ycp-ui-bindings.changes Thu Sep 4 15:36:21 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Sep 4 15:34:30 CEST 2008 - sh@suse.de + +- Added `opt(`relaxSanityCheck) for `ButtonBox (bnc #422612) +- V 2.17.4 + +------------------------------------------------------------------- Thu Aug 21 18:45:43 CEST 2008 - sh@suse.de - Added support for new YButtonBox widget (fate #303446) Modified: trunk/ycp-ui-bindings/src/YCPDialogParser.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/src/YCPDialogParser.cc?rev=50686&r1=50685&r2=50686&view=diff ============================================================================== --- trunk/ycp-ui-bindings/src/YCPDialogParser.cc (original) +++ trunk/ycp-ui-bindings/src/YCPDialogParser.cc Thu Sep 4 15:36:21 2008 @@ -1069,15 +1069,16 @@ { // Parse options - bool debugLayout = false; + bool relaxSanityCheck = false; for ( int o=0; o < optList->size(); o++ ) { - if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_debugLayout ) debugLayout = true; + if ( optList->value(o)->isSymbol() && optList->value(o)->asSymbol()->symbol() == YUIOpt_relaxSanityCheck ) relaxSanityCheck = true; else logUnknownOption( term, optList->value(o) ); } YButtonBox * buttonBox = YUI::widgetFactory()->createButtonBox( parent ); + YUI_CHECK_NEW( buttonBox ); for ( int buttonNo=argnr; buttonNo < term->size(); buttonNo++ ) { @@ -1127,6 +1128,12 @@ try { + if ( relaxSanityCheck ) + { + yuiMilestone() << "Relaxed sanity check for " << buttonBox << endl; + buttonBox->setSanityCheckRelaxed( relaxSanityCheck ); + } + buttonBox->sanityCheck(); } catch ( YUIException & exception ) Modified: trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in?rev=50686&r1=50685&r2=50686&view=diff ============================================================================== --- trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in (original) +++ trunk/ycp-ui-bindings/yast2-ycp-ui-bindings.spec.in Thu Sep 4 15:36:21 2008 @@ -19,8 +19,8 @@ # libycp includes crypto built-ins BuildRequires: libxcrypt-devel -Requires: yast2-libyui >= 2.17.6 -BuildRequires: yast2-libyui-devel >= 2.17.6 +Requires: yast2-libyui >= 2.17.7 +BuildRequires: yast2-libyui-devel >= 2.17.7 # libyui ImplPtr BuildRequires: boost-devel -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org