Author: dmacvicar Date: Thu Apr 17 23:01:11 2008 New Revision: 46813 URL: http://svn.opensuse.org/viewcvs/yast?rev=46813&view=rev Log: - enable tooltips for repos. I cant show more because the string freeze Modified: trunk/qt-pkg/src/YQPkgRepoList.cc Modified: trunk/qt-pkg/src/YQPkgRepoList.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgRepoList.cc?rev=46813&r1=46812&r2=46813&view=diff ============================================================================== --- trunk/qt-pkg/src/YQPkgRepoList.cc (original) +++ trunk/qt-pkg/src/YQPkgRepoList.cc Thu Apr 17 23:01:11 2008 @@ -251,31 +251,41 @@ if ( ! name.empty() ) { - //if ( ! repo.info().baseUrlsEmpty() ) - // name += string("\n") + (*repo.info().baseUrlsBegin()).asString(); setText( nameCol(), fromUTF8( name )); } } - - if ( urlCol() >= 0 ) + + std::string infoToolTip; + infoToolTip += ("<b>" + repo.info().name() + "</b>"); + + if ( ! repo.info().baseUrlsEmpty() ) { - zypp::Url repoUrl; - - if ( ! repo.info().baseUrlsEmpty() ) - repoUrl = *repo.info().baseUrlsBegin(); - - //setText( urlCol(), repoUrl.asString().c_str() ); - setToolTip( 0, repoUrl.asString().c_str() ); - setToolTip( 1, repoUrl.asString().c_str() ); - } - + zypp::RepoInfo::urls_const_iterator it; + infoToolTip += "<ul>"; + + for ( it = repo.info().baseUrlsBegin(); + it != repo.info().baseUrlsEnd(); + ++it ) + { + infoToolTip += ("<li>" + (*it).asString() + "</li>"); + } + infoToolTip += "</ul>"; + } + setToolTip( nameCol(), infoToolTip.c_str() ); + QString iconPath; QString iconName = "yast-sw_source"; if ( ! repo.info().baseUrlsEmpty() ) { zypp::Url repoUrl = *repo.info().baseUrlsBegin(); + + if ( urlCol() >= 0 ) + { + setText( urlCol(), repoUrl.asString().c_str() ); + } + if (QString(repoUrl.asString().c_str()).contains("KDE") ) iconName = "pattern-kde"; if (QString(repoUrl.asString().c_str()).contains("GNOME") ) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org