summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersellland.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatersellland.cpp')
-rw-r--r--indra/newview/llfloatersellland.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 3d87904dbe..8558a1277c 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -27,6 +27,7 @@
#include "llfloatersellland.h"
+#include "llavatarnamecache.h"
#include "llfloateravatarpicker.h"
#include "llfloaterreg.h"
#include "llfloaterland.h"
@@ -41,6 +42,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);
@@ -89,7 +92,9 @@ private:
bool onConfirmSale(const LLSD& notification, const LLSD& response);
static void doShowObjects(void *userdata);
- void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids);
+ void callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
+
+ void onBuyerNameCache(const LLAvatarName& av_name);
public:
virtual BOOL postBuild();
@@ -224,12 +229,17 @@ void LLFloaterSellLandUI::updateParcelInfo()
if(mSellToBuyer)
{
- std::string name;
- gCacheName->getFullName(mAuthorizedBuyer, name);
- getChild<LLUICtrl>("sell_to_agent")->setValue(name);
+ LLAvatarNameCache::get(mAuthorizedBuyer,
+ boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2));
}
}
+void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name)
+{
+ getChild<LLUICtrl>("sell_to_agent")->setValue(av_name.getCompleteName());
+ getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.mUsername);
+}
+
void LLFloaterSellLandUI::setBadge(const char* id, Badge badge)
{
static std::string badgeOK("badge_ok.j2c");
@@ -385,7 +395,7 @@ void LLFloaterSellLandUI::doSelectAgent()
addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE));
}
-void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids)
+void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
LLParcel* parcel = mParcelSelection->getParcel();
@@ -396,7 +406,7 @@ void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& nam
mAuthorizedBuyer = ids[0];
- getChild<LLUICtrl>("sell_to_agent")->setValue(names[0]);
+ getChild<LLUICtrl>("sell_to_agent")->setValue(names[0].getCompleteName());
refreshUI();
}