Mailinglist Archive: yast-commit (815 mails)

< Previous Next >
[yast-commit] r39883 - in /branches/tmp/sh/mod-ui/ncurses/src: NCTree.cc NCTree.h
  • From: gs@xxxxxxxxxxxxxxxx
  • Date: Thu, 02 Aug 2007 08:48:31 -0000
  • Message-id: <20070802084831.DA176B586D@xxxxxxxxxxxxxxxx>
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/NCTree.cc?rev=39883&r1=39882&r2=39883&view=diff
==============================================================================
--- 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/NCTree.h?rev=39883&r1=39882&r2=39883&view=diff
==============================================================================
--- 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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages