diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/newview/llfloaterimnearbychathandler.cpp | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/newview/llfloaterimnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llfloaterimnearbychathandler.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index cda71f97d4..03177f6480 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -123,7 +123,7 @@ protected: { if (!toast) return; LL_DEBUGS("NearbyChat") << "Pooling toast" << LL_ENDL; - toast->setVisible(FALSE); + toast->setVisible(false); toast->stopTimer(); toast->setIsHidden(true); @@ -282,7 +282,7 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { //look in pool. if there is any message - if(mStopProcessing) + if (mStopProcessing) return; if (mFloaterSnapRegion == NULL) @@ -297,7 +297,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) find last toast and check ID */ - if(m_active_toasts.size()) + if (m_active_toasts.size()) { LLUUID fromID = chat["from_id"].asUUID(); // agent id or object id std::string from = chat["from"].asString(); @@ -307,7 +307,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); - if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->isFromScript() == is_lua && panel->canAddText()) + if (panel && panel->messageID() == fromID && panel->getFromName() == from && panel->isFromScript() == is_lua && panel->canAddText()) { panel->addMessage(chat); toast->reshapeToPanel(); @@ -321,7 +321,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) - if(m_toast_pool.empty()) + if (m_toast_pool.empty()) { //"pool" is empty - create one more panel LL_DEBUGS("NearbyChat") << "Empty pool" << LL_ENDL; @@ -333,15 +333,14 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) int chat_type = chat["chat_type"].asInteger(); - if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) + if (chat_type == CHAT_TYPE_DEBUG_MSG) { - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + if (!gSavedSettings.getBOOL("ShowScriptErrors")) return; - if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1) + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1) return; } - //take 1st element from pool, (re)initialize it, put it in active toasts LL_DEBUGS("NearbyChat") << "Getting toast from pool" << LL_ENDL; @@ -351,7 +350,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); - if(!panel) + if (!panel) return; panel->init(chat); @@ -443,7 +442,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() if (toast) { toast->setIsHidden(false); - toast->setVisible(TRUE); + toast->setVisible(true); } } @@ -488,11 +487,11 @@ void LLFloaterIMNearbyChatHandler::initChannel() void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) { - if(chat_msg.mMuted == TRUE) + if (chat_msg.mMuted) return; - if(chat_msg.mText.empty()) - return;//don't process empty messages + if (chat_msg.mText.empty()) + return; // don't process empty messages LLFloaterReg::getInstance("im_container"); LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); @@ -523,9 +522,10 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, // errors in separate window. if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) { - if (LLFloater::isQuitRequested()) return; + if (LLFloater::isQuitRequested()) + return; - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + if (!gSavedSettings.getBOOL("ShowScriptErrors")) return; // don't process debug messages from not owned objects, see EXT-7762 @@ -534,7 +534,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, return; } - if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat")) { LLColor4 txt_color; @@ -551,7 +551,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, nearby_chat->addMessage(chat_msg, true, args); - if(chat_msg.mSourceType == CHAT_SOURCE_AGENT + if (chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull() && chat_msg.mFromID != gAgentID) { |