summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterauction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterauction.cpp')
-rw-r--r--indra/newview/llfloaterauction.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 698ccec9c1..b0265e6cd2 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -46,6 +46,7 @@
#include "llagent.h"
#include "llcombobox.h"
+#include "llmimetypes.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llsavedsettingsglue.h"
@@ -114,20 +115,20 @@ void LLFloaterAuction::initialize()
mParcelID = parcelp->getLocalID();
mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate");
- childSetText("parcel_text", parcelp->getName());
- childEnable("snapshot_btn");
- childEnable("reset_parcel_btn");
- childEnable("start_auction_btn");
+ getChild<LLUICtrl>("parcel_text")->setValue(parcelp->getName());
+ getChildView("snapshot_btn")->setEnabled(TRUE);
+ getChildView("reset_parcel_btn")->setEnabled(TRUE);
+ getChildView("start_auction_btn")->setEnabled(TRUE);
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
if (panel)
{ // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
U32 estate_id = panel->getEstateID();
- childSetEnabled("sell_to_anyone_btn", (estate_id == ESTATE_TEEN || estate_id == 0));
+ getChildView("sell_to_anyone_btn")->setEnabled((estate_id == ESTATE_TEEN || estate_id == 0));
}
else
{ // Don't have the panel up, so don't know if we're on the teen grid or not. Default to enabling it
- childEnable("sell_to_anyone_btn");
+ getChildView("sell_to_anyone_btn")->setEnabled(TRUE);
}
}
else
@@ -135,17 +136,17 @@ void LLFloaterAuction::initialize()
mParcelHost.invalidate();
if(parcelp && parcelp->getForSale())
{
- childSetText("parcel_text", getString("already for sale"));
+ getChild<LLUICtrl>("parcel_text")->setValue(getString("already for sale"));
}
else
{
- childSetText("parcel_text", LLStringUtil::null);
+ getChild<LLUICtrl>("parcel_text")->setValue(LLStringUtil::null);
}
mParcelID = -1;
- childSetEnabled("snapshot_btn", false);
- childSetEnabled("reset_parcel_btn", false);
- childSetEnabled("sell_to_anyone_btn", false);
- childSetEnabled("start_auction_btn", false);
+ getChildView("snapshot_btn")->setEnabled(false);
+ getChildView("reset_parcel_btn")->setEnabled(false);
+ getChildView("sell_to_anyone_btn")->setEnabled(false);
+ getChildView("start_auction_btn")->setEnabled(false);
}
mImageID.setNull();
@@ -158,9 +159,10 @@ void LLFloaterAuction::draw()
if(!isMinimized() && mImage.notNull())
{
- LLRect rect;
- if (childGetRect("snapshot_icon", rect))
+ LLView* snapshot_icon = findChildView("snapshot_icon");
+ if (snapshot_icon)
{
+ LLRect rect = snapshot_icon->getRect();
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gl_rect_2d(rect, LLColor4(0.f, 0.f, 0.f, 1.f));
@@ -187,7 +189,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
LLPointer<LLImageRaw> raw = new LLImageRaw;
- gForceRenderLandFence = self->childGetValue("fence_check").asBoolean();
+ gForceRenderLandFence = self->getChild<LLUICtrl>("fence_check")->getValue().asBoolean();
BOOL success = gViewerWindow->rawSnapshot(raw,
gViewerWindow->getWindowWidthScaled(),
gViewerWindow->getWindowHeightScaled(),
@@ -235,7 +237,7 @@ void LLFloaterAuction::onClickStartAuction(void* data)
if(self->mImageID.notNull())
{
- LLSD parcel_name = self->childGetValue("parcel_text");
+ LLSD parcel_name = self->getChild<LLUICtrl>("parcel_text")->getValue();
// create the asset
std::string* name = new std::string(parcel_name.asString());
@@ -344,14 +346,14 @@ void LLFloaterAuction::doResetParcel()
std::string new_name(parcel_name.str().c_str());
body["name"] = new_name;
- childSetText("parcel_text", new_name); // Set name in dialog as well, since it won't get updated otherwise
+ getChild<LLUICtrl>("parcel_text")->setValue(new_name); // Set name in dialog as well, since it won't get updated otherwise
body["sale_price"] = (S32) 0;
body["description"] = empty;
body["music_url"] = empty;
body["media_url"] = empty;
body["media_desc"] = empty;
- body["media_type"] = std::string("none/none");
+ body["media_type"] = LLMIMETypes::getDefaultMimeType();
body["media_width"] = (S32) 0;
body["media_height"] = (S32) 0;
body["auto_scale"] = (S32) 0;