diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-06-21 10:21:52 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-06-21 10:21:52 -0700 |
commit | c8970618567e867b619c9fb5e225978bc5f66781 (patch) | |
tree | d5ec9d2f27d887e9a39b1109469ca405b14c6a85 /indra/newview/llnearbychathandler.cpp | |
parent | 6be9f280ff5b2e2eba3bb9c3f14d7166579d1a49 (diff) | |
parent | a069e0d3db0e0771e54768a702fa18e57415992e (diff) |
Merge with q/viewer-release
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 9824517ed1..1fadb126e4 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -32,10 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llagentdata.h" // for gAgentID #include "llnearbychathandler.h" #include "llbottomtray.h" #include "llchatitemscontainerctrl.h" +#include "llfloaterscriptdebug.h" #include "llnearbychat.h" #include "llrecentpeople.h" @@ -287,7 +289,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - bottom += toast_rect.getHeight() + margin; + bottom += toast_rect.getHeight() - toast->getTopPad() + margin; } // use reverse order to provide correct z-order and avoid toast blinking @@ -358,6 +360,36 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } + + // don't show toast and add message to chat history on receive debug message + // with disabled setting showing script errors or enabled setting to show script + // errors in separate window. + if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) + { + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + + // don't process debug messages from not owned objects, see EXT-7762 + if (gAgentID != chat_msg.mOwnerID) + { + return; + } + + if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) + { + + LLColor4 txt_color; + + LLViewerChat::getChatColor(chat_msg,txt_color); + + LLFloaterScriptDebug::addScriptLine(chat_msg.mText, + chat_msg.mFromName, + txt_color, + chat_msg.mFromID); + return; + } + } + nearby_chat->addMessage(chat_msg, true, args); if( nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT |