From da1a39c935d8ef660c35d01bf9d7c53af3adf7ae Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 19 May 2010 11:38:29 -0700 Subject: Land display name updates reviewed by James --- indra/newview/llfloatersellland.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloatersellland.cpp') diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 9dddbd998a..ad35581641 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -33,6 +33,7 @@ #include "llfloatersellland.h" +#include "llavatarnamecache.h" #include "llfloateravatarpicker.h" #include "llfloaterreg.h" #include "llfloaterland.h" @@ -47,6 +48,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" +class LLAvatarName; + // defined in llfloaterland.cpp void send_parcel_select_objects(S32 parcel_local_id, U32 return_type, uuid_list_t* return_ids = NULL); @@ -97,6 +100,8 @@ private: void callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids); + void onBuyerNameCache(const LLAvatarName& av_name); + public: virtual BOOL postBuild(); @@ -230,12 +235,17 @@ void LLFloaterSellLandUI::updateParcelInfo() if(mSellToBuyer) { - std::string name; - gCacheName->getFullName(mAuthorizedBuyer, name); - childSetText("sell_to_agent", name); + LLAvatarNameCache::get(mAuthorizedBuyer, + boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2)); } } +void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name) +{ + childSetText("sell_to_agent", av_name.getNameAndSLID()); + childSetToolTip("sell_to_agent", av_name.mSLID); +} + void LLFloaterSellLandUI::setBadge(const char* id, Badge badge) { static std::string badgeOK("badge_ok.j2c"); -- cgit v1.2.3