summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-10-26 13:00:29 (GMT)
committerSwift Review <review@swift.im>2015-10-30 15:50:52 (GMT)
commit7f321edd9ada1f531b1fbc3325ef61449218f40c (patch)
treef0a1998447a41fa2cedff39edd1c179eefb4b298 /Swift/Controllers/HighlightAction.cpp
parent50a3962e4d0b16fd0316be54121cfb293c3117bd (diff)
downloadswift-7f321edd9ada1f531b1fbc3325ef61449218f40c.zip
swift-7f321edd9ada1f531b1fbc3325ef61449218f40c.tar.bz2
Only highlight text if a highlight color is set
This commit has the default rule set the default color and changes HighlightAction::highlightText_ symbol to HighlightAction::highlightWholeMessage_ as it is more descriptive of its use. Test-Information: Tested highlighting with the default rule set, and one with a highlight color set for the chat rule. Change-Id: Ic638e6347bdf6623ab5959341486233494f005f0
Diffstat (limited to 'Swift/Controllers/HighlightAction.cpp')
-rw-r--r--Swift/Controllers/HighlightAction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/HighlightAction.cpp b/Swift/Controllers/HighlightAction.cpp
index 80d9d85..4603408 100644
--- a/Swift/Controllers/HighlightAction.cpp
+++ b/Swift/Controllers/HighlightAction.cpp
@@ -14,10 +14,10 @@
namespace Swift {
-void HighlightAction::setHighlightAllText(bool highlightText)
+void HighlightAction::setHighlightWholeMessage(bool highlightText)
{
- highlightText_ = highlightText;
- if (!highlightText_) {
+ highlightWholeMessage_ = highlightText;
+ if (!highlightWholeMessage_) {
textColor_.clear();
textBackground_.clear();
}
@@ -32,7 +32,7 @@ void HighlightAction::setPlaySound(bool playSound)
}
bool operator ==(HighlightAction const& a, HighlightAction const& b) {
- if (a.highlightAllText() != b.highlightAllText()) {
+ if (a.highlightWholeMessage() != b.highlightWholeMessage()) {
return false;
}