diff options
author | Richard Nelson <none@none> | 2010-07-30 10:02:30 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-07-30 10:02:30 -0700 |
commit | 566e3969f98c7ac10fe151ba119a78ac5eda2e3c (patch) | |
tree | 1cc7ae3cfca94a0417d9de1fe600304b7cf7cc6c /indra/newview/llpreviewtexture.cpp | |
parent | 147bc94274719db95462d2907872f52efe4fcb3d (diff) |
deprecated LLPanel::child*() methods
Diffstat (limited to 'indra/newview/llpreviewtexture.cpp')
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 7fdc5c8b5f..c1cb386556 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -105,7 +105,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) { @@ -114,13 +114,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) { @@ -129,8 +129,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); } } @@ -289,8 +289,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; @@ -412,12 +411,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; @@ -491,9 +489,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); } @@ -550,7 +547,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() |