diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-30 19:15:29 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-30 19:15:29 -0800 |
commit | c760220b00e5a6dfc495623830365efab22384cf (patch) | |
tree | a07458551008f6c7208ede2c2742957417004fe7 /indra/newview/llimview.cpp | |
parent | 948af3093c93461d11ab6a76a8aab7ea10e377c6 (diff) | |
parent | 7c0eac93e7444bc1896f8ed0ee26888ff54a33bf (diff) |
Merge from product-engine
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2f88578739..be719c0a78 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -233,6 +233,12 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES break; } } + + // Update speakers list when connected + if (LLVoiceChannel::STATE_CONNECTED == new_state) + { + mSpeakers->update(true); + } } else // group || ad-hoc calls { @@ -445,6 +451,19 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, return true; } +bool LLIMModel::logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) +{ + if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) + { + LLLogChat::saveHistory(session_name, from, from_id, utf8_text); + return true; + } + else + { + return false; + } +} + bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) @@ -476,8 +495,7 @@ bool LLIMModel::proccessOnlineOfflineNotification( } bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) -{ + const std::string& utf8_text, bool log2file /* = true */) { LLIMSession* session = findIMSession(session_id); if (!session) @@ -486,7 +504,10 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co return false; } - addMessageSilently(*session, from, from_id, utf8_text, log2file); + addToHistory(session_id, from, from_id, utf8_text); + if (log2file) logToFile(session_id, from, from_id, utf8_text); + + session->mNumUnread++; // notify listeners LLSD arg; @@ -501,15 +522,6 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co return true; } -void LLIMModel::addMessageSilently(LLIMSession& session, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) -{ - addToHistory(session.mSessionID, from, from_id, utf8_text); - if (log2file) logToFile(session.mSessionID, from, from_id, utf8_text); - - session.mNumUnread++; -} - const std::string& LLIMModel::getName(const LLUUID& session_id) const { |