summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloaterbuyland.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r--indra/newview/llfloaterbuyland.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 29506e21d5..3fbee83c7b 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -187,7 +187,6 @@ public:
virtual void draw();
virtual BOOL canClose();
- virtual void onClose(bool app_quitting);
/*virtual*/ void setMinimized(BOOL b);
private:
@@ -199,7 +198,7 @@ private:
};
static void cacheNameUpdateRefreshesBuyLand(const LLUUID&,
- const std::string&, const std::string&, BOOL, void* data)
+ const std::string&, const std::string&, BOOL)
{
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
if (ui)
@@ -221,7 +220,7 @@ void LLFloaterBuyLand::buyLand(
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(true);
ui->setForGroup(is_for_group);
ui->setParcel(region, parcel);
- ui->open(); /*Flawfinder: ignore*/
+ ui->openFloater();
}
// static
@@ -298,7 +297,7 @@ LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
static bool observingCacheName = false;
if (!observingCacheName)
{
- gCacheName->addObserver(cacheNameUpdateRefreshesBuyLand);
+ gCacheName->addObserver(&cacheNameUpdateRefreshesBuyLand);
observingCacheName = true;
}
@@ -322,7 +321,7 @@ LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
#pragma warning(disable : 4355)
#endif
LLFloaterBuyLandUI::LLFloaterBuyLandUI()
-: LLFloater(std::string("Buy Land")),
+: LLFloater(),
mParcel(0),
mBought(false),
mParcelValid(false), mSiteValid(false),
@@ -350,7 +349,7 @@ void LLFloaterBuyLandUI::SelectionObserver::changed()
{
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
{
- ui->close();
+ ui->closeFloater();
}
else {
ui->setParcel(
@@ -566,8 +565,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
{
check->set(false);
check->setEnabled(true);
- check->setCallbackUserData(this);
- check->setCommitCallback(onChangeAgreeCovenant);
+ check->setCommitCallback(onChangeAgreeCovenant, this);
}
LLTextBox* box = getChild<LLTextBox>("covenant_text");
@@ -963,7 +961,7 @@ void LLFloaterBuyLandUI::draw()
if (mBought)
{
- close();
+ closeFloater();
}
else if (needsUpdate)
{
@@ -999,13 +997,6 @@ void LLFloaterBuyLandUI::setMinimized(BOOL minimize)
}
}
-void LLFloaterBuyLandUI::onClose(bool app_quitting)
-{
- LLFloater::onClose(app_quitting);
- destroy();
-}
-
-
void LLFloaterBuyLandUI::refreshUI()
{
// section zero: title area
@@ -1155,7 +1146,7 @@ void LLFloaterBuyLandUI::refreshUI()
if (mIsForGroup)
{
LLStringUtil::format_map_t string_args;
- string_args["[GROUP]"] = std::string(gAgent.mGroupName);
+ string_args["[GROUP]"] = std::string(gAgent.getGroupName());
message += getString("insufficient_land_credits", string_args);
@@ -1169,7 +1160,7 @@ void LLFloaterBuyLandUI::refreshUI()
if (!mParcelValid)
{
- message += "(no parcel selected)";
+ message += getString("no_parcel_selected");
}
else if (mParcelBillableArea == mParcelActualArea)
{
@@ -1225,12 +1216,10 @@ void LLFloaterBuyLandUI::refreshUI()
? LLViewChildren::BADGE_NOTE
: LLViewChildren::BADGE_OK);
- childSetText("purchase_action",
- llformat(
- "Pay L$ %d to %s for this land",
- mParcelPrice,
- mParcelSellerName.c_str()
- ));
+ LLStringUtil::format_map_t string_args;
+ string_args["[AMOUNT]"] = llformat("%d", mParcelPrice);
+ string_args["[SELLER]"] = mParcelSellerName;
+ childSetText("purchase_action", getString("pay_to_for_land", string_args));
childSetVisible("purchase_action", mParcelValid);
std::string reasonString;
@@ -1368,7 +1357,7 @@ void LLFloaterBuyLandUI::onClickBuy(void* data)
void LLFloaterBuyLandUI::onClickCancel(void* data)
{
LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
- self->close();
+ self->closeFloater();
}
// static
@@ -1376,7 +1365,7 @@ void LLFloaterBuyLandUI::onClickErrorWeb(void* data)
{
LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
LLWeb::loadURLExternal(self->mCannotBuyURI);
- self->close();
+ self->closeFloater();
}