diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
commit | 98cc2365034a93c69704daa69efb389799cc9627 (patch) | |
tree | 4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/newview/llpreviewtexture.cpp | |
parent | 6ba23344c95157793af9e4154933ae8df61630e8 (diff) |
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
Diffstat (limited to 'indra/newview/llpreviewtexture.cpp')
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 1155f35de8..2eb362cd7e 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); - getChildView("Discard")->setVisible( false); + childSetVisible("Discard", false); } else if (mShowKeepDiscard) { @@ -108,13 +108,13 @@ BOOL LLPreviewTexture::postBuild() } else { - getChildView("Keep")->setVisible( false); - getChildView("Discard")->setVisible( false); + childSetVisible("Keep", false); + childSetVisible("Discard", false); } childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); - getChildView("save_tex_btn")->setVisible( true); - getChildView("save_tex_btn")->setEnabled(canSaveAs()); + childSetVisible("save_tex_btn", true); + childSetEnabled("save_tex_btn", canSaveAs()); if (!mCopyToInv) { @@ -123,8 +123,8 @@ BOOL LLPreviewTexture::postBuild() if (item) { childSetCommitCallback("desc", LLPreview::onText, this); - getChild<LLUICtrl>("desc")->setValue(item->getDescription()); - getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); + childSetText("desc", item->getDescription()); + childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe); } } @@ -283,7 +283,8 @@ void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent) { LLPreview::reshape(width, height, called_from_parent); - LLRect dim_rect(getChildView("dimensions")->getRect()); + LLRect dim_rect; + childGetRect("dimensions", dim_rect); S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE; @@ -405,11 +406,12 @@ void LLPreviewTexture::updateDimensions() mUpdateDimensions = FALSE; - getChild<LLUICtrl>("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth())); - getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight())); + childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->getFullWidth())); + childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->getFullHeight())); - LLRect dim_rect(getChildView("dimensions")->getRect()); + LLRect dim_rect; + childGetRect("dimensions", dim_rect); S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE; @@ -483,8 +485,9 @@ 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(getChildView("aspect_ratio")->getRect()); - getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft); + LLRect aspect_label_rect; + childGetRect("aspect_ratio", aspect_label_rect); + childSetVisible("aspect_ratio", dim_rect.mRight < aspect_label_rect.mLeft); } @@ -541,7 +544,7 @@ void LLPreviewTexture::loadAsset() mAssetStatus = PREVIEW_ASSET_LOADING; mUpdateDimensions = TRUE; updateDimensions(); - getChildView("save_tex_btn")->setEnabled(canSaveAs()); + childSetEnabled("save_tex_btn", canSaveAs()); } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() |