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 From d674d11f895b8f3d578cded931cdc1c430379c95 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 21 May 2010 17:11:31 -0700 Subject: Rename LLAvatarName::getNameAndSLID() to getCompleteName() Discussed with Leyla/Richard --- indra/newview/llfloatersellland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloatersellland.cpp') diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index ebb73baffb..e214b58a9a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -242,7 +242,7 @@ void LLFloaterSellLandUI::updateParcelInfo() void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name) { - childSetText("sell_to_agent", av_name.getNameAndSLID()); + childSetText("sell_to_agent", av_name.getCompleteName()); childSetToolTip("sell_to_agent", av_name.mUsername); } -- cgit v1.2.3 From 7fb941042251975919656b792fd4bfd9ebbc42d9 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 25 May 2010 14:15:26 -0700 Subject: LLFloaterAvatarPicker now uses LLAvatarNames reviewed by James --- indra/newview/llfloatersellland.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloatersellland.cpp') diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index ebb73baffb..94fcb644b4 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -98,7 +98,7 @@ private: bool onConfirmSale(const LLSD& notification, const LLSD& response); static void doShowObjects(void *userdata); - void callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids); + void callbackAvatarPick(const uuid_vec_t& ids, const std::vector names); void onBuyerNameCache(const LLAvatarName& av_name); @@ -401,7 +401,7 @@ void LLFloaterSellLandUI::doSelectAgent() addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE)); } -void LLFloaterSellLandUI::callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids) +void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector names) { LLParcel* parcel = mParcelSelection->getParcel(); @@ -412,7 +412,7 @@ void LLFloaterSellLandUI::callbackAvatarPick(const std::vector& nam mAuthorizedBuyer = ids[0]; - childSetText("sell_to_agent", names[0]); + childSetText("sell_to_agent", names[0].getNameAndSLID()); refreshUI(); } -- cgit v1.2.3