[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:23:27 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=cdb416c
The following commit has been merged in the master branch:
commit cdb416c04da71881ee52d06a9a5147ebf2b64b3d
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Wed Mar 6 04:06:45 2013 +0000
Use theme to highlight messages
Rather than hardcoding red, pass a special messageClass to the theme which highlights it for us
Looks better, and is theme dependant.
REVIEW: 109309
BUG: 316172
---
filters/highlight/highlight-filter.cpp | 6 ------
lib/chat-widget.cpp | 4 ++++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/filters/highlight/highlight-filter.cpp b/filters/highlight/highlight-filter.cpp
index f58a0bb..83cd87b 100644
--- a/filters/highlight/highlight-filter.cpp
+++ b/filters/highlight/highlight-filter.cpp
@@ -56,12 +56,6 @@ void HighlightFilter::filterMessage(KTp::Message &message,
kDebug() << "messge contains user login name" << d->user.loginName();
message.setProperty("highlight", true);
}
-
- if (message.property("highlight").toBool()){
- msg = QLatin1Literal("<div style='color:red;'>") % msg %
- QLatin1Literal("</div>");
- message.setMainMessagePart(msg);
- }
}
K_PLUGIN_FACTORY(MessageFilterFactory, registerPlugin<HighlightFilter>();)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index 1d02787..4416d68 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -630,6 +630,10 @@ void ChatWidget::handleIncomingMessage(const Tp::ReceivedMessage &message)
}
messageInfo.setTime(time);
+ if (processedMessage.property("highlight").toBool()) {
+ messageInfo.appendMessageClass(QLatin1String("mention"));
+ }
+
//sender can have just an ID or be a full contactPtr. Use full contact info if available.
if (message.sender().isNull()) {
messageInfo.setSenderDisplayName(message.senderNickname());
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list