diff options
author | Kent Quirk <q@lindenlab.com> | 2009-12-30 00:45:11 -0500 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2009-12-30 00:45:11 -0500 |
commit | f4e2287175ab1bc9d09fc73435a828071b9e2ba5 (patch) | |
tree | a3e863efea52678e6ea3f19302bef1d5500fcf42 /indra/newview/llfloaterland.cpp | |
parent | 904de223b6da701e2512b8d8bf0d3be478421c78 (diff) | |
parent | 383cb255e0ff619fa4ee3fc0b1dc6a37643d3bc1 (diff) |
automated merge PE->viewer2.0
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
-rw-r--r-- | indra/newview/llfloaterland.cpp | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 02884575b0..598a13de15 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2284,9 +2284,9 @@ BOOL LLPanelLandAccess::postBuild() childSetCommitCallback("PriceSpin", onCommitAny, this); childSetCommitCallback("HoursSpin", onCommitAny, this); - childSetAction("add_allowed", onClickAddAccess, this); + childSetAction("add_allowed", boost::bind(&LLPanelLandAccess::onClickAddAccess, this)); childSetAction("remove_allowed", onClickRemoveAccess, this); - childSetAction("add_banned", onClickAddBanned, this); + childSetAction("add_banned", boost::bind(&LLPanelLandAccess::onClickAddBanned, this)); childSetAction("remove_banned", onClickRemoveBanned, this); mListAccess = getChild<LLNameListCtrl>("AccessList"); @@ -2694,29 +2694,22 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) self->refresh(); } -// static -void LLPanelLandAccess::onClickAddAccess(void* data) +void LLPanelLandAccess::onClickAddAccess() { - LLPanelLandAccess* panelp = (LLPanelLandAccess*)data; - if (panelp) - { - gFloaterView->getParentFloater(panelp)->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarCBAccess, data) ); - } + gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1,_2)) ); } -// static -void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) +void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) { - LLPanelLandAccess* panelp = (LLPanelLandAccess*)userdata; if (!names.empty() && !ids.empty()) { LLUUID id = ids[0]; - LLParcel* parcel = panelp->mParcel->getParcel(); + LLParcel* parcel = mParcel->getParcel(); if (parcel) { parcel->addToAccessList(id, 0); LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS); - panelp->refresh(); + refresh(); } } } @@ -2745,25 +2738,23 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data) } // static -void LLPanelLandAccess::onClickAddBanned(void* data) +void LLPanelLandAccess::onClickAddBanned() { - LLPanelLandAccess* panelp = (LLPanelLandAccess*)data; - gFloaterView->getParentFloater(panelp)->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarCBBanned, data) ); + gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1,_2))); } // static -void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata) +void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) { - LLPanelLandAccess* panelp = (LLPanelLandAccess*)userdata; if (!names.empty() && !ids.empty()) { LLUUID id = ids[0]; - LLParcel* parcel = panelp->mParcel->getParcel(); + LLParcel* parcel = mParcel->getParcel(); if (parcel) { parcel->addToBanList(id, 0); LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN); - panelp->refresh(); + refresh(); } } } |