diff options
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 81cc52528c..eefffbbb43 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -179,11 +179,7 @@ public: } else if (level == "add") { - std::string name; - name.assign(getFirstName()); - name.append(" "); - name.append(getLastName()); - + std::string name = getFullName(); LLAvatarActions::requestFriendshipDialog(getAvatarId(), name); } else if (level == "remove") @@ -253,15 +249,14 @@ public: } const LLUUID& getAvatarId () const { return mAvatarID;} - const std::string& getFirstName() const { return mFirstName; } - const std::string& getLastName () const { return mLastName; } + const std::string& getFullName() const { return mFullName; } void setup(const LLChat& chat,const LLStyle::Params& style_params) { mAvatarID = chat.mFromID; mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; - gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4)); + gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); //*TODO overly defensive thing, source type should be maintained out there if(chat.mFromID.isNull() || chat.mFromName == SYSTEM_FROM) @@ -274,7 +269,7 @@ public: userName->setReadOnlyColor(style_params.readonly_color()); userName->setColor(style_params.color()); - userName->setValue(chat.mFromName); + userName->setValue(chat.mFromName); if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType) { userName->setValue(LLTrans::getString("SECOND_LIFE")); @@ -299,7 +294,7 @@ public: icon->setValue(LLSD("OBJECT_Icon")); break; case CHAT_SOURCE_SYSTEM: - icon->setValue(LLSD("SL_Logo")); + icon->setValue(LLSD("SL_Logo")); } } @@ -333,12 +328,11 @@ public: LLPanel::draw(); } - void nameUpdatedCallback(const LLUUID& id,const std::string& first,const std::string& last,BOOL is_group) + void nameUpdatedCallback(const LLUUID& id,const std::string& full_name, bool is_group) { if (id != mAvatarID) return; - mFirstName = first; - mLastName = last; + mFullName = full_name; } protected: static const S32 PADDING = 20; @@ -423,8 +417,7 @@ protected: LLUUID mAvatarID; EChatSourceType mSourceType; - std::string mFirstName; - std::string mLastName; + std::string mFullName; std::string mFrom; LLUUID mSessionID; |