Hello,

I hope this is the right place to do this. I have a patch for the history
plugin to display a contacts name instead of '>' or '<'. It also makes those
names different colors so it's easier to differentiate who said what. I've
tested it with AIM and Yahoo (the only accounts I have except Jabber, which
I don't see an option for in the accounts menu) in Kopete 0.50.00 and it's
worked in both. This is a patch for
kopete/plugins/history/historydialog.cpp. This is the first patch I've ever
submitted so if I did anything wrong (likely) let me know and I'll try and
change it.

Thanks,
Aaron
--- historydialog.cpp	2008-01-25 10:50:26.000000000 -0800
+++ /home/kde-devel/kde/src/KDE/kdenetwork/kopete/plugins/history/historydialog.cpp	2008-01-25 12:27:24.000000000 -0800
@@ -362,10 +362,10 @@ void HistoryDialog::setMessages(QList<Ko
 				body = body.replace(mMainWidget->searchLine->text(), "<span style=\"background-color:yellow\">" + mMainWidget->searchLine->text() + "</span>", Qt::CaseInsensitive);
 			}
 
-			resultHTML += "(<b>" + msg.timestamp().time().toString() + "</b>) "
-				+ (msg.direction() == Kopete::Message::Outbound ?
-				"<font color=\"" + Kopete::AppearanceSettings::self()->chatTextColor().dark().name() + "\"><b>&gt;</b></font> "
-				: "<font color=\"" + Kopete::AppearanceSettings::self()->chatTextColor().light(200).name() + "\"><b>&lt;</b></font> ")
+			resultHTML += /*"(<b>" + msg.timestamp().time().toString() + "</b>) "
+				+ */(msg.direction() == Kopete::Message::Outbound ?
+				"<font color=\"red\"><b>" + msg.from()->metaContact()->displayName() + ":</b></font> "
+				: "<font color=\"blue\"><b>" + msg.from()->metaContact()->displayName()  + ":</b></font> ")
 				+ body + "<br/>";
 
 			newNode = mHtmlPart->document().createElement(QString::fromLatin1("span"));
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to