Author: gs Date: Tue Aug 7 15:00:07 2007 New Revision: 40055 URL: http://svn.opensuse.org/viewcvs/yast?rev=40055&view=rev Log: remove addChild() Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc?rev=40055&r1=40054&r2=40055&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc Tue Aug 7 15:00:07 2007 @@ -82,57 +82,53 @@ string okButtonLabel, string cancelButtonLabel ) { - + // FIXME - check all options YWidgetOpt opt; // the vertical split is the (only) child of the dialog NCLayoutBox * split = new NCLayoutBox( this, YD_VERT ); - addChild( split ); + + // addChild() is obsolete (handled by new libyui) // add the headline // opt.isHeading.setValue( true ); //NCLabel * head = new NCLabel( split, opt, headline ); - NCLabel * head = new NCLabel( split, headline, true, false ); // isHeading = true - split->addChild( head ); + new NCLabel( split, headline, true, false ); // isHeading = true // add the rich text widget helpText = new NCRichText( split, text ); - split->addChild( helpText ); NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ ); - split->addChild( hSplit ); + if ( okButtonLabel != "" && cancelButtonLabel != "" ) { opt.isHStretchable.setValue( true ); //hSplit->addChild( new NCSpacing( hSplit, opt, 0.4, true, false ) ); - hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ) ); // stretchable = true + new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ); // stretchable = true } if ( okButtonLabel != "" ) { - opt.key_Fxx.setValue( 10 ); + opt.key_Fxx.setValue( 10 ); // FIXME // add the OK button okButton = new NCPushButton( hSplit, okButtonLabel ); YStringWidgetID * okID = new YStringWidgetID (idOk->name() ); okButton->setId( okID ); - - hSplit->addChild( okButton ); } if ( cancelButtonLabel != "" ) { //hSplit->addChild( new NCSpacing( hSplit, opt, 0.4, true, false ) ); - hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ) ); + new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ); - opt.key_Fxx.setValue( 9 ); + opt.key_Fxx.setValue( 9 ); // FIXME // add the Cancel button cancelButton = new NCPushButton( hSplit, cancelButtonLabel ); YStringWidgetID * cancelID = new YStringWidgetID( cancelButtonLabel ); cancelButton->setId( cancelID ); - hSplit->addChild( cancelButton ); //hSplit->addChild( new NCSpacing( hSplit, opt, 0.4, true, false ) ); - hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ) ); + new NCSpacing( hSplit, YD_HORIZ, true, 0.4 ); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org