summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/HighlightManager.cpp')
-rw-r--r--Swift/Controllers/HighlightManager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp
index ee1e9ed..383f5df 100644
--- a/Swift/Controllers/HighlightManager.cpp
+++ b/Swift/Controllers/HighlightManager.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -75,6 +75,7 @@ std::vector<HighlightRule> HighlightManager::getDefaultRules()
HighlightRule r;
r.setMatchChat(true);
r.getAction().setPlaySound(true);
+ r.setMatchWholeWords(true);
rules.push_back(r);
return rules;
}
@@ -136,4 +137,12 @@ Highlighter* HighlightManager::createHighlighter()
return new Highlighter(this);
}
+bool HighlightManager::isDefaultRulesList() const {
+ return getDefaultRules() == rules_->list_;
+}
+
+void HighlightManager::resetToDefaultRulesList() {
+ rules_->list_ = getDefaultRules();
+}
+
}