summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llavatarname.cpp34
-rw-r--r--indra/llcommon/llavatarname.h21
-rw-r--r--indra/llmessage/llavatarnamecache.cpp8
-rw-r--r--indra/llui/llurlentry.cpp8
-rw-r--r--indra/newview/app_settings/settings.xml15
-rw-r--r--indra/newview/llavatarlistitem.cpp2
-rw-r--r--indra/newview/llchathistory.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp2
-rw-r--r--indra/newview/llfloatersellland.cpp2
-rw-r--r--indra/newview/llimfloater.cpp36
-rw-r--r--indra/newview/llimfloater.h7
-rw-r--r--indra/newview/llimview.cpp46
-rw-r--r--indra/newview/llimview.h9
-rw-r--r--indra/newview/llinspectavatar.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llpanelme.cpp2
-rw-r--r--indra/newview/llpanelprofileview.cpp2
-rw-r--r--indra/newview/lltoolpie.cpp2
-rw-r--r--indra/newview/llviewerdisplayname.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp15
-rw-r--r--indra/newview/llvoicechannel.h3
-rw-r--r--indra/newview/llvoicevivox.cpp9
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_incoming_call.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml17
27 files changed, 197 insertions, 61 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 7415acadd4..e30f353a6c 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -42,12 +42,16 @@
// LLSD map lookups
static const std::string SL_ID("sl_id");
static const std::string DISPLAY_NAME("display_name");
+static const std::string LEGACY_FIRST_NAME("legacy_first_name");
+static const std::string LEGACY_LAST_NAME("legacy_last_name");
static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default");
static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
LLAvatarName::LLAvatarName()
-: mSLID(),
+: mUsername(),
mDisplayName(),
+ mLegacyFirstName(),
+ mLegacyLastName(),
mIsDisplayNameDefault(false),
mIsDummy(false),
mExpires(F64_MAX)
@@ -55,17 +59,21 @@ LLAvatarName::LLAvatarName()
bool LLAvatarName::operator<(const LLAvatarName& rhs) const
{
- if (mSLID == rhs.mSLID)
+ if (mUsername == rhs.mUsername)
return mDisplayName < rhs.mDisplayName;
else
- return mSLID < rhs.mSLID;
+ return mUsername < rhs.mUsername;
}
LLSD LLAvatarName::asLLSD() const
{
LLSD sd;
- sd[SL_ID] = mSLID;
+ // Due to a late-breaking change request from Product, we renamed
+ // "SLID" to "Username", but it was too late to change the wire format.
+ sd[SL_ID] = mUsername;
sd[DISPLAY_NAME] = mDisplayName;
+ sd[LEGACY_FIRST_NAME] = mLegacyFirstName;
+ sd[LEGACY_LAST_NAME] = mLegacyLastName;
sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault;
sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires);
return sd;
@@ -73,8 +81,10 @@ LLSD LLAvatarName::asLLSD() const
void LLAvatarName::fromLLSD(const LLSD& sd)
{
- mSLID = sd[SL_ID].asString();
+ mUsername = sd[SL_ID].asString(); // see asLLSD() above
mDisplayName = sd[DISPLAY_NAME].asString();
+ mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString();
+ mLegacyLastName = sd[LEGACY_LAST_NAME].asString();
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
LLDate expires = sd[DISPLAY_NAME_EXPIRES];
mExpires = expires.secondsSinceEpoch();
@@ -83,9 +93,9 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
std::string LLAvatarName::getNameAndSLID() const
{
std::string name;
- if (!mSLID.empty())
+ if (!mUsername.empty())
{
- name = mDisplayName + " (" + mSLID + ")";
+ name = mDisplayName + " (" + mUsername + ")";
}
else
{
@@ -94,3 +104,13 @@ std::string LLAvatarName::getNameAndSLID() const
}
return name;
}
+
+std::string LLAvatarName::getLegacyName() const
+{
+ std::string name;
+ name.reserve( mLegacyFirstName.size() + 1 + mLegacyLastName.size() );
+ name = mLegacyFirstName;
+ name += " ";
+ name += mLegacyLastName;
+ return name;
+}
diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h
index 87750210c6..fb5cb277a2 100644
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llcommon/llavatarname.h
@@ -53,14 +53,31 @@ public:
// When display names are disabled returns just "James Linden"
std::string getNameAndSLID() const;
+ // Returns "James Linden" or "bobsmith123 Resident" for backwards
+ // compatibility with systems like voice and muting
+ // *TODO: Eliminate this in favor of username only
+ std::string getLegacyName() const;
+
// "bobsmith123" or "james.linden", US-ASCII only
- std::string mSLID;
+ std::string mUsername;
// "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode
// Contains data whether or not user has explicitly set
- // a display name; may duplicate their SLID.
+ // a display name; may duplicate their username.
std::string mDisplayName;
+ // For "James Linden", "James"
+ // For "bobsmith123", "bobsmith123"
+ // Used to communicate with legacy systems like voice and muting which
+ // rely on old-style names.
+ // *TODO: Eliminate this in favor of username only
+ std::string mLegacyFirstName;
+
+ // For "James Linden", "Linden"
+ // For "bobsmith123", "Resident"
+ // see above for rationale
+ std::string mLegacyLastName;
+
// If true, both display name and SLID were generated from
// a legacy first and last name, like "James Linden (james.linden)"
bool mIsDisplayNameDefault;
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 2fc92ff36f..4b41c7e5b1 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -208,7 +208,7 @@ public:
// Some avatars don't have explicit display names set
if (av_name.mDisplayName.empty())
{
- av_name.mDisplayName = av_name.mSLID;
+ av_name.mDisplayName = av_name.mUsername;
}
// cache it and fire signals
@@ -221,7 +221,7 @@ public:
{
const std::string DUMMY_NAME("\?\?\?");
LLAvatarName av_name;
- av_name.mSLID = DUMMY_NAME;
+ av_name.mUsername = DUMMY_NAME;
av_name.mDisplayName = DUMMY_NAME;
av_name.mIsDisplayNameDefault = false;
av_name.mIsDummy = true;
@@ -247,7 +247,7 @@ public:
// *NOTE: "??" starts trigraphs in C/C++, escape the question marks.
const std::string DUMMY_NAME("\?\?\?");
LLAvatarName av_name;
- av_name.mSLID = DUMMY_NAME;
+ av_name.mUsername = DUMMY_NAME;
av_name.mDisplayName = DUMMY_NAME;
av_name.mIsDisplayNameDefault = false;
av_name.mIsDummy = true;
@@ -561,7 +561,7 @@ void LLAvatarNameCache::buildLegacyName(const std::string& full_name,
LLAvatarName* av_name)
{
llassert(av_name);
- av_name->mSLID = "";
+ av_name->mUsername = "";
av_name->mDisplayName = full_name;
av_name->mIsDisplayNameDefault = true;
av_name->mIsDummy = true;
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index d3c866a854..aeb02aef1c 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -353,9 +353,9 @@ void LLUrlEntryAgent::onAvatarNameCache(const LLUUID& id,
const LLAvatarName& av_name)
{
std::string label = av_name.mDisplayName;
- if (!av_name.mSLID.empty())
+ if (!av_name.mUsername.empty())
{
- label += " (" + av_name.mSLID + ")";
+ label += " (" + av_name.mUsername + ")";
}
// received the agent name from the server - tell our observers
callObservers(id.asString(), label, mIcon);
@@ -418,9 +418,9 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
if (LLAvatarNameCache::get(agent_id, &av_name))
{
std::string label = av_name.mDisplayName;
- if (!av_name.mSLID.empty())
+ if (!av_name.mUsername.empty())
{
- label += " (" + av_name.mSLID + ")";
+ label += " (" + av_name.mUsername + ")";
}
// handle suffixes like /mute or /offerteleport
label = localize_slapp_label(url, label);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f8ad1c2dac..acd3c10ec6 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7337,10 +7337,21 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>NameTagShowSLIDs</key>
+ <key>NameTagShowFriends</key>
<map>
<key>Comment</key>
- <string>Show Second Life IDs in name labels</string>
+ <string>Highlight the name tags of your friends</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>NameTagShowUsernames</key>
+ <map>
+ <key>Comment</key>
+ <string>Show usernames in avatar name tags</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index c458930a62..a59ad306d7 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -340,7 +340,7 @@ void LLAvatarListItem::setNameInternal(const std::string& name, const std::strin
void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
{
setName(av_name.mDisplayName);
- mAvatarName->setToolTip(av_name.mSLID);
+ mAvatarName->setToolTip(av_name.mUsername);
//requesting the list to resort
notifyParent(LLSD().with("sort", LLSD()));
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 5bf3d7b913..6d98afbc58 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -330,8 +330,8 @@ public:
LLTextBox* user_name = getChild<LLTextBox>("user_name");
user_name->setValue( LLSD(av_name.mDisplayName ) );
- user_name->setToolTip( av_name.mSLID );
- setToolTip( av_name.mSLID );
+ user_name->setToolTip( av_name.mUsername );
+ setToolTip( av_name.mUsername );
}
protected:
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index f248fde64a..a7e5eedf5f 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -326,7 +326,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
sSkin = gSavedSettings.getString("SkinCurrent");
- gSavedSettings.getControl("NameTagShowSLIDs")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
+ gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
}
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index ad35581641..ebb73baffb 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -243,7 +243,7 @@ void LLFloaterSellLandUI::updateParcelInfo()
void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name)
{
childSetText("sell_to_agent", av_name.getNameAndSLID());
- childSetToolTip("sell_to_agent", av_name.mSLID);
+ childSetToolTip("sell_to_agent", av_name.mUsername);
}
void LLFloaterSellLandUI::setBadge(const char* id, Badge badge)
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index d25aa37e16..804cc75f75 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -38,6 +38,7 @@
#include "llagent.h"
#include "llappviewer.h"
+#include "llavatarnamecache.h"
#include "llbutton.h"
#include "llbottomtray.h"
#include "llchannelmanager.h"
@@ -275,12 +276,6 @@ BOOL LLIMFloater::postBuild()
mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
mInputEditor->setPassDelete( TRUE );
- std::string session_name(LLIMModel::instance().getName(mSessionID));
-
- mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + session_name);
-
- setTitle(session_name);
-
childSetCommitCallback("chat_editor", onSendMsg, this);
mChatHistory = getChild<LLChatHistory>("chat_history");
@@ -298,6 +293,19 @@ BOOL LLIMFloater::postBuild()
mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label"));
}
+ if ( im_session && im_session->isP2PSessionType())
+ {
+ // look up display name for window title
+ LLAvatarNameCache::get(im_session->mOtherParticipantID,
+ boost::bind(&LLIMFloater::onAvatarNameCache,
+ this, _1, _2));
+ }
+ else
+ {
+ std::string session_name(LLIMModel::instance().getName(mSessionID));
+ updateSessionName(session_name, session_name);
+ }
+
//*TODO if session is not initialized yet, add some sort of a warning message like "starting session...blablabla"
//see LLFloaterIMPanel for how it is done (IB)
@@ -311,6 +319,22 @@ BOOL LLIMFloater::postBuild()
}
}
+void LLIMFloater::updateSessionName(const std::string& ui_title,
+ const std::string& ui_label)
+{
+ mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + ui_label);
+ setTitle(ui_title);
+}
+
+void LLIMFloater::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name)
+{
+ // Use display name only for labels, as the extended name will be in the
+ // floater title
+ std::string ui_title = av_name.getNameAndSLID();
+ updateSessionName(ui_title, av_name.mDisplayName);
+}
+
// virtual
void LLIMFloater::draw()
{
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index d63246a5cd..75ff0372ee 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -38,6 +38,7 @@
#include "lltooldraganddrop.h"
#include "lltransientdockablefloater.h"
+class LLAvatarName;
class LLLineEditor;
class LLPanelChatControlPanel;
class LLChatHistory;
@@ -130,6 +131,12 @@ private:
/* virtual */ void onFocusLost();
/* virtual */ void onFocusReceived();
+ // Update the window title, input field help text, etc.
+ void updateSessionName(const std::string& ui_title, const std::string& ui_label);
+
+ // For display name lookups for IM window titles
+ void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
+
BOOL dropCallingCard(LLInventoryItem* item, BOOL drop);
BOOL dropCategory(LLInventoryCategory* category, BOOL drop);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 356f194c81..0c88b9f3a1 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1746,8 +1746,19 @@ void LLOutgoingCallDialog::show(const LLSD& key)
setTitle(callee_name);
LLSD callee_id = mPayload["other_user_id"];
- childSetTextArg("calling", "[CALLEE_NAME]", callee_name);
- childSetTextArg("connecting", "[CALLEE_NAME]", callee_name);
+ // Beautification: Since SLID is in the title bar, and you probably
+ // recognize this person's voice, just show display name
+ std::string final_callee_name = callee_name;
+ if (is_avatar)
+ {
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(callee_id, &av_name))
+ {
+ final_callee_name = av_name.mDisplayName;
+ }
+ }
+ childSetTextArg("calling", "[CALLEE_NAME]", final_callee_name);
+ childSetTextArg("connecting", "[CALLEE_NAME]", final_callee_name);
// for outgoing group calls callee_id == group id == session id
setIcon(callee_id, callee_id);
@@ -1904,21 +1915,21 @@ BOOL LLIncomingCallDialog::postBuild()
if (caller_name == "anonymous")
{
caller_name = getString("anonymous");
+ setCallerName(caller_name, caller_name, call_type);
}
else if (!is_avatar)
{
caller_name = LLTextUtil::formatPhoneNumber(caller_name);
+ setCallerName(caller_name, caller_name, call_type);
}
else
{
- // IDEVO
- caller_name = LLCacheName::cleanFullName(caller_name);
+ // Get the full name information
+ LLAvatarNameCache::get(caller_id,
+ boost::bind(&LLIncomingCallDialog::onAvatarNameCache,
+ this, _1, _2, call_type));
}
- setTitle(caller_name + " " + call_type);
-
- LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
- caller_name_widget->setValue(caller_name + " " + call_type);
setIcon(session_id, caller_id);
childSetAction("Accept", onAccept, this);
@@ -1942,6 +1953,23 @@ BOOL LLIncomingCallDialog::postBuild()
return TRUE;
}
+void LLIncomingCallDialog::setCallerName(const std::string& ui_title,
+ const std::string& ui_label,
+ const std::string& call_type)
+{
+ setTitle(ui_title + " " + call_type);
+
+ LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name");
+ caller_name_widget->setValue(ui_label + " " + call_type);
+}
+
+void LLIncomingCallDialog::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name,
+ const std::string& call_type)
+{
+ std::string title = av_name.getNameAndSLID();
+ setCallerName(title, av_name.mDisplayName, call_type);
+}
void LLIncomingCallDialog::onOpen(const LLSD& key)
{
@@ -2047,7 +2075,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
if (LLAvatarNameCache::useDisplayNames()
&& LLAvatarNameCache::get(caller_id, &av_name))
{
- correct_session_name = av_name.mDisplayName + " (" + av_name.mSLID + ")";
+ correct_session_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
}
correct_session_name.append(ADHOC_NAME_SUFFIX);
}
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 758ea667ef..c132ac328f 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -41,7 +41,7 @@
#include "llvoicechannel.h"
-
+class LLAvatarName;
class LLFriendObserver;
class LLCallDialogManager;
class LLIMSpeakerMgr;
@@ -540,6 +540,13 @@ public:
static void onStartIM(void* user_data);
private:
+ void setCallerName(const std::string& ui_title,
+ const std::string& ui_label,
+ const std::string& call_type);
+ void onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name,
+ const std::string& call_type);
+
/*virtual*/ void onLifetimeExpired();
void processCallResponse(S32 response);
};
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp
index 3cbde2bb9c..74bf6e378d 100644
--- a/indra/newview/llinspectavatar.cpp
+++ b/indra/newview/llinspectavatar.cpp
@@ -642,7 +642,7 @@ void LLInspectAvatar::onAvatarNameCache(
if (agent_id == mAvatarID)
{
getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName);
- getChild<LLUICtrl>("user_slid")->setValue(av_name.mSLID);
+ getChild<LLUICtrl>("user_slid")->setValue(av_name.mUsername);
}
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 14e5c8b93c..9e3f80e464 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3634,7 +3634,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
if (LLAvatarNameCache::useDisplayNames()
&& LLAvatarNameCache::get(item->getCreatorUUID(), &av_name))
{
- callingcard_name = av_name.mDisplayName + " (" + av_name.mSLID + ")";
+ callingcard_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
}
LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
if (session_id != LLUUID::null)
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index f38c8859ef..c1d02fae39 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -242,7 +242,7 @@ void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_d
void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
{
getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mSLID );
+ getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
}
BOOL LLPanelMyProfileEdit::postBuild()
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 1afe2b9d44..d22d8d2718 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -207,7 +207,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mSLID );
+ getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
}
// EOF
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 67db778bdb..ebef28fd64 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -881,7 +881,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
if (LLAvatarNameCache::useDisplayNames()
&& LLAvatarNameCache::get(hover_object->getID(), &av_name))
{
- final_name = av_name.mDisplayName + " (" + av_name.mSLID + ")";
+ final_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
}
else
{
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index ec80129f8a..a783cb03d8 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -185,7 +185,7 @@ class LLDisplayNameUpdate : public LLHTTPNode
{
LLSD args;
args["OLD_NAME"] = old_display_name;
- args["SLID"] = av_name.mSLID;
+ args["SLID"] = av_name.mUsername;
args["NEW_NAME"] = av_name.mDisplayName;
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5e6f294071..a9250991f6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2856,7 +2856,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames");
- static LLUICachedControl<bool> show_slids("NameTagShowSLIDs");
+ static LLUICachedControl<bool> show_usernames("NameTagShowUsernames");
if (LLAvatarNameCache::useDisplayNames())
{
@@ -2876,11 +2876,11 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
LLFontGL::getFontSansSerif());
}
// Suppress SLID display if display name matches exactly (ugh)
- if (show_slids && !av_name.mIsDisplayNameDefault)
+ if (show_usernames && !av_name.mIsDisplayNameDefault)
{
- // JAMESDEBUG HACK
- LLColor4 slid_color = name_tag_color * 0.83f;
- addNameTagLine(av_name.mSLID, slid_color, LLFontGL::NORMAL,
+ // *HACK: Desaturate the color
+ LLColor4 username_color = name_tag_color * 0.83f;
+ addNameTagLine(av_name.mUsername, username_color, LLFontGL::NORMAL,
LLFontGL::getFontSansSerifSmall());
}
}
@@ -3072,14 +3072,15 @@ void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
{
+ static LLUICachedControl<bool> show_friends("NameTagShowFriends");
const char* color_name;
- if (is_friend)
+ if (show_friends && is_friend)
{
color_name = "NameTagFriend";
}
else if (LLAvatarNameCache::useDisplayNames())
{
- // ...color based on whether SLID "matches" a computed display
+ // ...color based on whether username "matches" a computed display
// name
LLAvatarName av_name;
if (LLAvatarNameCache::get(getID(), &av_name)
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 573fab1f4f..1784ceaa12 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -82,6 +82,9 @@ public:
virtual void getChannelInfo();
virtual BOOL isActive();
virtual BOOL callStarted();
+
+ // Session name is a UI label used for feedback about which person,
+ // group, or phone number you are talking to
const std::string& getSessionName() const { return mSessionName; }
boost::signals2::connection setStateChangedCallback(const state_changed_signal_t::slot_type& callback)
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index a457bd1fe6..4a0b0f12a4 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -37,6 +37,8 @@
#include "llsdutil.h"
+// Linden library includes
+#include "llavatarnamecache.h"
#include "llvoavatarself.h"
#include "llbufferstream.h"
#include "llfile.h"
@@ -52,6 +54,8 @@
#include "llviewercontrol.h"
#include "llkeyboard.h"
#include "llappviewer.h" // for gDisconnected, gDisableVoice
+
+// Viewer includes
#include "llmutelist.h" // to check for muted avatars
#include "llagent.h"
#include "llcachename.h"
@@ -6178,6 +6182,11 @@ void LLVivoxVoiceClient::lookupName(const LLUUID &id)
{
BOOL is_group = FALSE;
gCacheName->get(id, is_group, &LLVivoxVoiceClient::onAvatarNameLookup);
+
+ // Peformance boost: We're going to need the display name later when
+ // we show the call request floater, so get the request going now
+ LLAvatarName unused;
+ LLAvatarNameCache::get(id, &unused);
}
//static
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index bb43de6ada..bfa57892a7 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -550,7 +550,7 @@
reference="White" />
<color
name="NameTagMismatch"
- value="1 0.776 0.212 1" />
+ reference="White" />
<color
name="NameTagSLID"
value="1 1 1 1" />
diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
index 1d67123726..420ba172e8 100644
--- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml
@@ -8,7 +8,7 @@
layout="topleft"
name="incoming call"
help_topic="incoming_call"
- title="UNKNOWN PERSON IS CALLING"
+ title="Incoming call"
width="410">
<floater.string
name="lifetime">
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index b0f5daef14..7839d61299 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3170,7 +3170,7 @@ Thanks for updating your name!
Just like in real life, it takes a while for everyone to learn about a new name. Please allow [HOURS] hours for your name to update in object ownership, scripts, search, etc.
-See http://wiki.secondlife.com/wiki/Display_Names for details.
+See http://wiki.secondlife.com/wiki/Setting_your_display_name for details.
</notification>
<notification
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 21846f6e87..88c264c649 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -60,7 +60,7 @@ name="username_text"
top="20"
left="20"
width="150">
-Second Life ID or Name:
+Username:
</text>
<line_editor
follows="left|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 131d9312af..eabbdc2186 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -256,7 +256,16 @@
name="show_my_name_checkbox1"
top_pad="4"
width="300" />
- <text
+ <check_box
+ control_name="NameTagShowFriends"
+ enabled_control="AvatarNameTagMode"
+ height="16"
+ label="Highlight friends"
+ left_delta="0"
+ name="show_friends"
+ tool_tip="Highlight the name tags of your friends"
+ top_pad="2" />
+ <text
follows="left|top"
height="15"
layout="topleft"
@@ -287,13 +296,13 @@
top_pad="5" />
-->
<check_box
- control_name="NameTagShowSLIDs"
+ control_name="NameTagShowUsernames"
enabled_control="AvatarNameTagMode"
height="16"
- label="Second Life IDs"
+ label="Usernames"
left_delta="0"
name="show_slids"
- tool_tip="Show SL ID, like bobsmith123"
+ tool_tip="Show username, like bobsmith123"
top_pad="5" />
<text
type="string"