summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/HighlightAction.cpp8
-rw-r--r--Swift/Controllers/HighlightAction.h14
-rw-r--r--Swift/Controllers/HighlightManager.cpp12
3 files changed, 18 insertions, 16 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;
}
diff --git a/Swift/Controllers/HighlightAction.h b/Swift/Controllers/HighlightAction.h
index a9e0cee..3930eee 100644
--- a/Swift/Controllers/HighlightAction.h
+++ b/Swift/Controllers/HighlightAction.h
@@ -14,8 +14,8 @@
#include <string>
-#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
+#include <boost/archive/text_oarchive.hpp>
namespace Swift {
@@ -23,13 +23,13 @@ namespace Swift {
class HighlightAction {
public:
- HighlightAction() : highlightText_(false), playSound_(false) {}
+ HighlightAction() : highlightWholeMessage_(false), playSound_(false) {}
/**
* Gets the flag that indicates the entire message should be highlighted.
*/
- bool highlightAllText() const { return highlightText_; }
- void setHighlightAllText(bool highlightText);
+ bool highlightWholeMessage() const { return highlightWholeMessage_; }
+ void setHighlightWholeMessage(bool highlightText);
/**
* Gets the foreground highlight color.
@@ -52,13 +52,13 @@ namespace Swift {
const std::string& getSoundFile() const { return soundFile_; }
void setSoundFile(const std::string& soundFile) { soundFile_ = soundFile; }
- bool isEmpty() const { return !highlightText_ && !playSound_; }
+ bool isEmpty() const { return !highlightWholeMessage_ && !playSound_; }
private:
friend class boost::serialization::access;
template<class Archive> void serialize(Archive & ar, const unsigned int version);
- bool highlightText_;
+ bool highlightWholeMessage_;
std::string textColor_;
std::string textBackground_;
@@ -72,7 +72,7 @@ namespace Swift {
template<class Archive>
void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/)
{
- ar & highlightText_;
+ ar & highlightWholeMessage_;
ar & textColor_;
ar & textBackground_;
ar & playSound_;
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
@@ -10,21 +10,23 @@
* See the COPYING file for more information.
*/
+#include <Swift/Controllers/HighlightManager.h>
+
#include <cassert>
#include <boost/algorithm/string.hpp>
-#include <boost/regex.hpp>
+#include <boost/archive/text_iarchive.hpp>
+#include <boost/archive/text_oarchive.hpp>
#include <boost/bind.hpp>
#include <boost/numeric/conversion/cast.hpp>
+#include <boost/regex.hpp>
#include <boost/serialization/vector.hpp>
-#include <boost/archive/text_oarchive.hpp>
-#include <boost/archive/text_iarchive.hpp>
#include <Swiften/Base/foreach.h>
-#include <Swift/Controllers/HighlightManager.h>
+
#include <Swift/Controllers/Highlighter.h>
-#include <Swift/Controllers/Settings/SettingsProvider.h>
#include <Swift/Controllers/SettingConstants.h>
+#include <Swift/Controllers/Settings/SettingsProvider.h>
/* How does highlighting work?
*