[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/kopete/contactlist
From: Benson Tsai <btsai () vrwarp ! com>
Date: 2009-04-01 15:56:29
Message-ID: 1238601389.577514.19885.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 947913 by btsai:
make tooltips a little bit nicer
Squashed commit of the following:
commit efd903e03951152451fef76189ee7cdb7b1e69c3
Author: Benson Tsai <btsai@vrwarp.com>
Date: Wed Apr 1 11:49:09 2009 -0400
removed whitespace change
commit 395fd1b568880c05d22008d7922af2d455cb828b
Author: Benson Tsai <btsai@vrwarp.com>
Date: Wed Apr 1 11:45:22 2009 -0400
make metacontact tooltip try harder at getting the away message
commit 3317de5183f8b468c28f6ca6705f5bfc75dee886
Author: Benson Tsai <btsai@vrwarp.com>
Date: Wed Apr 1 11:41:00 2009 -0400
try harder!
commit 738c4a2de325fd939582f6a0ed894d3d1cc8b0f3
Author: Benson Tsai <btsai@vrwarp.com>
Date: Wed Apr 1 11:08:40 2009 -0400
put back a line that got delete by accident
commit 587232ec86c5e6c7c52efafc289be4c3be398b10
Author: Benson Tsai <btsai@vrwarp.com>
Date: Wed Apr 1 10:34:14 2009 -0400
slightly better tooltips with away messages
M +26 -6 contactlistmodel.cpp
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/contactlistmodel.cpp \
#947912:947913 @@ -568,7 +568,7 @@
QString ContactListModel::metaContactTooltip( const Kopete::MetaContact* metaContact \
) const {
// We begin with the meta contact display name at the top of the tooltip
- QString toolTip = QLatin1String("<qt><table cellpadding=\"0\" cellspacing=\"1\">");
+ QString toolTip = QLatin1String("<qt><table>");
toolTip += QLatin1String("<tr><td>");
if ( !metaContact->picture().isNull() )
@@ -581,7 +581,7 @@
//QMimeSourceFactory::defaultFactory()->setImage( "contactimg", \
metaContact->photo() ); toolTip += QString::fromLatin1("<img src=\"%1\">").arg( \
photoName ); #endif
- toolTip += QString::fromLatin1("<img src=\"%1\">").arg( \
metaContact->picture().path() ); + toolTip += QString::fromLatin1("<img \
src=\"%1\"> ").arg( metaContact->picture().path() ); }
toolTip += QLatin1String("</td><td>");
@@ -597,11 +597,11 @@
displayName += Qt::escape( (*it).text );
}
- toolTip += QString::fromLatin1("<b><font size=\"+1\">%1</font></b><br><br>").arg( \
displayName ); + toolTip += QString::fromLatin1("<b><font \
size=\"+1\">%1</font></b><br>").arg( displayName );
QList<Contact*> contacts = metaContact->contacts();
if ( contacts.count() == 1 )
- return toolTip + contacts.first()->toolTip() + \
QLatin1String("</td></tr></table></qt>"); + return toolTip + "<br>" + \
contacts.first()->toolTip() + QLatin1String("</td></tr></table></qt>");
toolTip += QLatin1String("<table>");
@@ -615,9 +615,29 @@
QString(QUrl::toPercentEncoding( c->contactId() ) )
);
+ QString name = Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString());
+
+ QString message = c->statusMessage().message();
+
+ // try harder!
+ if(message.isEmpty())
+ message = c->property(Kopete::Global::Properties::self()->statusMessage()).value().toString();
+
toolTip += i18nc("<tr><td>STATUS ICON <b>PROTOCOL NAME</b> (ACCOUNT \
NAME)</td><td>STATUS DESCRIPTION</td></tr>",
- "<tr><td><img \
src=\"%1\"> <nobr><b>%2</b></nobr> <nobr>(%3)</nobr></td><td \
align=\"right\"><nobr>%4</nobr></td></tr>",
- iconName, \
Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) \
, c->contactId(), c->onlineStatus().description() ); + "<tr \
style='white-space:pre'><td>" + "<img src=\"%1\"> "
+ "</td><td>"
+ "<b>%2</b> (%3)"
+ "</td><td align=\"right\">"
+ "%4"
+ "</td></tr>",
+ iconName, name, c->contactId(), c->onlineStatus().description());
+
+ if(!message.isEmpty()){
+ toolTip += i18nc("<tr><td><small><i>STATUS MESSAGE</i></small></td></tr>",
+ "<tr><td> </td><td \
colspan='2'><small><i>%1</i></small></td></tr>", + message);
+ }
}
return toolTip + QLatin1String("</table></td></tr></table></qt>");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic