diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-12-20 19:57:51 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-12-20 19:57:51 +0200 |
commit | d1898ef3b8cf1344bd1f3980b500d4d2f5c10593 (patch) | |
tree | 6ef00ad748a027bc96e209d267ab935bec61e53f /indra | |
parent | f26f9274771e3446990131c930591153b0bd3ae4 (diff) |
CHUI-605 : Fixed : Keep conversation log requires restart to change preference: connected LLConversationLog::enableLogging() as listener to "LogInstantMessages" control changes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llconversationlog.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 1171b3db41..eb3a3731ee 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -187,16 +187,23 @@ void LLConversationLogFriendObserver::changed(U32 mask) LLConversationLog::LLConversationLog() { - LLControlVariable* ctrl = gSavedPerAccountSettings.getControl("LogInstantMessages").get(); - if (ctrl) + LLControlVariable* log_instant_message = gSavedPerAccountSettings.getControl("LogInstantMessages").get(); + LLControlVariable* keep_convers_log = gSavedSettings.getControl("KeepConversationLogTranscripts").get(); + bool is_log_message = false; + bool is_keep_log = false; + + if (log_instant_message) { - ctrl->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); - if (ctrl->getValue().asBoolean() - && gSavedSettings.getBOOL("KeepConversationLogTranscripts")) - { - enableLogging(true); - } + log_instant_message->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); + is_log_message = log_instant_message->getValue().asBoolean(); } + if (keep_convers_log) + { + keep_convers_log->getSignal()->connect(boost::bind(&LLConversationLog::enableLogging, this, _2)); + is_keep_log = keep_convers_log->getValue().asBoolean(); + } + + enableLogging(is_log_message && is_keep_log); } void LLConversationLog::enableLogging(bool enable) |