Commit 83eba38a authored by Testicular Slingshot's avatar Testicular Slingshot
Browse files

Made marking unnamed objects in chat and IMs a toggleable feature in preferences.

parent 7fc44b35
......@@ -277,6 +277,17 @@
<key>Value</key>
<string>/tp2cam</string>
</map>
<key>AlchemyChatMarkUnnamedObjects</key>
<map>
<key>Comment</key>
<string>Marks unnamed objects in chat and IMs.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AlchemyChatMUPose</key>
<map>
<key>Comment</key>
......
......@@ -492,7 +492,8 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
// make sure that we don't have an empty or all-whitespace name
LLStringUtil::trim(name);
if (name.empty())
static const LLCachedControl<bool> sMarkUnnamedObjects(gSavedSettings, "AlchemyChatMarkUnnamedObjects");
if (name.empty() && sMarkUnnamedObjects)
{
name = LLTrans::getString("Unnamed");
}
......
......@@ -2411,7 +2411,8 @@ void process_chat_from_simulator(LLMessageSystem* msg, void** user_data)
{
// make sure that we don't have an empty or all-whitespace name
LLStringUtil::trim(from_name);
if (from_name.empty())
static const LLCachedControl<bool> sMarkUnnamedObjects(gSavedSettings, "AlchemyChatMarkUnnamedObjects");
if (from_name.empty() && sMarkUnnamedObjects)
{
from_name = LLTrans::getString("Unnamed");
}
......
......@@ -277,6 +277,15 @@
value="3"
width="90" />
</radio_group>
<check_box
follows="left|top"
height="16"
label="Mark unnamed objects in chat and IMs"
left="7"
top_pad="15"
name="AlchemyChatMarkUnnamedObjects"
control_name="AlchemyChatMarkUnnamedObjects"
width="150" />
</panel>
</tab_container>
</panel>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment