diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-07-27 15:17:57 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-07-28 08:24:59 +0800 |
commit | 96a81b5ecbe3bffb582ded930752c0523df5e80a (patch) | |
tree | a87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/newview/llfloaterimnearbychathandler.cpp | |
parent | 06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff) | |
parent | ed73208eb96b862b97fa285036edea1e792ca3c6 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
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 77ceea19af..ef7ec9e950 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(); @@ -306,7 +306,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); - if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) + if (panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) { panel->addMessage(chat); toast->reshapeToPanel(); @@ -320,7 +320,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; @@ -332,15 +332,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; @@ -350,7 +349,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel()); - if(!panel) + if (!panel) return; panel->init(chat); @@ -442,7 +441,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() if (toast) { toast->setIsHidden(false); - toast->setVisible(TRUE); + toast->setVisible(true); } } @@ -487,11 +486,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"); @@ -522,9 +521,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 @@ -533,7 +533,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; @@ -550,7 +550,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) { |