Bug 141208

Summary: potential tool tip format fixes / enhancements
Product: [Unmaintained] kopete Reporter: Carmelo Piccione <carmelo.piccione>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Carmelo Piccione 2007-02-05 05:46:37 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc64 4.1 athlon64
OS:                Linux

I started working on fixing that html parsing bug in the Away Message tool tip that "sort of" seems resolved but not quite. In any event, I have a solution that seems to work correctly. I thought that since it wasn't in latest svn, it probably wasn't actually fixed yet. Am I wrong about this?

Additionally, I thought that given the capabilities of the user to fiddle with all sorts of HTML formating options when constructing an away message, it may make sense to *encapsulate* the away message text properly rather than just trailing the text arbitrarily after the "Away Message:" header. 

In the spirit of this idea, I indented and encapsulated the entire away message. What do you guys think? Does it make the formatting safer or at least more aesthetic? I'm not an HTML expert by ANY means, but I think my code may inspire a  web savvy person into improving it.

Finally, Emoticon support was added to the "Full Name" tool tip.

Diff is below.

Thanks,
Carmelo

--- tmp/kde-carm/kdevelopWOCVHh/pwD32m/kopetecontact.cpp	2007-02-04 21:32:52.000000000 -0700
+++ home/carm/projects/kdenetwork/kopete/libkopete/kopetecontact.cpp	2007-02-04 21:29:10.000000000 -0700
@@ -679,7 +679,7 @@
 			if(!name.isEmpty())
 			{
 				tip += i18n("<br><b>Full Name:</b>&nbsp;FORMATTED NAME",
-							"<br><b>Full Name:</b>&nbsp;<nobr>%1</nobr>").arg(QStyleSheet::escape(name));
+							"<br><b>Full Name:</b>&nbsp;<nobr>%1</nobr>").arg(Kopete::Emoticons::parseEmoticons(QStyleSheet::escape(name)));
 			}
 		}
 		else if ((*it) == QString::fromLatin1("FormattedIdleTime"))
@@ -696,6 +696,7 @@
 			QString url = property(*it).value().toString();
 			if(!url.isEmpty())
 			{
+
 				tip += i18n("<br><b>Home Page:</b>&nbsp;FORMATTED URL",
 					"<br><b>Home Page:</b>&nbsp;<a href=\"%1\"><nobr>%2</nobr></a>").
 						arg( KURL::encode_string( url ), Kopete::Message::escape( QStyleSheet::escape(url) ) );
@@ -706,9 +707,13 @@
 			QString awaymsg = property(*it).value().toString();
 			if(!awaymsg.isEmpty())
 			{
+
 				tip += i18n("<br><b>Away Message:</b>&nbsp;FORMATTED AWAY MESSAGE",
-							"<br><b>Away&nbsp;Message:</b>&nbsp;%1").arg ( Kopete::Emoticons::parseEmoticons( Kopete::Message::escape(awaymsg) ) );
+							"<br><b>Away&nbsp;Message:</b><table border=\"0\"><tr><td width=\"10\"></td><td>%1</td></tr></table>").arg ( Kopete::Emoticons::parseEmoticons( awaymsg ) );
+
+
 			}
+
 		}
 		else
 		{
Comment 1 Benjamin Selinger 2007-02-07 09:33:11 UTC
Good work Mr. Carm.
A few people running my boxes had mentioned this bug to me.
Looks hawt.
I think we should work out a cleaner method of condensing long Alias's as well.
Comment 2 Christoph Cullmann 2024-09-18 18:34:50 UTC
Dear user, unfortunately Kopete is no longer maintained.

Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat.