summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-06-10 09:38:02 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-06-10 09:38:02 +0300
commit7cfd968fcfc5712795dc013967d5f68298a7667b (patch)
tree279e27c1361a743ff5c0d44c762b6812940fa159 /indra
parent4f34d63f3e9b2d70bd24c2f49cce98da30df050e (diff)
EXT-6685 FIXED Disabled showing nearby chat toasts on receiving debug message with enabled setting 'show script errors in separate window'.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/541 --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnearbychat.cpp20
-rw-r--r--indra/newview/llnearbychathandler.cpp24
2 files changed, 24 insertions, 20 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index f1c13de8bb..1beaaf3cb4 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -49,7 +49,6 @@
#include "llchannelmanager.h"
#include "llagent.h" // gAgent
-#include "llfloaterscriptdebug.h"
#include "llchathistory.h"
#include "llstylemap.h"
@@ -163,25 +162,6 @@ std::string appendTime()
void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
{
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
- return;
- if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
- {
-
- LLColor4 txt_color;
-
- LLViewerChat::getChatColor(chat,txt_color);
-
- LLFloaterScriptDebug::addScriptLine(chat.mText,
- chat.mFromName,
- txt_color,
- chat.mFromID);
- return;
- }
- }
-
LLChat& tmp_chat = const_cast<LLChat&>(chat);
if(tmp_chat.mTimeStr.empty())
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index d36fc6bca7..4b5e765c4f 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -36,6 +36,7 @@
#include "llbottomtray.h"
#include "llchatitemscontainerctrl.h"
+#include "llfloaterscriptdebug.h"
#include "llnearbychat.h"
#include "llrecentpeople.h"
@@ -358,6 +359,29 @@ 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;
+ 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