summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/settings.xml33
-rw-r--r--indra/newview/llfloaterchat.cpp18
-rw-r--r--indra/newview/llnearbychat.cpp12
-rw-r--r--indra/newview/llnearbychathandler.cpp12
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml4
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
6 files changed, 54 insertions, 27 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eb045349c2..3682d48577 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7340,17 +7340,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ScriptErrorsAsChat</key>
- <map>
- <key>Comment</key>
- <string>Display script errors and warning in chat history</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ScriptHelpFollowsCursor</key>
<map>
<key>Comment</key>
@@ -7665,6 +7654,28 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ShowScriptErrors</key>
+ <map>
+ <key>Comment</key>
+ <string>Show script errors</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>ShowScriptErrorsLocation</key>
+ <map>
+ <key>Comment</key>
+ <string>Show script error in chat or window</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>ShowSnapshotButton</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 6d2e959352..86abebe7ce 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -204,12 +204,14 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
- LLFloaterScriptDebug::addScriptLine(chat.mText,
- chat.mFromName,
- color,
- chat.mFromID);
- if (!gSavedSettings.getBOOL("ScriptErrorsAsChat"))
+ if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
+ return;
+ if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)
{
+ LLFloaterScriptDebug::addScriptLine(chat.mText,
+ chat.mFromName,
+ color,
+ chat.mFromID);
return;
}
}
@@ -315,9 +317,9 @@ void LLFloaterChat::addChat(const LLChat& chat,
{
LLColor4 text_color = get_text_color(chat);
- BOOL invisible_script_debug_chat =
- chat.mChatType == CHAT_TYPE_DEBUG_MSG
- && !gSavedSettings.getBOOL("ScriptErrorsAsChat");
+ BOOL invisible_script_debug_chat = ((gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) ||
+ (chat.mChatType == CHAT_TYPE_DEBUG_MSG
+ && (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)));
if (!invisible_script_debug_chat
&& !chat.mMuted
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index bbab9944f3..148f72703c 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -222,12 +222,14 @@ void LLNearbyChat::addMessage(const LLChat& chat)
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
- LLFloaterScriptDebug::addScriptLine(chat.mText,
- chat.mFromName,
- color,
- chat.mFromID);
- if (!gSavedSettings.getBOOL("ScriptErrorsAsChat"))
+ if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
+ return;
+ if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
{
+ LLFloaterScriptDebug::addScriptLine(chat.mText,
+ chat.mFromName,
+ color,
+ chat.mFromID);
return;
}
}
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 4aefbd1a33..6b0d6d61e0 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -188,6 +188,17 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
return;
}
+ int chat_type = notification["chat_type"].asInteger();
+
+ if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG))
+ {
+ if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
+ return;
+ if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)
+ return;
+ }
+
+
//take 1st element from pool, (re)initialize it, put it in active toasts
LLToast* toast = m_toast_pool.back();
@@ -330,6 +341,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
notification["from_id"] = chat_msg.mFromID;
notification["time"] = chat_msg.mTime;
notification["source"] = (S32)chat_msg.mSourceType;
+ notification["chat_type"] = (S32)chat_msg.mChatType;
channel->addNotification(notification);
}
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 16fdbd7045..f42bab14de 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -235,7 +235,7 @@ Avatars:
width="237"
top_pad="0" />
<check_box
- control_name="test"
+ control_name="ShowScriptErrors"
height="20"
label="Show script errors"
layout="topleft"
@@ -244,7 +244,7 @@ Avatars:
width="256"
top_pad="10"/>
<radio_group
- enabled_control="EnableShowScriptErrors"
+ enabled_control="ShowScriptErrors"
control_name="ShowScriptErrorsLocation"
draw_border="false"
height="40"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4c19b22ac5..81bc12c33c 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1819,7 +1819,7 @@ this texture in your inventory
<string name="broken_link" value=" (broken_link)" />
<string name="LoadingContents">Loading contents...</string>
<string name="NoContents">No contents</string>
- <string name="WornOnAttachmentPoint"> (worn on [ATTACHMENT_POINT])</string>
+ <string name="WornOnAttachmentPoint" value=" (worn on [ATTACHMENT_POINT])" />
<!-- Gestures labels -->
<!-- use value="" because they have preceding spaces -->