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.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index 2d8ccd1aef..980b456497 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -37,7 +37,8 @@
#include "llfloaterreg.h"
#include "llfloaterland.h"
#include "lllineeditor.h"
-#include "llnotify.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llparcel.h"
#include "llselectmgr.h"
#include "lltexturectrl.h"
@@ -88,14 +89,14 @@ private:
void setBadge(const char* id, Badge badge);
static void onChangeValue(LLUICtrl *ctrl, void *userdata);
- static void doSelectAgent(void *userdata);
+ void doSelectAgent();
static void doCancel(void *userdata);
static void doSellLand(void *userdata);
bool onConfirmSale(const LLSD& notification, const LLSD& response);
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 std::vector<std::string>& names, const uuid_vec_t& ids);
public:
virtual BOOL postBuild();
@@ -162,13 +163,14 @@ BOOL LLFloaterSellLandUI::postBuild()
{
childSetCommitCallback("sell_to", onChangeValue, this);
childSetCommitCallback("price", onChangeValue, this);
- childSetPrevalidate("price", LLLineEditor::prevalidateNonNegativeS32);
+ childSetPrevalidate("price", LLTextValidate::validateNonNegativeS32);
childSetCommitCallback("sell_objects", onChangeValue, this);
- childSetAction("sell_to_select_agent", doSelectAgent, this);
+ childSetAction("sell_to_select_agent", boost::bind( &LLFloaterSellLandUI::doSelectAgent, this));
childSetAction("cancel_btn", doCancel, this);
childSetAction("sell_btn", doSellLand, this);
childSetAction("show_objects", doShowObjects, this);
center();
+ getChild<LLUICtrl>("profile_scroll")->setTabStop(true);
return TRUE;
}
@@ -267,7 +269,7 @@ void LLFloaterSellLandUI::refreshUI()
std::string price_str = childGetValue("price").asString();
bool valid_price = false;
- valid_price = (price_str != "") && LLLineEditor::prevalidateNonNegativeS32(utf8str_to_wstring(price_str));
+ valid_price = (price_str != "") && LLTextValidate::validateNonNegativeS32(utf8str_to_wstring(price_str));
if (valid_price && mParcelActualArea > 0)
{
@@ -360,7 +362,7 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
self->mSellToBuyer = true;
if (self->mAuthorizedBuyer.isNull())
{
- doSelectAgent(self);
+ self->doSelectAgent();
}
}
else if (sell_to == "anyone")
@@ -383,30 +385,26 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
self->refreshUI();
}
-// static
-void LLFloaterSellLandUI::doSelectAgent(void *userdata)
+void LLFloaterSellLandUI::doSelectAgent()
{
- LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)userdata;
// grandparent is a floater, in order to set up dependency
- floaterp->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarPick, floaterp, FALSE, TRUE));
+ addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _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 std::vector<std::string>& names, const uuid_vec_t& ids)
{
- 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]);
- floaterp->refreshUI();
+ refreshUI();
}
// static
@@ -425,7 +423,7 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata)
send_parcel_select_objects(parcel->getLocalID(), RT_SELL);
- LLNotifications::instance().add("TransferObjectsHighlighted",
+ LLNotificationsUtil::add("TransferObjectsHighlighted",
LLSD(), LLSD(),
&LLFloaterSellLandUI::callbackHighlightTransferable);
}
@@ -460,7 +458,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
&& (sale_price == 0)
&& sell_to_anyone)
{
- LLNotifications::instance().add("SalePriceRestriction");
+ LLNotificationsUtil::add("SalePriceRestriction");
return;
}
@@ -493,7 +491,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
return false;