Author: gs Date: Thu Oct 23 16:52:30 2008 New Revision: 52469 URL: http://svn.opensuse.org/viewcvs/yast?rev=52469&view=rev Log: selectItem() added Modified: trunk/ncurses/src/NCComboBox.cc trunk/ncurses/src/NCComboBox.h Modified: trunk/ncurses/src/NCComboBox.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCComboBox.cc?rev=52469&r1=52468&r2=52469&view=diff ============================================================================== --- trunk/ncurses/src/NCComboBox.cc (original) +++ trunk/ncurses/src/NCComboBox.cc Thu Oct 23 16:52:30 2008 @@ -198,7 +198,6 @@ setText( strip ); index = idx; - break; } } @@ -229,6 +228,16 @@ Redraw(); } +void NCComboBox::selectItem( YItem * item, bool selected ) +{ + if ( item ) + { + YComboBox::selectItem( item, selected ); + + if ( selected ) + index = item->index(); + } +} string NCComboBox::text() { Modified: trunk/ncurses/src/NCComboBox.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCComboBox.h?rev=52469&r1=52468&r2=52469&view=diff ============================================================================== --- trunk/ncurses/src/NCComboBox.h (original) +++ trunk/ncurses/src/NCComboBox.h Thu Oct 23 16:52:30 2008 @@ -88,8 +88,10 @@ virtual ~NCComboBox(); virtual void addItem( YItem * item ); + virtual void selectItem( YItem * item, bool selected = true ); + void addItem( const string & label, bool selected ); - + virtual int preferredWidth(); virtual int preferredHeight(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org