summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/HighlightManager.cpp2
-rw-r--r--Swift/Controllers/HighlightManager.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp
index e2498dc..ed49e72 100644
--- a/Swift/Controllers/HighlightManager.cpp
+++ b/Swift/Controllers/HighlightManager.cpp
@@ -51,7 +51,7 @@ HighlightManager::HighlightManager(SettingsProvider* settings)
{
rules_ = boost::make_shared<HighlightRulesList>();
loadSettings();
- settings_->onSettingChanged.connect(boost::bind(&HighlightManager::handleSettingChanged, this, _1));
+ handleSettingChangedConnection_ = settings_->onSettingChanged.connect(boost::bind(&HighlightManager::handleSettingChanged, this, _1));
}
void HighlightManager::handleSettingChanged(const std::string& settingPath)
diff --git a/Swift/Controllers/HighlightManager.h b/Swift/Controllers/HighlightManager.h
index d37643d..c55990b 100644
--- a/Swift/Controllers/HighlightManager.h
+++ b/Swift/Controllers/HighlightManager.h
@@ -67,10 +67,12 @@ namespace Swift {
std::string rulesToString() const;
static std::vector<HighlightRule> getDefaultRules();
+ private:
SettingsProvider* settings_;
bool storingSettings_;
boost::shared_ptr<HighlightManager::HighlightRulesList> rules_;
+ boost::bsignals::scoped_connection handleSettingChangedConnection_;
};
typedef boost::shared_ptr<const HighlightManager::HighlightRulesList> HighlightRulesListPtr;