diff options
author | Tobias Markmann <tm@ayena.de> | 2015-01-18 19:22:59 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-02-05 15:33:09 (GMT) |
commit | 7d2ee8a852ca25f094ab003061d330a576a4806b (patch) | |
tree | 1d343b903297d547ff10a0b54992b9fbeed06f18 /Swift | |
parent | edfd69a55e4f52576ab58306da8a82b1df890d5f (diff) | |
download | swift-7d2ee8a852ca25f094ab003061d330a576a4806b.zip swift-7d2ee8a852ca25f094ab003061d330a576a4806b.tar.bz2 |
Add default hightlight rule that matches for the own nickname
Test-Information:
Tested on OS X 10.9.5.
Change-Id: I2ed72f0147a1dacd6e146e4d3b4c2d05ea1c7a85
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/Controllers/HighlightManager.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp index 383f5df..e2498dc 100644 --- a/Swift/Controllers/HighlightManager.cpp +++ b/Swift/Controllers/HighlightManager.cpp @@ -72,11 +72,21 @@ std::string HighlightManager::rulesToString() const std::vector<HighlightRule> HighlightManager::getDefaultRules() { std::vector<HighlightRule> rules; - HighlightRule r; - r.setMatchChat(true); - r.getAction().setPlaySound(true); - r.setMatchWholeWords(true); - rules.push_back(r); + + HighlightRule chatNotificationRule; + chatNotificationRule.setMatchChat(true); + chatNotificationRule.getAction().setPlaySound(true); + chatNotificationRule.setMatchWholeWords(true); + rules.push_back(chatNotificationRule); + + HighlightRule selfMentionMUCRule; + selfMentionMUCRule.setMatchMUC(true); + selfMentionMUCRule.getAction().setPlaySound(true); + selfMentionMUCRule.setNickIsKeyword(true); + selfMentionMUCRule.setMatchCase(true); + selfMentionMUCRule.setMatchWholeWords(true); + rules.push_back(selfMentionMUCRule); + return rules; } |