Author: dmacvicar Date: Thu Apr 17 23:20:13 2008 New Revision: 46814 URL: http://svn.opensuse.org/viewcvs/yast?rev=46814&view=rev Log: - tooltip for patterns (description) Modified: trunk/qt-pkg/src/YQPkgPatternList.cc trunk/qt-pkg/src/YQPkgPatternList.h Modified: trunk/qt-pkg/src/YQPkgPatternList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgPatternList.cc?rev=46814&r1=46813&r2=46814&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgPatternList.cc (original) +++ trunk/qt-pkg/src/YQPkgPatternList.cc Thu Apr 17 23:20:13 2008 @@ -325,7 +325,6 @@ selection()->setInstalledPackages(installed); selection()->setTotalPackages(total); - selection()->setText( _summaryCol, QString().sprintf("%s (%d/%d)", zyppPattern->summary().c_str(), installed, total)); } } @@ -461,13 +460,16 @@ if (_zyppPattern) { string icon = _zyppPattern->icon().asString(); + // HACK most patterns have wrong default icon if ( icon == zypp::Pathname("yast-system").asString() ) icon = "pattern-generic"; + // FIXME find the icon in a sane way setIcon(_patternList->iconCol(), QIcon(QString("/usr/share/icons/hicolor/32x32/apps/") + icon.c_str() + QString(".png"))); } setStatusIcon(); + resetToolTip(); setFirstColumnSpanned ( false ); } @@ -480,6 +482,17 @@ void +YQPkgPatternListItem::resetToolTip() +{ + std::string infoToolTip; + infoToolTip += ("<p>" + zyppPattern()->description() + "</p>"); + setToolTip(_patternList->summaryCol(), infoToolTip.c_str()); + +// setTooltip( _summaryCol, QString().sprintf("%s (%d/%d)", zyppPattern->summary().c_str(), installed, total)); + +} + +void YQPkgPatternListItem::applyChanges() { solveResolvableCollections(); Modified: trunk/qt-pkg/src/YQPkgPatternList.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgPatternList.h?rev=46814&r1=46813&r2=46814&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgPatternList.h (original) +++ trunk/qt-pkg/src/YQPkgPatternList.h Thu Apr 17 23:20:13 2008 @@ -196,6 +196,11 @@ void setTotalPackages(int v) { _total = v; } void setInstalledPackages(int v) { _installed = v; } + /** + * resets the tooltip with the current available information + */ + void resetToolTip(); + protected: /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org