[yast-commit] r67573 - /trunk/ncurses-pkg/src/NCPkgPackageDetails.cc
Author: gs Date: Wed Mar 7 12:06:20 2012 New Revision: 67573 URL: http://svn.opensuse.org/viewcvs/yast?rev=67573&view=rev Log: if available take installed pkg pointer to get package data Modified: trunk/ncurses-pkg/src/NCPkgPackageDetails.cc Modified: trunk/ncurses-pkg/src/NCPkgPackageDetails.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses-pkg/src/NCPkgPackageDetails.cc?rev=67573&r1=67572&r2=67573&view=diff ============================================================================== --- trunk/ncurses-pkg/src/NCPkgPackageDetails.cc (original) +++ trunk/ncurses-pkg/src/NCPkgPackageDetails.cc Wed Mar 7 12:06:20 2012 @@ -92,7 +92,10 @@ { if ( oneline && i < 999 ) { - text += ", "; + if ( boost::ends_with( text, ":" ) ) + text += " "; + else + text += ", "; } else { @@ -179,7 +182,15 @@ text += pkgPtr->installSize().asString(); text += " "; - ZyppPkg package = tryCastToZyppPkg (pkgPtr); + ZyppPkg package; + ZyppPkg candidate = tryCastToZyppPkg( slbPtr->candidateObj() ); + ZyppPkg installed = tryCastToZyppPkg( slbPtr->installedObj() ); + + if ( installed ) + package = installed; + else + package = candidate; + if ( package ) { // add the media nr @@ -211,11 +222,15 @@ list<string> authors = package->authors(); // zypp::Package if ( !authors.empty() ) { + string author_text; text += NCPkgStrings::Authors(); //authors, in one line - text += createText( authors, true ); + author_text = createText( authors, true ); + // escape html + boost::replace_all( author_text, "<", "<" ); + boost::replace_all( author_text, ">", ">" ); + text += author_text; } - } setValue (text); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn2.opensuse.org