[yast-commit] r41140 - /branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc
Author: gs Date: Thu Sep 27 15:31:19 2007 New Revision: 41140 URL: http://svn.opensuse.org/viewcvs/yast?rev=41140&view=rev Log: create NCPopupTextEntry with 'new' Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc?rev=41140&r1=41139&r2=41140&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc Thu Sep 27 15:31:19 2007 @@ -414,21 +414,24 @@ + "," + numstring( maxValue() ) + "]" ); string text( 1, (char )first); - NCPopupTextEntry dialog( at, label, text, vlen, 0, - NCInputField::NUMBER ); + NCPopupTextEntry * dialog = new NCPopupTextEntry( at, label, text, vlen, 0, + NCInputField::NUMBER ); - while ( dialog.post() != -1 ) { + while ( dialog->post() != -1 ) { - int nval = atoi( dialog.getText()->value().c_str() ); + int nval = atoi( dialog->value().c_str() ); if ( nval < minValue() ) { - dialog.setText( numstring( minValue() ) ); + dialog->setValue( numstring( minValue() ) ); } else if ( maxValue() < nval ) { - dialog.setText( numstring( maxValue() ) ); + dialog->setValue( numstring( maxValue() ) ); } else { setValue( nval ); break; } ::beep(); } + + YDialog::deleteTopmostDialog(); + return 0; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org