[yast-commit] r39883 - in /branches/tmp/sh/mod-ui/ncurses/src: NCTree.cc NCTree.h
![](https://seccdn.libravatar.org/avatar/9d45ad4c714db4d170a42527a4a6b8dc.jpg?s=120&d=mm&r=g)
Author: gs Date: Thu Aug 2 10:48:31 2007 New Revision: 39883 URL: http://svn.opensuse.org/viewcvs/yast?rev=39883&view=rev Log: use correct iterators Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc branches/tmp/sh/mod-ui/ncurses/src/NCTree.h Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTr... ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc Thu Aug 2 10:48:31 2007 @@ -375,42 +375,36 @@ /////////////////////////////////////////////////////////////////// // // -// METHOD NAME : NCTree::DrawPad +// METHOD NAME : NCTree::Dit // METHOD TYPE : void // // DESCRIPTION : // -// -// FOXME - was static Dit() -// void NCTree::Dit( NCTreeLine * p, NCTreePad * pad, YTreeItem * item ) { - NCTreeLine * c = new NCTreeLine( p, *item ); - pad->Append( c ); - // FIXME ??? -#if 0 - for ( YTreeItemListConstIterator it = item->itemList().begin(); - it < item->itemList().end(); ++it ) { - Dit( c, pad, *it ); - } -#endif - for ( YItemIterator it = itemsBegin(); it < itemsEnd(); ++it ) + NCTreeLine * c = new NCTreeLine( p, *item ); + + pad->Append( c ); + + // iterate over children + for ( YItemIterator it = item->childrenBegin(); it < item->childrenEnd(); ++it ) { - Dit( c, pad, (YTreeItem *)(*it) ); // FIXME ??? + Dit( c, pad, (YTreeItem *)(*it) ); } } void NCTree::DrawPad() { -#if 0 - for ( YTreeItemListIterator it = items.begin(); it < items.end(); ++it ) { - Dit( 0, myPad(), *it ); + if ( !myPad() ) + { + NCERR << "PadWidget not valid" << endl; + return; } -#endif - // FIXME ??? + + // YItemIterator iterates over the toplevel items for ( YItemIterator it = itemsBegin(); it < itemsEnd(); ++it ) { - Dit( 0, myPad(), (YTreeItem *)(*it) ); // FIXME ??? + Dit( 0, myPad(), (YTreeItem *)(*it) ); } NCPadWidget::DrawPad(); Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTree.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTr... ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCTree.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCTree.h Thu Aug 2 10:48:31 2007 @@ -40,6 +40,9 @@ NCTree & operator=( const NCTree & ); NCTree ( const NCTree & ); + private: + void Dit( NCTreeLine * p, NCTreePad * pad, YTreeItem * item ); + protected: virtual NCTreePad * myPad () const @@ -54,8 +57,7 @@ virtual NCPad * CreatePad(); virtual void DrawPad(); - void Dit( NCTreeLine * p, NCTreePad * pad, YTreeItem * item ); - + protected: virtual void startMultipleChanges() { startMultidraw(); } -- 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