diff options
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 1056b93e3c..1625b4bafd 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -223,7 +223,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID())) { // no copy texture - childSetValue("apply_immediate_check", FALSE); + getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE); mNoCopyTextureSelected = TRUE; } mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO); @@ -233,7 +233,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id) void LLFloaterTexturePicker::setActive( BOOL active ) { - if (!active && childGetValue("Pipette").asBoolean()) + if (!active && getChild<LLUICtrl>("Pipette")->getValue().asBoolean()) { stopUsingPipette(); } @@ -245,7 +245,7 @@ void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) mCanApplyImmediately = b; if (!mCanApplyImmediately) { - childSetValue("apply_immediate_check", FALSE); + getChild<LLUICtrl>("apply_immediate_check")->setValue(FALSE); } updateFilterPermMask(); } @@ -400,7 +400,7 @@ BOOL LLFloaterTexturePicker::postBuild() childSetCommitCallback("show_folders_check", onShowFolders, this); - childSetVisible("show_folders_check", FALSE); + getChildView("show_folders_check")->setVisible( FALSE); mFilterEdit = getChild<LLFilterEditor>("inventory search editor"); mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2)); @@ -439,12 +439,12 @@ BOOL LLFloaterTexturePicker::postBuild() mNoCopyTextureSelected = FALSE; - childSetValue("apply_immediate_check", gSavedSettings.getBOOL("ApplyTextureImmediately")); + getChild<LLUICtrl>("apply_immediate_check")->setValue(gSavedSettings.getBOOL("ApplyTextureImmediately")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); if (!mCanApplyImmediately) { - childSetEnabled("show_folders_check", FALSE); + getChildView("show_folders_check")->setEnabled(FALSE); } getChild<LLUICtrl>("Pipette")->setCommitCallback( boost::bind(&LLFloaterTexturePicker::onBtnPipette, this)); @@ -521,10 +521,10 @@ void LLFloaterTexturePicker::draw() updateImageStats(); // if we're inactive, gray out "apply immediate" checkbox - childSetEnabled("show_folders_check", mActive && mCanApplyImmediately && !mNoCopyTextureSelected); - childSetEnabled("Select", mActive); - childSetEnabled("Pipette", mActive); - childSetValue("Pipette", LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); + getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected); + getChildView("Select")->setEnabled(mActive); + getChildView("Pipette")->setEnabled(mActive); + getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); //BOOL allow_copy = FALSE; if( mOwner ) @@ -541,9 +541,9 @@ void LLFloaterTexturePicker::draw() mTentativeLabel->setVisible( FALSE ); } - childSetEnabled("Default", mImageAssetID != mOwner->getDefaultImageAssetID()); - childSetEnabled("Blank", mImageAssetID != mWhiteImageAssetID ); - childSetEnabled("None", mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); + getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID()); + getChildView("Blank")->setEnabled(mImageAssetID != mWhiteImageAssetID ); + getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); LLFloater::draw(); @@ -673,13 +673,13 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL co PermissionMask LLFloaterTexturePicker::getFilterPermMask() { - bool apply_immediate = childGetValue("apply_immediate_check").asBoolean(); + bool apply_immediate = getChild<LLUICtrl>("apply_immediate_check")->getValue().asBoolean(); return apply_immediate ? mImmediateFilterPermMask : mNonImmediateFilterPermMask; } void LLFloaterTexturePicker::commitIfImmediateSet() { - bool apply_immediate = childGetValue("apply_immediate_check").asBoolean(); + bool apply_immediate = getChild<LLUICtrl>("apply_immediate_check")->getValue().asBoolean(); if (!mNoCopyTextureSelected && apply_immediate && mOwner) { mOwner->onFloaterCommit(LLTextureCtrl::TEXTURE_CHANGE); @@ -752,7 +752,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata) void LLFloaterTexturePicker::onBtnPipette() { - BOOL pipette_active = childGetValue("Pipette").asBoolean(); + BOOL pipette_active = getChild<LLUICtrl>("Pipette")->getValue().asBoolean(); pipette_active = !pipette_active; if (pipette_active) { |