diff --git a/etc/message.xml b/etc/message.xml index ea6fc8146..fd019aa70 100644 --- a/etc/message.xml +++ b/etc/message.xml @@ -718,7 +718,14 @@ UploadBakedTexture true - + + ObjectMedia + false + + ObjectMediaNavigate + false + + messageBans diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index fc5484433..c5ff97ef7 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -128,7 +128,7 @@ void LLPluginClassMedia::reset_impl(void) void LLPluginClassMedia::idle_impl(void) { - if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked())) + if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL)) { // Can't process a size change at this time } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0da5098d0..682c43939 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -981,7 +981,6 @@ set(viewer_HEADER_FILES llviewerlayer.h llviewermedia.h llviewermediafocus.h - llviewermediaobserver.h llviewermenu.h llviewermenufile.h llviewermessage.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index cef6e295d..8569c5258 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2247,17 +2247,6 @@ This should be as low as possible, but too low may break functionality Value 1 - AudioStreamingVideo - - Comment - Enable streaming video - Persist - 1 - Type - Boolean - Value - 0 - AuditTexture Comment diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp deleted file mode 100644 index 43abcb8c0..000000000 --- a/indra/newview/llfloatermediabrowser.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/** - * @file llfloaterhtmlhelp.cpp - * @brief HTML Help floater - uses embedded web browser control - * - * $LicenseInfo:firstyear=2006&license=viewergpl$ - * - * Copyright (c) 2006-2009, Linden Research, Inc. - * - * 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 - * - * 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 - * - * 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. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloatermediabrowser.h" -#include "llfloaterhtml.h" - -#include "llparcel.h" -#include "llpluginclassmedia.h" -#include "lluictrlfactory.h" -#include "llmediactrl.h" -#include "llviewerwindow.h" -#include "llviewercontrol.h" -#include "llviewerparcelmgr.h" -#include "llweb.h" -#include "llui.h" -#include "roles_constants.h" -#include "llwindow.h" - -#include "llurlhistory.h" -#include "llmediactrl.h" -#include "llviewermedia.h" -#include "llviewerparcelmedia.h" -#include "llcombobox.h" -#include "llnotificationsutil.h" - -// TEMP -#include "llsdutil.h" - -LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& media_data) -{ - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_browser.xml"); - -} - - -void LLFloaterMediaBrowser::geometryChanged(S32 x, S32 y, S32 width, S32 height) -{ - // Make sure the layout of the browser control is updated, so this calculation is correct. - LLLayoutStack::updateClass(); - - // TODO: need to adjust size and constrain position to make sure floaters aren't moved outside the window view, etc. - LLCoordWindow window_size; - getWindow()->getSize(&window_size); - - // Adjust width and height for the size of the chrome on the Media Browser window. - width += getRect().getWidth() - mBrowser->getRect().getWidth(); - height += getRect().getHeight() - mBrowser->getRect().getHeight(); - - LLRect geom; - geom.setOriginAndSize(x, window_size.mY - (y + height), width, height); - - lldebugs << "geometry change: " << geom << llendl; - - handleReshape(geom,false); -} - -void LLFloaterMediaBrowser::draw() -{ - childSetEnabled("go", !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()); - } - bool show_time_controls = false; - bool media_playing = false; - if(mBrowser) - { - LLPluginClassMedia* media_plugin = mBrowser->getMediaPlugin(); - if(media_plugin) - { - show_time_controls = media_plugin->pluginSupportsMediaTime(); - media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING; - } - } - childSetVisible("time_controls", show_time_controls); - 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); - - childSetEnabled("play", ! media_playing); - childSetEnabled("stop", media_playing); - - childSetEnabled("back", mBrowser->canNavigateBack()); - childSetEnabled("forward", mBrowser->canNavigateForward()); - - LLFloater::draw(); -} - -BOOL LLFloaterMediaBrowser::postBuild() -{ - mBrowser = getChild("browser"); - mBrowser->addObserver(this); - - mAddressCombo = getChild("address"); - mAddressCombo->setCommitCallback(onEnterAddress); - mAddressCombo->setCallbackUserData(this); - mAddressCombo->sortByName(); - - childSetAction("back", onClickBack, this); - childSetAction("forward", onClickForward, this); - childSetAction("reload", onClickRefresh, this); - childSetAction("rewind", onClickRewind, this); - childSetAction("play", onClickPlay, this); - childSetAction("stop", onClickStop, this); - childSetAction("pause", onClickPlay, this); - childSetAction("seek", onClickSeek, this); - childSetAction("go", onClickGo, this); - childSetAction("open_browser", onClickOpenWebBrowser, this); - childSetAction("assign", onClickAssign, this); - - buildURLHistory(); - return TRUE; -} - -void LLFloaterMediaBrowser::buildURLHistory() -{ - LLCtrlListInterface* url_list = childGetListInterface("address"); - if (url_list) - { - url_list->operateOnAll(LLCtrlListInterface::OP_DELETE); - } - - // Get all of the entries in the "browser" collection - LLSD browser_history = LLURLHistory::getURLHistory("browser"); - - LLSD::array_iterator iter_history = - browser_history.beginArray(); - LLSD::array_iterator end_history = - browser_history.endArray(); - for(; iter_history != end_history; ++iter_history) - { - std::string url = (*iter_history).asString(); - if(! url.empty()) - url_list->addSimpleElement(url); - } - - // initialize URL history in the plugin - if(mBrowser && mBrowser->getMediaPlugin()) - { - mBrowser->getMediaPlugin()->initializeUrlHistory(browser_history); - } -} - -std::string LLFloaterMediaBrowser::getSupportURL() -{ - return getString("support_page_url"); -} -void LLFloaterMediaBrowser::onClose(bool app_quitting) -{ - //setVisible(FALSE); - destroy(); -} - -void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) -{ - if(event == MEDIA_EVENT_LOCATION_CHANGED) - { - setCurrentURL(self->getLocation()); - } - else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) - { - // This is the event these flags are sent with. - childSetEnabled("back", self->getHistoryBackAvailable()); - childSetEnabled("forward", self->getHistoryForwardAvailable()); - } - else if(event == MEDIA_EVENT_CLOSE_REQUEST) - { - // The browser instance wants its window closed. - close(); - } - else if(event == MEDIA_EVENT_GEOMETRY_CHANGE) - { - geometryChanged(self->getGeometryX(), self->getGeometryY(), self->getGeometryWidth(), self->getGeometryHeight()); - } -} -void LLFloaterMediaBrowser::setCurrentURL(const std::string& url) -{ - mCurrentURL = url; - - // redirects will navigate momentarily to about:blank, don't add to history - if (mCurrentURL != "about:blank") - { - mAddressCombo->remove(mCurrentURL); - mAddressCombo->add(mCurrentURL, ADD_SORTED); - mAddressCombo->selectByValue(mCurrentURL); - - // Serialize url history - LLURLHistory::removeURL("browser", mCurrentURL); - LLURLHistory::addURL("browser", mCurrentURL); - } - childSetEnabled("back", mBrowser->canNavigateBack()); - childSetEnabled("forward", mBrowser->canNavigateForward()); - childSetEnabled("reload", TRUE); -} - -LLFloaterMediaBrowser* LLFloaterMediaBrowser::showInstance(const LLSD& media_url) -{ - LLFloaterMediaBrowser* floaterp = LLUISingleton >::showInstance(media_url); - - floaterp->openMedia(media_url.asString()); - return floaterp; -} - -//static -void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString()); -} - -//static -void LLFloaterMediaBrowser::onClickRefresh(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - self->mAddressCombo->remove(0); - if( self->mBrowser->getMediaPlugin() && self->mBrowser->getMediaPlugin()->pluginSupportsMediaBrowser()) - { - bool ignore_cache = true; - self->mBrowser->getMediaPlugin()->browse_reload( ignore_cache ); - } - else - { - self->mBrowser->navigateTo(self->mCurrentURL); - } -} - -//static -void LLFloaterMediaBrowser::onClickForward(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - self->mBrowser->navigateForward(); -} - -//static -void LLFloaterMediaBrowser::onClickBack(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - self->mBrowser->navigateBack(); -} - -//static -void LLFloaterMediaBrowser::onClickGo(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString()); -} - -//static -void LLFloaterMediaBrowser::onClickOpenWebBrowser(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - std::string url = self->mCurrentURL.empty() ? - self->mBrowser->getHomePageUrl() : - self->mCurrentURL; - LLWeb::loadURLExternal(url); -} - -void LLFloaterMediaBrowser::onClickAssign(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (!parcel) - { - return; - } - std::string media_url = self->mAddressCombo->getValue().asString(); - LLStringUtil::trim(media_url); - - if(parcel->getMediaType() != "text/html") - { - parcel->setMediaURL(media_url); - parcel->setMediaCurrentURL(media_url); - parcel->setMediaType(std::string("text/html")); - LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel, true ); - LLViewerParcelMedia::sendMediaNavigateMessage(media_url); - LLViewerParcelMedia::stop(); - // LLViewerParcelMedia::update( parcel ); - } - LLViewerParcelMedia::sendMediaNavigateMessage(media_url); -} -//static -void LLFloaterMediaBrowser::onClickRewind(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - if(self->mBrowser->getMediaPlugin()) - self->mBrowser->getMediaPlugin()->start(-2.0f); -} -//static -void LLFloaterMediaBrowser::onClickPlay(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - LLPluginClassMedia* plugin = self->mBrowser->getMediaPlugin(); - if(plugin) - { - if(plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING) - { - plugin->pause(); - } - else - { - plugin->start(); - } - } -} -//static -void LLFloaterMediaBrowser::onClickStop(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - if(self->mBrowser->getMediaPlugin()) - self->mBrowser->getMediaPlugin()->stop(); -} -//static -void LLFloaterMediaBrowser::onClickSeek(void* user_data) -{ - LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data; - - if(self->mBrowser->getMediaPlugin()) - self->mBrowser->getMediaPlugin()->start(2.0f); -} -void LLFloaterMediaBrowser::openMedia(const std::string& media_url) -{ - mBrowser->setHomePageUrl(media_url); - mBrowser->navigateTo(media_url); - setCurrentURL(media_url); -} -//////////////////////////////////////////////////////////////////////////////// -// - -LLViewerHtmlHelp gViewerHtmlHelp; - - -//////////////////////////////////////////////////////////////////////////////// -// -LLViewerHtmlHelp::LLViewerHtmlHelp() -{ - - LLUI::setHtmlHelp(this); -} - -LLViewerHtmlHelp::~LLViewerHtmlHelp() -{ - - LLUI::setHtmlHelp(NULL); -} - -void LLViewerHtmlHelp::show() -{ - show(""); -} - -void LLViewerHtmlHelp::show(std::string url) -{ - LLFloaterMediaBrowser* floater_html = LLFloaterMediaBrowser::getInstance(); - floater_html->setVisible(FALSE); - - if (url.empty()) - { - url = floater_html->getSupportURL(); - } - - if (gSavedSettings.getBOOL("UseExternalBrowser")) - { - LLSD notificationData; - notificationData["url"] = url; - - LLNotificationsUtil::add("ClickOpenF1Help", notificationData, LLSD(), onClickF1HelpLoadURL); - floater_html->close(); - } - else - { - // don't wait, just do it - floater_html->setVisible(TRUE); - floater_html->openMedia(url); - } -} -// static -bool LLViewerHtmlHelp::onClickF1HelpLoadURL(const LLSD& notification, const LLSD& response) -{ - LLFloaterMediaBrowser* floater_html = LLFloaterMediaBrowser::getInstance(); - floater_html->setVisible(FALSE); - std::string url = floater_html->getSupportURL(); - S32 option = LLNotification::getSelectedOption(notification, response); - if (option == 0) - { - LLWeb::loadURL(url); - } - floater_html->close(); - return false; -} - diff --git a/indra/newview/llfloatermediabrowser.h b/indra/newview/llfloatermediabrowser.h deleted file mode 100644 index c2203670a..000000000 --- a/indra/newview/llfloatermediabrowser.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @file llfloaterhtmlhelp.h - * @brief HTML Help floater - uses embedded web browser control - * - * $LicenseInfo:firstyear=2006&license=viewergpl$ - * - * Copyright (c) 2006-2009, Linden Research, Inc. - * - * 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 - * - * 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 - * - * 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. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERHTMLHELP_H -#define LL_LLFLOATERHTMLHELP_H - -#include "llhtmlhelp.h" -#include "llfloater.h" -#include "llmediactrl.h" - -class LLViewerHtmlHelp : public LLHtmlHelp -{ -public: - LLViewerHtmlHelp(); - virtual ~LLViewerHtmlHelp(); - - /*virtual*/ void show(); - /*virtual*/ void show(std::string start_url); - void show(std::string start_url, std::string title); - - static bool onClickF1HelpLoadURL(const LLSD& notification, const LLSD& response); - -}; - -class LLComboBox; -class LLMediaCtrl; - -class LLFloaterMediaBrowser : - public LLFloater, - public LLUISingleton >, - public LLViewerMediaObserver -{ - friend class LLUISingleton >; -public: - LLFloaterMediaBrowser(const LLSD& media_data); - - - void geometryChanged(S32 x, S32 y, S32 width, S32 height); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); - /*virtual*/ void draw(); - - // inherited from LLViewerMediaObserver - /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); - - void openMedia(const std::string& media_url); - void buildURLHistory(); - std::string getSupportURL(); - void setCurrentURL(const std::string& url); - - static LLFloaterMediaBrowser* showInstance(const LLSD& id); - static void onEnterAddress(LLUICtrl* ctrl, void* user_data); - static void onClickRefresh(void* user_data); - static void onClickBack(void* user_data); - static void onClickForward(void* user_data); - static void onClickGo(void* user_data); - static void onClickOpenWebBrowser(void* user_data); - static void onClickAssign(void* user_data); - static void onClickRewind(void* user_data); - static void onClickPlay(void* user_data); - static void onClickStop(void* user_data); - static void onClickSeek(void* user_data); - -private: - LLMediaCtrl* mBrowser; - LLComboBox* mAddressCombo; - std::string mCurrentURL; -}; - -extern LLViewerHtmlHelp gViewerHtmlHelp; - -#endif // LL_LLFLOATERHTMLHELP_H - diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index c05ddd23f..c47a893ff 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -74,7 +74,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this )); mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this )); mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, this )); - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_browser.xml"); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_web_content.xml"); mAgeTimer.reset(); } @@ -424,7 +424,7 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent else if(event == MEDIA_EVENT_PROGRESS_UPDATED ) { int percent = (int)self->getProgressPercent(); - mStatusBarProgress->setValue( percent ); + mStatusBarProgress->setPercent( percent ); } else if(event == MEDIA_EVENT_NAME_CHANGED ) { diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index cb185e0eb..af7c6d131 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -68,7 +68,7 @@ static LLRegisterWidget r("web_browser"); LLMediaCtrl::Params::Params() : start_url("start_url"), - border_visible("border_visible", true), + border_visible("border_visible", false), decouple_texture_size("decouple_texture_size", false), texture_width("texture_width", 1024), texture_height("texture_height", 1024), diff --git a/indra/newview/llmediaremotectrl.cpp b/indra/newview/llmediaremotectrl.cpp index e5fa89e16..38ce628da 100644 --- a/indra/newview/llmediaremotectrl.cpp +++ b/indra/newview/llmediaremotectrl.cpp @@ -181,7 +181,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() std::string media_url = mControls->getString("default_tooltip_label"); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (gSavedSettings.getBOOL("AudioStreamingVideo")) + if (gSavedSettings.getBOOL("AudioStreamingMedia")) { if ( parcel && !parcel->getMediaURL().empty()) { diff --git a/indra/newview/llpanelaudioprefs.cpp b/indra/newview/llpanelaudioprefs.cpp index d58635c85..e61028fa8 100644 --- a/indra/newview/llpanelaudioprefs.cpp +++ b/indra/newview/llpanelaudioprefs.cpp @@ -111,7 +111,7 @@ void LLPanelAudioPrefs::refreshValues() mPreviousHealthThreshold = gSavedSettings.getF32("UISndHealthReductionThreshold"); mPreviousStreamingMusic = gSavedSettings.getBOOL("AudioStreamingMusic"); - mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingVideo"); + mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingMedia"); mPreviousMuteAudio = gSavedSettings.getBOOL("MuteAudio"); mPreviousMuteWhenMinimized = gSavedSettings.getBOOL("MuteWhenMinimized"); @@ -133,7 +133,7 @@ void LLPanelAudioPrefs::cancel() gSavedSettings.setF32("UISndHealthReductionThreshold", mPreviousHealthThreshold ); gSavedSettings.setBOOL("AudioStreamingMusic", mPreviousStreamingMusic ); - gSavedSettings.setBOOL("AudioStreamingVideo", mPreviousStreamingVideo ); + gSavedSettings.setBOOL("AudioStreamingMedia", mPreviousStreamingVideo ); gSavedSettings.setBOOL("MuteAudio", mPreviousMuteAudio ); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 537c3c977..0dc6f669f 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -350,8 +350,7 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) { // hide browser control (revealing default one) web_browser->setVisible( FALSE ); - std::string str = LLWeb::escapeURL("data:text/html,"); - web_browser->navigateTo( str, "text/html" ); + web_browser->navigateTo( "data:text/html,%3Chtml%3E%3Cbody%20bgcolor=%22#000000%22%3E%3C/body%3E%3C/html%3E", "text/html" ); } } } diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 0b2f52ed7..b57c3fdcb 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -45,6 +45,7 @@ #include "llbutton.h" #include "llface.h" #include "llcombobox.h" +#include "lllayoutstack.h" #include "llslider.h" #include "llhudview.h" #include "lliconctrl.h" @@ -100,6 +101,28 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mVolumeSliderVisible(0), mHideImmediately(false) { + mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Forward", boost::bind(&LLPanelPrimMediaControls::onClickForward, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Home", boost::bind(&LLPanelPrimMediaControls::onClickHome, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Stop", boost::bind(&LLPanelPrimMediaControls::onClickStop, this)); + mCommitCallbackRegistrar.add("MediaCtrl.MediaStop", boost::bind(&LLPanelPrimMediaControls::onClickMediaStop, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Reload", boost::bind(&LLPanelPrimMediaControls::onClickReload, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Play", boost::bind(&LLPanelPrimMediaControls::onClickPlay, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Pause", boost::bind(&LLPanelPrimMediaControls::onClickPause, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Open", boost::bind(&LLPanelPrimMediaControls::onClickOpen, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Zoom", boost::bind(&LLPanelPrimMediaControls::onClickZoom, this)); + mCommitCallbackRegistrar.add("MediaCtrl.CommitURL", boost::bind(&LLPanelPrimMediaControls::onCommitURL, this)); + mCommitCallbackRegistrar.add("MediaCtrl.JumpProgress", boost::bind(&LLPanelPrimMediaControls::onCommitSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeUp", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeUp, this)); + mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this)); + mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this)); + mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); + mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this)); + //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_hud.xml"); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_prim_media_controls.xml"); mInactivityTimer.reset(); diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index f7cce735c..2a614f4c7 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -43,7 +43,6 @@ #include "llregionhandle.h" #include "llslurl.h" #include "llstartup.h" // gStartupState -#include "llurlsimstring.h" #include "llweb.h" #include "llworldmap.h" #include "llworldmapmessage.h" diff --git a/indra/newview/llviewermediaeventemitter.cpp b/indra/newview/llviewermediaeventemitter.cpp deleted file mode 100644 index 39e0b2b52..000000000 --- a/indra/newview/llviewermediaeventemitter.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @file llviewermediaeventemitter.cpp - * @brief Implementation of LLViewerMediaEventEmitter - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2010, Linden Research, Inc. - * - * 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 - * - * 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 - * - * 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. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" -#include "llviewermediaeventemitter.h" -#include "llviewermediaobserver.h" -#include - -LLViewerMediaEventEmitter::~LLViewerMediaEventEmitter() -{ - observerListType::iterator iter = mObservers.begin(); - - while (iter != mObservers.end()) - { - LLViewerMediaObserver* self = *iter; - ++iter; - remObserver(self); - } -} - -bool LLViewerMediaEventEmitter::addObserver(LLViewerMediaObserver* observer) -{ - if (!observer) - return false; - - if (std::find(mObservers.begin(), mObservers.end(), observer) != mObservers.end()) - return false; - - mObservers.push_back(observer); - observer->mEmitters.push_back(this); - - return true; -} - -bool LLViewerMediaEventEmitter::remObserver(LLViewerMediaObserver* observer) -{ - if (!observer) - return false; - - mObservers.remove(observer); - observer->mEmitters.remove(this); - - return true; -} - -void LLViewerMediaEventEmitter::emitEvent(LLPluginClassMedia* media, LLPluginClassMediaOwner::EMediaEvent event) -{ - observerListType::iterator iter = mObservers.begin(); - - while (iter != mObservers.end()) - { - LLViewerMediaObserver* self = *iter; - ++iter; - self->handleMediaEvent(media, event); - } -} diff --git a/indra/newview/llviewermediaeventemitter.h b/indra/newview/llviewermediaeventemitter.h deleted file mode 100644 index 17453a9e1..000000000 --- a/indra/newview/llviewermediaeventemitter.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * @file llviewermediaeventemitter.h - * @brief Helper class - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2010, Linden Research, Inc. - * - * 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 - * - * 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 - * - * 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. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#ifndef LLVIEWERMEDIAEVENTEMITTER_H -#define LLVIEWERMEDIAEVENTEMITTER_H - -#include "llpluginclassmediaowner.h" -#include - -class LLViewerMediaObserver; -class LLPluginClassMedia; - -class LLViewerMediaEventEmitter -{ -public: - virtual ~LLViewerMediaEventEmitter(); - - bool addObserver(LLViewerMediaObserver* subject); - bool remObserver(LLViewerMediaObserver* subject); - void emitEvent(LLPluginClassMedia* self, LLPluginClassMediaOwner::EMediaEvent event); - -private: - typedef std::list< LLViewerMediaObserver*> observerListType; - observerListType mObservers; -}; - -#endif // LLVIEWERMEDIAEVENTEMITTER_H diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 77239a848..23e094b64 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -419,13 +419,13 @@ void LLViewerMediaFocus::update() // We have an object and impl to point at. // Make sure the media HUD object exists. - if(! mMediaControls.get()) + /*if(! mMediaControls.get()) { LLPanelPrimMediaControls* media_controls = new LLPanelPrimMediaControls(); mMediaControls = media_controls->getHandle(); gHUDView->addChild(media_controls); } - mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal); + mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal);*/ } else { diff --git a/indra/newview/llviewermediaobserver.cpp b/indra/newview/llviewermediaobserver.cpp deleted file mode 100644 index 6bed14311..000000000 --- a/indra/newview/llviewermediaobserver.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @file llviewermediaobserver.cpp - * @brief Implementation of class LLViewerMediaObserver. - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2010, Linden Research, Inc. - * - * 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 - * - * 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 - * - * 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. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" -#include "llviewermediaeventemitter.h" -#include "llviewermediaobserver.h" - -LLViewerMediaObserver::~LLViewerMediaObserver() -{ - std::list::iterator iter = mEmitters.begin(); - - while (iter != mEmitters.end()) - { - LLViewerMediaEventEmitter* self = *iter; - ++iter; - self->remObserver(this); - } -} diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 814ce92aa..32817b9a1 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -193,7 +193,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel, bool filter) if (!parcel) return; - if (!gSavedSettings.getBOOL("AudioStreamingVideo")) + if (!gSavedSettings.getBOOL("AudioStreamingMedia")) return; std::string media_url = parcel->getMediaURL(); @@ -662,12 +662,12 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) { - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + gSavedSettings.setBOOL("AudioStreamingMedia", TRUE); LLViewerParcelMedia::play(parcel); } else { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); + gSavedSettings.setBOOL("AudioStreamingMedia", FALSE); } gSavedSettings.setWarning("FirstStreamingVideo", FALSE); return false; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fceaa770b..546d9178e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -186,7 +186,6 @@ #include "llworldmapview.h" #include "pipeline.h" #include "llappviewer.h" -#include "llurlsimstring.h" #include "llviewerdisplay.h" #include "llspatialpartition.h" #include "llviewerjoystick.h" diff --git a/indra/newview/skins/default/xui/en-us/floater_web_content.xml b/indra/newview/skins/default/xui/en-us/floater_web_content.xml new file mode 100644 index 000000000..e9ff5ec4a --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_web_content.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en-us/panel_login.xml b/indra/newview/skins/default/xui/en-us/panel_login.xml index 392183aad..aebdcc41a 100644 --- a/indra/newview/skins/default/xui/en-us/panel_login.xml +++ b/indra/newview/skins/default/xui/en-us/panel_login.xml @@ -62,12 +62,12 @@ left="475" mouse_opaque="true" name="start_location_text" v_pad="0" width="120"> Start Location: - - + My Home - + My Last Location diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml index c46212512..727e05255 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml @@ -5,7 +5,7 @@ Audio Preferences: - +