summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewtexture.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-08-24 19:22:00 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-08-24 19:22:00 +0100
commite416840f85dc4a367894036b9fe483f17d959c54 (patch)
treee12956cbe7a0082bbaaa545cb80d9e86b13f88e8 /indra/newview/llpreviewtexture.cpp
parent98cc2365034a93c69704daa69efb389799cc9627 (diff)
Backed out changeset c3d41f18ce2b
back-out the back-out for this branch. yay.
Diffstat (limited to 'indra/newview/llpreviewtexture.cpp')
-rw-r--r--indra/newview/llpreviewtexture.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 2eb362cd7e..1155f35de8 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -99,7 +99,7 @@ BOOL LLPreviewTexture::postBuild()
{
getChild<LLButton>("Keep")->setLabel(getString("Copy"));
childSetAction("Keep",LLPreview::onBtnCopyToInv,this);
- childSetVisible("Discard", false);
+ getChildView("Discard")->setVisible( false);
}
else if (mShowKeepDiscard)
{
@@ -108,13 +108,13 @@ BOOL LLPreviewTexture::postBuild()
}
else
{
- childSetVisible("Keep", false);
- childSetVisible("Discard", false);
+ getChildView("Keep")->setVisible( false);
+ getChildView("Discard")->setVisible( false);
}
childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this);
- childSetVisible("save_tex_btn", true);
- childSetEnabled("save_tex_btn", canSaveAs());
+ getChildView("save_tex_btn")->setVisible( true);
+ getChildView("save_tex_btn")->setEnabled(canSaveAs());
if (!mCopyToInv)
{
@@ -123,8 +123,8 @@ BOOL LLPreviewTexture::postBuild()
if (item)
{
childSetCommitCallback("desc", LLPreview::onText, this);
- childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
+ getChild<LLUICtrl>("desc")->setValue(item->getDescription());
+ getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
}
}
@@ -283,8 +283,7 @@ void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPreview::reshape(width, height, called_from_parent);
- LLRect dim_rect;
- childGetRect("dimensions", dim_rect);
+ LLRect dim_rect(getChildView("dimensions")->getRect());
S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
@@ -406,12 +405,11 @@ void LLPreviewTexture::updateDimensions()
mUpdateDimensions = FALSE;
- childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->getFullWidth()));
- childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->getFullHeight()));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth()));
+ getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
- LLRect dim_rect;
- childGetRect("dimensions", dim_rect);
+ LLRect dim_rect(getChildView("dimensions")->getRect());
S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
@@ -485,9 +483,8 @@ void LLPreviewTexture::updateDimensions()
// Hide the aspect ratio label if the window is too narrow
// Assumes the label should be to the right of the dimensions
- LLRect aspect_label_rect;
- childGetRect("aspect_ratio", aspect_label_rect);
- childSetVisible("aspect_ratio", dim_rect.mRight < aspect_label_rect.mLeft);
+ LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
+ getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
}
@@ -544,7 +541,7 @@ void LLPreviewTexture::loadAsset()
mAssetStatus = PREVIEW_ASSET_LOADING;
mUpdateDimensions = TRUE;
updateDimensions();
- childSetEnabled("save_tex_btn", canSaveAs());
+ getChildView("save_tex_btn")->setEnabled(canSaveAs());
}
LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus()