diff options
author | Tobias Markmann <tm@ayena.de> | 2015-10-26 13:00:29 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-10-30 15:50:52 (GMT) |
commit | 7f321edd9ada1f531b1fbc3325ef61449218f40c (patch) | |
tree | f0a1998447a41fa2cedff39edd1c179eefb4b298 /Swift/Controllers/HighlightManager.cpp | |
parent | 50a3962e4d0b16fd0316be54121cfb293c3117bd (diff) | |
download | swift-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/HighlightManager.cpp')
-rw-r--r-- | Swift/Controllers/HighlightManager.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp index ed49e72..e5c8cef 100644 --- a/Swift/Controllers/HighlightManager.cpp +++ b/Swift/Controllers/HighlightManager.cpp | |||
@@ -8,25 +8,27 @@ | |||
8 | * Copyright (c) 2014-2015 Isode Limited. | 8 | * Copyright (c) 2014-2015 Isode Limited. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <Swift/Controllers/HighlightManager.h> | ||
14 | |||
13 | #include <cassert> | 15 | #include <cassert> |
14 | 16 | ||
15 | #include <boost/algorithm/string.hpp> | 17 | #include <boost/algorithm/string.hpp> |
16 | #include <boost/regex.hpp> | 18 | #include <boost/archive/text_iarchive.hpp> |
19 | #include <boost/archive/text_oarchive.hpp> | ||
17 | #include <boost/bind.hpp> | 20 | #include <boost/bind.hpp> |
18 | #include <boost/numeric/conversion/cast.hpp> | 21 | #include <boost/numeric/conversion/cast.hpp> |
22 | #include <boost/regex.hpp> | ||
19 | #include <boost/serialization/vector.hpp> | 23 | #include <boost/serialization/vector.hpp> |
20 | #include <boost/archive/text_oarchive.hpp> | ||
21 | #include <boost/archive/text_iarchive.hpp> | ||
22 | 24 | ||
23 | #include <Swiften/Base/foreach.h> | 25 | #include <Swiften/Base/foreach.h> |
24 | #include <Swift/Controllers/HighlightManager.h> | 26 | |
25 | #include <Swift/Controllers/Highlighter.h> | 27 | #include <Swift/Controllers/Highlighter.h> |
26 | #include <Swift/Controllers/Settings/SettingsProvider.h> | ||
27 | #include <Swift/Controllers/SettingConstants.h> | 28 | #include <Swift/Controllers/SettingConstants.h> |
29 | #include <Swift/Controllers/Settings/SettingsProvider.h> | ||
28 | 30 | ||
29 | /* How does highlighting work? | 31 | /* How does highlighting work? |
30 | * | 32 | * |
31 | * HighlightManager manages a list of if-then rules used to highlight messages. | 33 | * HighlightManager manages a list of if-then rules used to highlight messages. |
32 | * Rule is represented by HighlightRule. Action ("then" part) is HighlightAction. | 34 | * Rule is represented by HighlightRule. Action ("then" part) is HighlightAction. |