diff options
author | James Cook <james@lindenlab.com> | 2010-05-18 16:00:45 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-05-18 16:00:45 -0700 |
commit | f4148502e484d516b42c4a88603eee6889d45697 (patch) | |
tree | a7d049b1fb1ebb037c0d9c90202a6b2ffe9e86c1 /indra | |
parent | 8238a377bd0e28303506446f2c7806b9632f3897 (diff) |
Rename mSLID to mUsername to match the name of the field in the UI
Product made a late-breaking request to change the name of this
field. The wire protocol for People API has not yet changed.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 16 | ||||
-rw-r--r-- | indra/llcommon/llavatarname.h | 2 | ||||
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llurlentry.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelme.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelprofileview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerdisplayname.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 2 |
14 files changed, 29 insertions, 27 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index 7415acadd4..de51a7f2aa 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -46,7 +46,7 @@ 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(), mIsDisplayNameDefault(false), mIsDummy(false), @@ -55,16 +55,18 @@ 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[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault; sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires); @@ -73,7 +75,7 @@ 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(); mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean(); LLDate expires = sd[DISPLAY_NAME_EXPIRES]; @@ -83,9 +85,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 { diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 87750210c6..39071ec4c7 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -54,7 +54,7 @@ public: std::string getNameAndSLID() 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 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/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/llimview.cpp b/indra/newview/llimview.cpp index b17dca68f6..0c88b9f3a1 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2075,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/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..e7721d6068 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2880,7 +2880,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) { // JAMESDEBUG HACK LLColor4 slid_color = name_tag_color * 0.83f; - addNameTagLine(av_name.mSLID, slid_color, LLFontGL::NORMAL, + addNameTagLine(av_name.mUsername, slid_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); } } |