Update to LLAvatarNameCache and consumers.

This commit is contained in:
Shyotl
2012-12-08 00:59:37 -06:00
parent 9fb4e677a6
commit 3ba967bdc1
21 changed files with 646 additions and 339 deletions

View File

@@ -33,6 +33,7 @@
#include "llfloatersellland.h"
#include "llavatarnamecache.h"
#include "llfloateravatarpicker.h"
#include "llfloater.h"
#include "llfloaterland.h"
@@ -88,7 +89,7 @@ private:
static void doShowObjects(void *userdata);
static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response);
static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
void callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names);
public:
virtual BOOL postBuild();
@@ -413,25 +414,23 @@ void LLFloaterSellLandUI::doSelectAgent(void *userdata)
{
LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)userdata;
// grandparent is a floater, in order to set up dependency
floaterp->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarPick, floaterp, FALSE, TRUE));
floaterp->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, floaterp, _1, _2), FALSE, TRUE));
}
// static
void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
{
LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)data;
LLParcel* parcel = floaterp->mParcelSelection->getParcel();
LLParcel* parcel = mParcelSelection->getParcel();
if (names.empty() || ids.empty()) return;
LLUUID id = ids[0];
parcel->setAuthorizedBuyerID(id);
floaterp->mAuthorizedBuyer = ids[0];
mAuthorizedBuyer = ids[0];
floaterp->childSetText("sell_to_agent", names[0]);
childSetText("sell_to_agent", names[0].getCompleteName());
floaterp->refreshUI();
refreshUI();
}
// static