summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersellland.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-03-25 11:12:52 -0700
committersimon <none@none>2013-03-25 11:12:52 -0700
commit98a82c50d539451e1931826ca75fbc01d611806d (patch)
tree3c3dcac20286246f0724c11f126233702f0bdaaf /indra/newview/llfloatersellland.cpp
parent94ae64d6fd30e4dbc3280cd277f772c038ccd9fe (diff)
parent515f0e5a559ff3f0cb7d02e1d40b0f71425800ea (diff)
Pull in downstream CHUI code from viewer-development
Diffstat (limited to 'indra/newview/llfloatersellland.cpp')
-rw-r--r--indra/newview/llfloatersellland.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 64c0dfa023..0cb37dabe7 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -81,6 +81,7 @@ private:
LLUUID mAuthorizedBuyer;
bool mParcelSoldWithObjects;
SelectionObserver mParcelSelectionObserver;
+ boost::signals2::connection mAvatarNameCacheConnection;
void updateParcelInfo();
void refreshUI();
@@ -129,13 +130,18 @@ LLFloater* LLFloaterSellLand::buildFloater(const LLSD& key)
LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key)
: LLFloater(key),
mParcelSelectionObserver(this),
- mRegion(0)
+ mRegion(0),
+ mAvatarNameCacheConnection()
{
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
}
LLFloaterSellLandUI::~LLFloaterSellLandUI()
{
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver);
}
@@ -230,15 +236,20 @@ void LLFloaterSellLandUI::updateParcelInfo()
if(mSellToBuyer)
{
- LLAvatarNameCache::get(mAuthorizedBuyer,
- boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2));
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(mAuthorizedBuyer, boost::bind(&LLFloaterSellLandUI::onBuyerNameCache, this, _2));
}
}
void LLFloaterSellLandUI::onBuyerNameCache(const LLAvatarName& av_name)
{
+ mAvatarNameCacheConnection.disconnect();
+
getChild<LLUICtrl>("sell_to_agent")->setValue(av_name.getCompleteName());
- getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.mUsername);
+ getChild<LLUICtrl>("sell_to_agent")->setToolTip(av_name.getUserName());
}
void LLFloaterSellLandUI::setBadge(const char* id, Badge badge)
@@ -392,7 +403,8 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
void LLFloaterSellLandUI::doSelectAgent()
{
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE);
+ LLView * button = findChild<LLView>("sell_to_select_agent");
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE, FALSE, this->getName(), button);
// grandparent is a floater, in order to set up dependency
if (picker)
{