[yast-commit] r46823 - /trunk/ncurses-pkg/src/NCPkgFilterContainer.cc
Author: kmachalkova Date: Fri Apr 18 11:44:47 2008 New Revision: 46823 URL: http://svn.opensuse.org/viewcvs/yast?rev=46823&view=rev Log: Show pattern content Modified: trunk/ncurses-pkg/src/NCPkgFilterContainer.cc Modified: trunk/ncurses-pkg/src/NCPkgFilterContainer.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgFilterContainer.cc?rev=46823&r1=46822&r2=46823&view=diff ============================================================================== --- trunk/ncurses-pkg/src/NCPkgFilterContainer.cc (original) +++ trunk/ncurses-pkg/src/NCPkgFilterContainer.cc Fri Apr 18 11:44:47 2008 @@ -201,10 +201,32 @@ if (patPtr) { yuiMilestone() << "Show packages belonging to selected pattern: " << getCurrentLine() << endl; - zypp::ui::PatternContents patternContents( patPtr ); + NCPkgTable * packageList = packager->PackageList(); + + if ( !packageList ) + { + yuiError() << "Widget is not a valid NCPkgTable widget" << endl; + return; + } + packageList->itemsCleared (); + + // zypp::ui::PatternContents patternContents( patPtr ); packager->FilterDescription()->setText ( showDescription( objPtr ) ); - packages = patternContents.install_packages(); - + // packages = patternContents.install_packages(); + zypp::Pattern::Contents related ( patPtr->contents() ); + for ( zypp::Pattern::Contents::Selectable_iterator it = related.selectableBegin(); + it != related.selectableEnd(); + ++it ) + { + ZyppPkg zyppPkg = tryCastToZyppPkg( (*it)->theObj() ); + if ( zyppPkg ) + { + packageList->createListEntry( zyppPkg, *it ); + } + } + packageList->setCurrentItem( 0 ); + packageList->drawList(); + packageList->showInformation(); } #if 0 //FIXME else if (langPtr) @@ -242,7 +264,7 @@ } #endif - showContainerContent( packages ); + //showContainerContent( packages ); } } @@ -332,7 +354,9 @@ if ( !ptr1 || !ptr2 ) return false; else + { return ptr1->order() < ptr2->order(); + } } /////////////////////////////////////////////////////////////////// -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org