From e416840f85dc4a367894036b9fe483f17d959c54 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 19:22:00 +0100 Subject: Backed out changeset c3d41f18ce2b back-out the back-out for this branch. yay. --- indra/newview/llpreviewtexture.cpp | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'indra/newview/llpreviewtexture.cpp') 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("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("desc")->setValue(item->getDescription()); + getChild("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("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth())); + getChild("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() -- cgit v1.2.3