summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimnearbychathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimnearbychathandler.cpp')
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index dfee4096fe..c76c1da8d6 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;
@@ -331,15 +331,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
@@ -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)
{