summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermediabrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermediabrowser.cpp')
-rw-r--r--indra/newview/llfloatermediabrowser.cpp70
1 files changed, 32 insertions, 38 deletions
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
index 5673550fbe..434d0681ab 100644
--- a/indra/newview/llfloatermediabrowser.cpp
+++ b/indra/newview/llfloatermediabrowser.cpp
@@ -2,31 +2,25 @@
* @file llfloatermediabrowser.cpp
* @brief media browser floater - uses embedded media browser control
*
- * $LicenseInfo:firstyear=2006&license=viewergpl$
- *
- * Copyright (c) 2006-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2006&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$
*/
@@ -65,12 +59,12 @@ LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& key)
void LLFloaterMediaBrowser::draw()
{
- childSetEnabled("go", !mAddressCombo->getValue().asString().empty());
+ getChildView("go")->setEnabled(!mAddressCombo->getValue().asString().empty());
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if(parcel)
{
- childSetVisible("parcel_owner_controls", LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA));
- childSetEnabled("assign", !mAddressCombo->getValue().asString().empty());
+ getChildView("parcel_owner_controls")->setVisible( LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA));
+ getChildView("assign")->setEnabled(!mAddressCombo->getValue().asString().empty());
}
bool show_time_controls = false;
bool media_playing = false;
@@ -83,17 +77,17 @@ void LLFloaterMediaBrowser::draw()
media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING;
}
}
- childSetVisible("rewind", show_time_controls);
- childSetVisible("play", show_time_controls && ! media_playing);
- childSetVisible("pause", show_time_controls && media_playing);
- childSetVisible("stop", show_time_controls);
- childSetVisible("seek", show_time_controls);
+ getChildView("rewind")->setVisible( show_time_controls);
+ getChildView("play")->setVisible( show_time_controls && ! media_playing);
+ getChildView("pause")->setVisible( show_time_controls && media_playing);
+ getChildView("stop")->setVisible( show_time_controls);
+ getChildView("seek")->setVisible( show_time_controls);
- childSetEnabled("play", ! media_playing);
- childSetEnabled("stop", media_playing);
+ getChildView("play")->setEnabled(! media_playing);
+ getChildView("stop")->setEnabled(media_playing);
- childSetEnabled("back", mBrowser->canNavigateBack());
- childSetEnabled("forward", mBrowser->canNavigateForward());
+ getChildView("back")->setEnabled(mBrowser->canNavigateBack());
+ getChildView("forward")->setEnabled(mBrowser->canNavigateForward());
LLFloater::draw();
}
@@ -173,8 +167,8 @@ void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEve
else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{
// This is the event these flags are sent with.
- childSetEnabled("back", self->getHistoryBackAvailable());
- childSetEnabled("forward", self->getHistoryForwardAvailable());
+ getChildView("back")->setEnabled(self->getHistoryBackAvailable());
+ getChildView("forward")->setEnabled(self->getHistoryForwardAvailable());
}
}
void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
@@ -192,9 +186,9 @@ void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
LLURLHistory::removeURL("browser", mCurrentURL);
LLURLHistory::addURL("browser", mCurrentURL);
}
- childSetEnabled("back", mBrowser->canNavigateBack());
- childSetEnabled("forward", mBrowser->canNavigateForward());
- childSetEnabled("reload", TRUE);
+ getChildView("back")->setEnabled(mBrowser->canNavigateBack());
+ getChildView("forward")->setEnabled(mBrowser->canNavigateForward());
+ getChildView("reload")->setEnabled(TRUE);
}
void LLFloaterMediaBrowser::onOpen(const LLSD& media_url)