From de65b93f082a680b86b6afed59f028d0bddb0eb6 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 15 Jul 2010 17:07:05 -0700 Subject: Fix for EXT-8230 LLPanelMediaSettingsPermissions::initValues() was referencing both XUI elements that don't exist and strings that don't appear in strings.xml. Also fixed a number of elements in panel_media_settings_permissions.xml and floater_tools.xml that weren't graying out properly when non-editable items were selected, and some mixed up image attributes that made the media "gear" icon states look wrong. --- indra/newview/llpanelface.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7d5be39074..e3503c065b 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -505,8 +505,6 @@ void LLPanelFace::getState() // Texture scale { - childSetEnabled("tex scale",editable); - //mLabelTexScale->setEnabled( editable ); F32 scale_s = 1.f; struct f2 : public LLSelectedTEGetFunctor { @@ -577,7 +575,6 @@ void LLPanelFace::getState() // Texture rotation { - childSetEnabled("tex rotate",editable); F32 rotation = 0.f; struct f6 : public LLSelectedTEGetFunctor { @@ -720,14 +717,9 @@ void LLPanelFace::getState() if (selected_texgen == 1) { - childSetText("tex scale",getString("string repeats per meter")); childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() ); childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() ); } - else - { - childSetText("tex scale",getString("string repeats per face")); - } } @@ -802,9 +794,7 @@ void LLPanelFace::getState() } childSetEnabled("color trans",FALSE); childSetEnabled("rpt",FALSE); - childSetEnabled("tex scale",FALSE); childSetEnabled("tex offset",FALSE); - childSetEnabled("tex rotate",FALSE); childSetEnabled("tex gen",FALSE); childSetEnabled("label shininess",FALSE); childSetEnabled("label bumpiness",FALSE); -- cgit v1.2.3 From 566e3969f98c7ac10fe151ba119a78ac5eda2e3c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 30 Jul 2010 10:02:30 -0700 Subject: deprecated LLPanel::child*() methods --- indra/newview/llpanelface.cpp | 134 +++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e3503c065b..36713f65bd 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -394,8 +394,8 @@ void LLPanelFace::getState() BOOL editable = objectp->permModify(); // only turn on auto-adjust button if there is a media renderer and the media is loaded - childSetEnabled("textbox autofix", editable); - childSetEnabled("button align", editable); + getChildView("textbox autofix")->setEnabled(editable); + getChildView("button align")->setEnabled(editable); //if ( LLMediaEngine::getInstance()->getMediaRenderer () ) // if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () ) @@ -405,7 +405,7 @@ void LLPanelFace::getState() // // //mBtnAutoFix->setEnabled ( editable ); // } - childSetEnabled("button apply",editable); + getChildView("button apply")->setEnabled(editable); bool identical; LLTextureCtrl* texture_ctrl = getChild("texture control"); @@ -445,8 +445,8 @@ void LLPanelFace::getState() if(LLViewerMedia::textureHasMedia(id)) { - childSetEnabled("textbox autofix",editable); - childSetEnabled("button align",editable); + getChildView("textbox autofix")->setEnabled(editable); + getChildView("button align")->setEnabled(editable); } if (identical) @@ -514,12 +514,12 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_s ); - childSetValue("TexScaleU",editable ? llabs(scale_s) : 0); - childSetTentative("TexScaleU",LLSD((BOOL)(!identical))); - childSetEnabled("TexScaleU",editable); - childSetValue("checkbox flip s",LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE ))); - childSetTentative("checkbox flip s",LLSD((BOOL)((!identical) ? TRUE : FALSE ))); - childSetEnabled("checkbox flip s",editable); + getChild("TexScaleU")->setValue(editable ? llabs(scale_s) : 0); + getChild("TexScaleU")->setTentative(LLSD((BOOL)(!identical))); + getChildView("TexScaleU")->setEnabled(editable); + getChild("checkbox flip s")->setValue(LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE ))); + getChild("checkbox flip s")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE ))); + getChildView("checkbox flip s")->setEnabled(editable); } { @@ -533,17 +533,17 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_t ); - childSetValue("TexScaleV",llabs(editable ? llabs(scale_t) : 0)); - childSetTentative("TexScaleV",LLSD((BOOL)(!identical))); - childSetEnabled("TexScaleV",editable); - childSetValue("checkbox flip t",LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE ))); - childSetTentative("checkbox flip t",LLSD((BOOL)((!identical) ? TRUE : FALSE ))); - childSetEnabled("checkbox flip t",editable); + getChild("TexScaleV")->setValue(llabs(editable ? llabs(scale_t) : 0)); + getChild("TexScaleV")->setTentative(LLSD((BOOL)(!identical))); + getChildView("TexScaleV")->setEnabled(editable); + getChild("checkbox flip t")->setValue(LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE ))); + getChild("checkbox flip t")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE ))); + getChildView("checkbox flip t")->setEnabled(editable); } // Texture offset { - childSetEnabled("tex offset",editable); + getChildView("tex offset")->setEnabled(editable); F32 offset_s = 0.f; struct f4 : public LLSelectedTEGetFunctor { @@ -553,9 +553,9 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_s ); - childSetValue("TexOffsetU", editable ? offset_s : 0); - childSetTentative("TexOffsetU",!identical); - childSetEnabled("TexOffsetU",editable); + getChild("TexOffsetU")->setValue(editable ? offset_s : 0); + getChild("TexOffsetU")->setTentative(!identical); + getChildView("TexOffsetU")->setEnabled(editable); } { @@ -568,9 +568,9 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_t ); - childSetValue("TexOffsetV", editable ? offset_t : 0); - childSetTentative("TexOffsetV",!identical); - childSetEnabled("TexOffsetV",editable); + getChild("TexOffsetV")->setValue(editable ? offset_t : 0); + getChild("TexOffsetV")->setTentative(!identical); + getChildView("TexOffsetV")->setEnabled(editable); } // Texture rotation @@ -584,9 +584,9 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, rotation ); - childSetValue("TexRot", editable ? rotation * RAD_TO_DEG : 0); - childSetTentative("TexRot",!identical); - childSetEnabled("TexRot",editable); + getChild("TexRot")->setValue(editable ? rotation * RAD_TO_DEG : 0); + getChild("TexRot")->setTentative(!identical); + getChildView("TexRot")->setEnabled(editable); } // Color swatch @@ -612,13 +612,13 @@ void LLPanelFace::getState() } // Color transparency { - childSetEnabled("color trans",editable); + getChildView("color trans")->setEnabled(editable); } F32 transparency = (1.f - color.mV[VALPHA]) * 100.f; { - childSetValue("ColorTrans", editable ? transparency : 0); - childSetEnabled("ColorTrans",editable); + getChild("ColorTrans")->setValue(editable ? transparency : 0); + getChildView("ColorTrans")->setEnabled(editable); } { @@ -632,10 +632,10 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, glow ); - childSetValue("glow",glow); - childSetEnabled("glow",editable); - childSetTentative("glow",!identical); - childSetEnabled("glow label",editable); + getChild("glow")->setValue(glow); + getChildView("glow")->setEnabled(editable); + getChild("glow")->setTentative(!identical); + getChildView("glow label")->setEnabled(editable); } @@ -660,9 +660,9 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox shininess'" << llendl; } - childSetEnabled("combobox shininess",editable); - childSetTentative("combobox shininess",!identical); - childSetEnabled("label shininess",editable); + getChildView("combobox shininess")->setEnabled(editable); + getChild("combobox shininess")->setTentative(!identical); + getChildView("label shininess")->setEnabled(editable); } { @@ -685,9 +685,9 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl; } - childSetEnabled("combobox bumpiness",editable); - childSetTentative("combobox bumpiness",!identical); - childSetEnabled("label bumpiness",editable); + getChildView("combobox bumpiness")->setEnabled(editable); + getChild("combobox bumpiness")->setTentative(!identical); + getChildView("label bumpiness")->setEnabled(editable); } { @@ -711,14 +711,14 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl; } - childSetEnabled("combobox texgen",editable); - childSetTentative("combobox texgen",!identical); - childSetEnabled("tex gen",editable); + getChildView("combobox texgen")->setEnabled(editable); + getChild("combobox texgen")->setTentative(!identical); + getChildView("tex gen")->setEnabled(editable); if (selected_texgen == 1) { - childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() ); - childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() ); + getChild("TexScaleU")->setValue(2.0f * getChild("TexScaleU")->getValue().asReal() ); + getChild("TexScaleV")->setValue(2.0f * getChild("TexScaleV")->getValue().asReal() ); } } @@ -734,14 +734,14 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, fullbrightf ); - childSetValue("checkbox fullbright",(S32)fullbrightf); - childSetEnabled("checkbox fullbright",editable); - childSetTentative("checkbox fullbright",!identical); + getChild("checkbox fullbright")->setValue((S32)fullbrightf); + getChildView("checkbox fullbright")->setEnabled(editable); + getChild("checkbox fullbright")->setTentative(!identical); } // Repeats per meter label { - childSetEnabled("rpt",editable); + getChildView("rpt")->setEnabled(editable); } // Repeats per meter @@ -761,14 +761,14 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, repeats ); - childSetValue("rptctrl", editable ? repeats : 0); - childSetTentative("rptctrl",!identical); + getChild("rptctrl")->setValue(editable ? repeats : 0); + getChild("rptctrl")->setTentative(!identical); LLComboBox* mComboTexGen = getChild("combobox texgen"); if (mComboTexGen) { BOOL enabled = editable && (!mComboTexGen || mComboTexGen->getCurrentIndex() != 1); - childSetEnabled("rptctrl",enabled); - childSetEnabled("button apply",enabled); + getChildView("rptctrl")->setEnabled(enabled); + getChildView("button apply")->setEnabled(enabled); } } } @@ -792,19 +792,19 @@ void LLPanelFace::getState() mColorSwatch->setFallbackImageName("locked_image.j2c" ); mColorSwatch->setValid(FALSE); } - childSetEnabled("color trans",FALSE); - childSetEnabled("rpt",FALSE); - childSetEnabled("tex offset",FALSE); - childSetEnabled("tex gen",FALSE); - childSetEnabled("label shininess",FALSE); - childSetEnabled("label bumpiness",FALSE); - - childSetEnabled("textbox autofix",FALSE); - - childSetEnabled("button align",FALSE); - childSetEnabled("button apply",FALSE); - //childSetEnabled("has media", FALSE); - //childSetEnabled("media info set", FALSE); + getChildView("color trans")->setEnabled(FALSE); + getChildView("rpt")->setEnabled(FALSE); + getChildView("tex offset")->setEnabled(FALSE); + getChildView("tex gen")->setEnabled(FALSE); + getChildView("label shininess")->setEnabled(FALSE); + getChildView("label bumpiness")->setEnabled(FALSE); + + getChildView("textbox autofix")->setEnabled(FALSE); + + getChildView("button align")->setEnabled(FALSE); + getChildView("button apply")->setEnabled(FALSE); + //getChildView("has media")->setEnabled(FALSE); + //getChildView("media info set")->setEnabled(FALSE); } } @@ -934,7 +934,7 @@ void LLPanelFace::onClickApply(void* userdata) gFocusMgr.setKeyboardFocus( NULL ); //F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get(); - F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get(); + F32 repeats_per_meter = (F32)self->getChild("rptctrl")->getValue().asReal();//self->mCtrlRepeatsPerMeter->get(); LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter ); } -- cgit v1.2.3 From 06b0d72efa96b6a0ed665f7cd46f358c48929e7b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 13 Aug 2010 07:24:57 -0400 Subject: Change license from GPL to LGPL (version 2.1) --- indra/newview/llpanelface.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7d5be39074..c4bbdb37f8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2,31 +2,25 @@ * @file llpanelface.cpp * @brief Panel in the tools floater for editing face textures, colors, etc. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3 From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- indra/newview/llpanelface.cpp | 144 ++++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 67 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 572e7a6212..c4bbdb37f8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -388,8 +388,8 @@ void LLPanelFace::getState() BOOL editable = objectp->permModify(); // only turn on auto-adjust button if there is a media renderer and the media is loaded - getChildView("textbox autofix")->setEnabled(editable); - getChildView("button align")->setEnabled(editable); + childSetEnabled("textbox autofix", editable); + childSetEnabled("button align", editable); //if ( LLMediaEngine::getInstance()->getMediaRenderer () ) // if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () ) @@ -399,7 +399,7 @@ void LLPanelFace::getState() // // //mBtnAutoFix->setEnabled ( editable ); // } - getChildView("button apply")->setEnabled(editable); + childSetEnabled("button apply",editable); bool identical; LLTextureCtrl* texture_ctrl = getChild("texture control"); @@ -439,8 +439,8 @@ void LLPanelFace::getState() if(LLViewerMedia::textureHasMedia(id)) { - getChildView("textbox autofix")->setEnabled(editable); - getChildView("button align")->setEnabled(editable); + childSetEnabled("textbox autofix",editable); + childSetEnabled("button align",editable); } if (identical) @@ -499,6 +499,8 @@ void LLPanelFace::getState() // Texture scale { + childSetEnabled("tex scale",editable); + //mLabelTexScale->setEnabled( editable ); F32 scale_s = 1.f; struct f2 : public LLSelectedTEGetFunctor { @@ -508,12 +510,12 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_s ); - getChild("TexScaleU")->setValue(editable ? llabs(scale_s) : 0); - getChild("TexScaleU")->setTentative(LLSD((BOOL)(!identical))); - getChildView("TexScaleU")->setEnabled(editable); - getChild("checkbox flip s")->setValue(LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE ))); - getChild("checkbox flip s")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE ))); - getChildView("checkbox flip s")->setEnabled(editable); + childSetValue("TexScaleU",editable ? llabs(scale_s) : 0); + childSetTentative("TexScaleU",LLSD((BOOL)(!identical))); + childSetEnabled("TexScaleU",editable); + childSetValue("checkbox flip s",LLSD((BOOL)(scale_s < 0 ? TRUE : FALSE ))); + childSetTentative("checkbox flip s",LLSD((BOOL)((!identical) ? TRUE : FALSE ))); + childSetEnabled("checkbox flip s",editable); } { @@ -527,17 +529,17 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, scale_t ); - getChild("TexScaleV")->setValue(llabs(editable ? llabs(scale_t) : 0)); - getChild("TexScaleV")->setTentative(LLSD((BOOL)(!identical))); - getChildView("TexScaleV")->setEnabled(editable); - getChild("checkbox flip t")->setValue(LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE ))); - getChild("checkbox flip t")->setTentative(LLSD((BOOL)((!identical) ? TRUE : FALSE ))); - getChildView("checkbox flip t")->setEnabled(editable); + childSetValue("TexScaleV",llabs(editable ? llabs(scale_t) : 0)); + childSetTentative("TexScaleV",LLSD((BOOL)(!identical))); + childSetEnabled("TexScaleV",editable); + childSetValue("checkbox flip t",LLSD((BOOL)(scale_t< 0 ? TRUE : FALSE ))); + childSetTentative("checkbox flip t",LLSD((BOOL)((!identical) ? TRUE : FALSE ))); + childSetEnabled("checkbox flip t",editable); } // Texture offset { - getChildView("tex offset")->setEnabled(editable); + childSetEnabled("tex offset",editable); F32 offset_s = 0.f; struct f4 : public LLSelectedTEGetFunctor { @@ -547,9 +549,9 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_s ); - getChild("TexOffsetU")->setValue(editable ? offset_s : 0); - getChild("TexOffsetU")->setTentative(!identical); - getChildView("TexOffsetU")->setEnabled(editable); + childSetValue("TexOffsetU", editable ? offset_s : 0); + childSetTentative("TexOffsetU",!identical); + childSetEnabled("TexOffsetU",editable); } { @@ -562,13 +564,14 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, offset_t ); - getChild("TexOffsetV")->setValue(editable ? offset_t : 0); - getChild("TexOffsetV")->setTentative(!identical); - getChildView("TexOffsetV")->setEnabled(editable); + childSetValue("TexOffsetV", editable ? offset_t : 0); + childSetTentative("TexOffsetV",!identical); + childSetEnabled("TexOffsetV",editable); } // Texture rotation { + childSetEnabled("tex rotate",editable); F32 rotation = 0.f; struct f6 : public LLSelectedTEGetFunctor { @@ -578,9 +581,9 @@ void LLPanelFace::getState() } } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, rotation ); - getChild("TexRot")->setValue(editable ? rotation * RAD_TO_DEG : 0); - getChild("TexRot")->setTentative(!identical); - getChildView("TexRot")->setEnabled(editable); + childSetValue("TexRot", editable ? rotation * RAD_TO_DEG : 0); + childSetTentative("TexRot",!identical); + childSetEnabled("TexRot",editable); } // Color swatch @@ -606,13 +609,13 @@ void LLPanelFace::getState() } // Color transparency { - getChildView("color trans")->setEnabled(editable); + childSetEnabled("color trans",editable); } F32 transparency = (1.f - color.mV[VALPHA]) * 100.f; { - getChild("ColorTrans")->setValue(editable ? transparency : 0); - getChildView("ColorTrans")->setEnabled(editable); + childSetValue("ColorTrans", editable ? transparency : 0); + childSetEnabled("ColorTrans",editable); } { @@ -626,10 +629,10 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, glow ); - getChild("glow")->setValue(glow); - getChildView("glow")->setEnabled(editable); - getChild("glow")->setTentative(!identical); - getChildView("glow label")->setEnabled(editable); + childSetValue("glow",glow); + childSetEnabled("glow",editable); + childSetTentative("glow",!identical); + childSetEnabled("glow label",editable); } @@ -654,9 +657,9 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox shininess'" << llendl; } - getChildView("combobox shininess")->setEnabled(editable); - getChild("combobox shininess")->setTentative(!identical); - getChildView("label shininess")->setEnabled(editable); + childSetEnabled("combobox shininess",editable); + childSetTentative("combobox shininess",!identical); + childSetEnabled("label shininess",editable); } { @@ -679,9 +682,9 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox bumpiness'" << llendl; } - getChildView("combobox bumpiness")->setEnabled(editable); - getChild("combobox bumpiness")->setTentative(!identical); - getChildView("label bumpiness")->setEnabled(editable); + childSetEnabled("combobox bumpiness",editable); + childSetTentative("combobox bumpiness",!identical); + childSetEnabled("label bumpiness",editable); } { @@ -705,14 +708,19 @@ void LLPanelFace::getState() { llwarns << "failed childGetSelectionInterface for 'combobox texgen'" << llendl; } - getChildView("combobox texgen")->setEnabled(editable); - getChild("combobox texgen")->setTentative(!identical); - getChildView("tex gen")->setEnabled(editable); + childSetEnabled("combobox texgen",editable); + childSetTentative("combobox texgen",!identical); + childSetEnabled("tex gen",editable); if (selected_texgen == 1) { - getChild("TexScaleU")->setValue(2.0f * getChild("TexScaleU")->getValue().asReal() ); - getChild("TexScaleV")->setValue(2.0f * getChild("TexScaleV")->getValue().asReal() ); + childSetText("tex scale",getString("string repeats per meter")); + childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() ); + childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() ); + } + else + { + childSetText("tex scale",getString("string repeats per face")); } } @@ -728,14 +736,14 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, fullbrightf ); - getChild("checkbox fullbright")->setValue((S32)fullbrightf); - getChildView("checkbox fullbright")->setEnabled(editable); - getChild("checkbox fullbright")->setTentative(!identical); + childSetValue("checkbox fullbright",(S32)fullbrightf); + childSetEnabled("checkbox fullbright",editable); + childSetTentative("checkbox fullbright",!identical); } // Repeats per meter label { - getChildView("rpt")->setEnabled(editable); + childSetEnabled("rpt",editable); } // Repeats per meter @@ -755,14 +763,14 @@ void LLPanelFace::getState() } func; identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, repeats ); - getChild("rptctrl")->setValue(editable ? repeats : 0); - getChild("rptctrl")->setTentative(!identical); + childSetValue("rptctrl", editable ? repeats : 0); + childSetTentative("rptctrl",!identical); LLComboBox* mComboTexGen = getChild("combobox texgen"); if (mComboTexGen) { BOOL enabled = editable && (!mComboTexGen || mComboTexGen->getCurrentIndex() != 1); - getChildView("rptctrl")->setEnabled(enabled); - getChildView("button apply")->setEnabled(enabled); + childSetEnabled("rptctrl",enabled); + childSetEnabled("button apply",enabled); } } } @@ -786,19 +794,21 @@ void LLPanelFace::getState() mColorSwatch->setFallbackImageName("locked_image.j2c" ); mColorSwatch->setValid(FALSE); } - getChildView("color trans")->setEnabled(FALSE); - getChildView("rpt")->setEnabled(FALSE); - getChildView("tex offset")->setEnabled(FALSE); - getChildView("tex gen")->setEnabled(FALSE); - getChildView("label shininess")->setEnabled(FALSE); - getChildView("label bumpiness")->setEnabled(FALSE); - - getChildView("textbox autofix")->setEnabled(FALSE); - - getChildView("button align")->setEnabled(FALSE); - getChildView("button apply")->setEnabled(FALSE); - //getChildView("has media")->setEnabled(FALSE); - //getChildView("media info set")->setEnabled(FALSE); + childSetEnabled("color trans",FALSE); + childSetEnabled("rpt",FALSE); + childSetEnabled("tex scale",FALSE); + childSetEnabled("tex offset",FALSE); + childSetEnabled("tex rotate",FALSE); + childSetEnabled("tex gen",FALSE); + childSetEnabled("label shininess",FALSE); + childSetEnabled("label bumpiness",FALSE); + + childSetEnabled("textbox autofix",FALSE); + + childSetEnabled("button align",FALSE); + childSetEnabled("button apply",FALSE); + //childSetEnabled("has media", FALSE); + //childSetEnabled("media info set", FALSE); } } @@ -928,7 +938,7 @@ void LLPanelFace::onClickApply(void* userdata) gFocusMgr.setKeyboardFocus( NULL ); //F32 repeats_per_meter = self->mCtrlRepeatsPerMeter->get(); - F32 repeats_per_meter = (F32)self->getChild("rptctrl")->getValue().asReal();//self->mCtrlRepeatsPerMeter->get(); + F32 repeats_per_meter = (F32)self->childGetValue( "rptctrl" ).asReal();//self->mCtrlRepeatsPerMeter->get(); LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter ); } -- cgit v1.2.3 From 7844914b03c062596812cdad1feffff700bcd45c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 15 Jul 2010 17:07:05 -0700 Subject: Fix for EXT-8230 LLPanelMediaSettingsPermissions::initValues() was referencing both XUI elements that don't exist and strings that don't appear in strings.xml. Also fixed a number of elements in panel_media_settings_permissions.xml and floater_tools.xml that weren't graying out properly when non-editable items were selected, and some mixed up image attributes that made the media "gear" icon states look wrong. --- indra/newview/llpanelface.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7d5be39074..e3503c065b 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -505,8 +505,6 @@ void LLPanelFace::getState() // Texture scale { - childSetEnabled("tex scale",editable); - //mLabelTexScale->setEnabled( editable ); F32 scale_s = 1.f; struct f2 : public LLSelectedTEGetFunctor { @@ -577,7 +575,6 @@ void LLPanelFace::getState() // Texture rotation { - childSetEnabled("tex rotate",editable); F32 rotation = 0.f; struct f6 : public LLSelectedTEGetFunctor { @@ -720,14 +717,9 @@ void LLPanelFace::getState() if (selected_texgen == 1) { - childSetText("tex scale",getString("string repeats per meter")); childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() ); childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() ); } - else - { - childSetText("tex scale",getString("string repeats per face")); - } } @@ -802,9 +794,7 @@ void LLPanelFace::getState() } childSetEnabled("color trans",FALSE); childSetEnabled("rpt",FALSE); - childSetEnabled("tex scale",FALSE); childSetEnabled("tex offset",FALSE); - childSetEnabled("tex rotate",FALSE); childSetEnabled("tex gen",FALSE); childSetEnabled("label shininess",FALSE); childSetEnabled("label bumpiness",FALSE); -- cgit v1.2.3