From 4af098dacb3cedfb269c2443c5e1eeb76f1de82f Mon Sep 17 00:00:00 2001
From: Richard Maudsley <richard.maudsley@isode.com>
Date: Thu, 17 Jul 2014 08:59:34 +0100
Subject: Fix rule for highlighting messages from individual sender JID or MUC
nick.
Test-Information:
Set up rule to highlight chat messages from a sender. Confirm that when this is enabled the entire message text from that sender is highlighted and messages from other senders are displayed normally. Same test for Room/MUC messages. Confirm that for MUC nicks the comparison is case insensitive. Confirm that URL parsing and emoticon parsing stills works within highlighted messages.
Change-Id: I5bbf013df8efdd76f876c020fd3097adbfb45760
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index 134155c..a5f49c2 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -385,6 +385,7 @@ int QtHighlightEditor::getSelectedRow() const
HighlightRule QtHighlightEditor::ruleFromDialog()
{
HighlightRule rule;
+ HighlightAction& action = rule.getAction();
if (ui_.chatRadio->isChecked()) {
rule.setMatchChat(true);
@@ -400,6 +401,7 @@ HighlightRule QtHighlightEditor::ruleFromDialog()
std::vector<std::string> senders;
senders.push_back(Q2PSTRING(senderName));
rule.setSenders(senders);
+ action.setHighlightAllText(true);
}
}
@@ -421,8 +423,6 @@ HighlightRule QtHighlightEditor::ruleFromDialog()
rule.setMatchCase(ui_.matchCase->isChecked());
}
- HighlightAction& action = rule.getAction();
-
if (ui_.noColorRadio->isChecked()) {
action.setTextColor("");
action.setTextBackground("");
--
cgit v0.10.2-6-g49f6