summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmediasettingsgeneral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp')
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp62
1 files changed, 28 insertions, 34 deletions
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index f601a8d51c..92c8365a70 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -2,31 +2,25 @@
* @file llpanelmediasettingsgeneral.cpp
* @brief LLPanelMediaSettingsGeneral class implementation
*
- * $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2009&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$
*/
@@ -131,13 +125,13 @@ void LLPanelMediaSettingsGeneral::draw()
// enable/disable pixel values image entry based on auto scale checkbox
if ( mAutoScale->getValue().asBoolean() == false )
{
- childSetEnabled( LLMediaEntry::WIDTH_PIXELS_KEY, true );
- childSetEnabled( LLMediaEntry::HEIGHT_PIXELS_KEY, true );
+ getChildView( LLMediaEntry::WIDTH_PIXELS_KEY )->setEnabled( true );
+ getChildView( LLMediaEntry::HEIGHT_PIXELS_KEY )->setEnabled( true );
}
else
{
- childSetEnabled( LLMediaEntry::WIDTH_PIXELS_KEY, false );
- childSetEnabled( LLMediaEntry::HEIGHT_PIXELS_KEY, false );
+ getChildView( LLMediaEntry::WIDTH_PIXELS_KEY )->setEnabled( false );
+ getChildView( LLMediaEntry::HEIGHT_PIXELS_KEY )->setEnabled( false );
};
// enable/disable UI based on type of media
@@ -158,17 +152,17 @@ void LLPanelMediaSettingsGeneral::draw()
bool show_time_controls = media_plugin->pluginSupportsMediaTime();
if ( show_time_controls )
{
- childSetEnabled( LLMediaEntry::CURRENT_URL_KEY, false );
+ getChildView( LLMediaEntry::CURRENT_URL_KEY )->setEnabled( false );
reset_button_is_active = false;
- childSetEnabled( "current_url_label", false );
- childSetEnabled( LLMediaEntry::AUTO_LOOP_KEY, true );
+ getChildView("current_url_label")->setEnabled(false );
+ getChildView( LLMediaEntry::AUTO_LOOP_KEY )->setEnabled( true );
}
else
{
- childSetEnabled( LLMediaEntry::CURRENT_URL_KEY, true );
+ getChildView( LLMediaEntry::CURRENT_URL_KEY )->setEnabled( true );
reset_button_is_active = true;
- childSetEnabled( "current_url_label", true );
- childSetEnabled( LLMediaEntry::AUTO_LOOP_KEY, false );
+ getChildView("current_url_label")->setEnabled(true );
+ getChildView( LLMediaEntry::AUTO_LOOP_KEY )->setEnabled( false );
};
};
};
@@ -185,18 +179,18 @@ void LLPanelMediaSettingsGeneral::draw()
// user has perms to press reset button and it is active
if ( user_can_press_reset )
{
- childSetEnabled( "current_url_reset_btn", true );
+ getChildView("current_url_reset_btn")->setEnabled(true );
}
// user does not has perms to press reset button and it is active
else
{
- childSetEnabled( "current_url_reset_btn", false );
+ getChildView("current_url_reset_btn")->setEnabled(false );
};
}
else
// reset button is inactive so we just slam it to off - other states don't matter
{
- childSetEnabled( "current_url_reset_btn", false );
+ getChildView("current_url_reset_btn")->setEnabled(false );
};
}