Fixed crash upon clicking media prim (disabled prim media control floater for now). Fleshed out media browser replacement (LLFloaterWebContent).
This commit is contained in:
@@ -718,7 +718,14 @@
|
|||||||
|
|
||||||
<key>UploadBakedTexture</key>
|
<key>UploadBakedTexture</key>
|
||||||
<boolean>true</boolean>
|
<boolean>true</boolean>
|
||||||
</map>
|
|
||||||
|
<key>ObjectMedia</key>
|
||||||
|
<boolean>false</boolean>
|
||||||
|
|
||||||
|
<key>ObjectMediaNavigate</key>
|
||||||
|
<boolean>false</boolean>
|
||||||
|
|
||||||
|
</map>
|
||||||
|
|
||||||
<key>messageBans</key>
|
<key>messageBans</key>
|
||||||
<map>
|
<map>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ void LLPluginClassMedia::reset_impl(void)
|
|||||||
|
|
||||||
void LLPluginClassMedia::idle_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
|
// Can't process a size change at this time
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -981,7 +981,6 @@ set(viewer_HEADER_FILES
|
|||||||
llviewerlayer.h
|
llviewerlayer.h
|
||||||
llviewermedia.h
|
llviewermedia.h
|
||||||
llviewermediafocus.h
|
llviewermediafocus.h
|
||||||
llviewermediaobserver.h
|
|
||||||
llviewermenu.h
|
llviewermenu.h
|
||||||
llviewermenufile.h
|
llviewermenufile.h
|
||||||
llviewermessage.h
|
llviewermessage.h
|
||||||
|
|||||||
@@ -2247,17 +2247,6 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>AudioStreamingVideo</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Enable streaming video</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>Boolean</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
</map>
|
|
||||||
<key>AuditTexture</key>
|
<key>AuditTexture</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -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<LLMediaCtrl>("browser");
|
|
||||||
mBrowser->addObserver(this);
|
|
||||||
|
|
||||||
mAddressCombo = getChild<LLComboBox>("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<LLFloaterMediaBrowser, VisibilityPolicy<LLFloater> >::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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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<LLFloaterMediaBrowser,
|
|
||||||
VisibilityPolicy<LLFloater> >,
|
|
||||||
public LLViewerMediaObserver
|
|
||||||
{
|
|
||||||
friend class LLUISingleton<LLFloaterMediaBrowser, VisibilityPolicy<LLFloater> >;
|
|
||||||
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
|
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params )
|
|||||||
mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
|
mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
|
||||||
mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
|
mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
|
||||||
mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, 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();
|
mAgeTimer.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
|
|||||||
else if(event == MEDIA_EVENT_PROGRESS_UPDATED )
|
else if(event == MEDIA_EVENT_PROGRESS_UPDATED )
|
||||||
{
|
{
|
||||||
int percent = (int)self->getProgressPercent();
|
int percent = (int)self->getProgressPercent();
|
||||||
mStatusBarProgress->setValue( percent );
|
mStatusBarProgress->setPercent( percent );
|
||||||
}
|
}
|
||||||
else if(event == MEDIA_EVENT_NAME_CHANGED )
|
else if(event == MEDIA_EVENT_NAME_CHANGED )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ static LLRegisterWidget<LLMediaCtrl> r("web_browser");
|
|||||||
|
|
||||||
LLMediaCtrl::Params::Params()
|
LLMediaCtrl::Params::Params()
|
||||||
: start_url("start_url"),
|
: start_url("start_url"),
|
||||||
border_visible("border_visible", true),
|
border_visible("border_visible", false),
|
||||||
decouple_texture_size("decouple_texture_size", false),
|
decouple_texture_size("decouple_texture_size", false),
|
||||||
texture_width("texture_width", 1024),
|
texture_width("texture_width", 1024),
|
||||||
texture_height("texture_height", 1024),
|
texture_height("texture_height", 1024),
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ void LLMediaRemoteCtrl::enableMediaButtons()
|
|||||||
std::string media_url = mControls->getString("default_tooltip_label");
|
std::string media_url = mControls->getString("default_tooltip_label");
|
||||||
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
|
||||||
|
|
||||||
if (gSavedSettings.getBOOL("AudioStreamingVideo"))
|
if (gSavedSettings.getBOOL("AudioStreamingMedia"))
|
||||||
{
|
{
|
||||||
if ( parcel && !parcel->getMediaURL().empty())
|
if ( parcel && !parcel->getMediaURL().empty())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void LLPanelAudioPrefs::refreshValues()
|
|||||||
mPreviousHealthThreshold = gSavedSettings.getF32("UISndHealthReductionThreshold");
|
mPreviousHealthThreshold = gSavedSettings.getF32("UISndHealthReductionThreshold");
|
||||||
|
|
||||||
mPreviousStreamingMusic = gSavedSettings.getBOOL("AudioStreamingMusic");
|
mPreviousStreamingMusic = gSavedSettings.getBOOL("AudioStreamingMusic");
|
||||||
mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingVideo");
|
mPreviousStreamingVideo = gSavedSettings.getBOOL("AudioStreamingMedia");
|
||||||
|
|
||||||
mPreviousMuteAudio = gSavedSettings.getBOOL("MuteAudio");
|
mPreviousMuteAudio = gSavedSettings.getBOOL("MuteAudio");
|
||||||
mPreviousMuteWhenMinimized = gSavedSettings.getBOOL("MuteWhenMinimized");
|
mPreviousMuteWhenMinimized = gSavedSettings.getBOOL("MuteWhenMinimized");
|
||||||
@@ -133,7 +133,7 @@ void LLPanelAudioPrefs::cancel()
|
|||||||
gSavedSettings.setF32("UISndHealthReductionThreshold", mPreviousHealthThreshold );
|
gSavedSettings.setF32("UISndHealthReductionThreshold", mPreviousHealthThreshold );
|
||||||
|
|
||||||
gSavedSettings.setBOOL("AudioStreamingMusic", mPreviousStreamingMusic );
|
gSavedSettings.setBOOL("AudioStreamingMusic", mPreviousStreamingMusic );
|
||||||
gSavedSettings.setBOOL("AudioStreamingVideo", mPreviousStreamingVideo );
|
gSavedSettings.setBOOL("AudioStreamingMedia", mPreviousStreamingVideo );
|
||||||
|
|
||||||
|
|
||||||
gSavedSettings.setBOOL("MuteAudio", mPreviousMuteAudio );
|
gSavedSettings.setBOOL("MuteAudio", mPreviousMuteAudio );
|
||||||
|
|||||||
@@ -350,8 +350,7 @@ void LLPanelLogin::setSiteIsAlive( bool alive )
|
|||||||
{
|
{
|
||||||
// hide browser control (revealing default one)
|
// hide browser control (revealing default one)
|
||||||
web_browser->setVisible( FALSE );
|
web_browser->setVisible( FALSE );
|
||||||
std::string str = LLWeb::escapeURL("data:text/html,<html><body bgcolor=\"rgb(0,0,0)\"></body></html>");
|
web_browser->navigateTo( "data:text/html,%3Chtml%3E%3Cbody%20bgcolor=%22#000000%22%3E%3C/body%3E%3C/html%3E", "text/html" );
|
||||||
web_browser->navigateTo( str, "text/html" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "llbutton.h"
|
#include "llbutton.h"
|
||||||
#include "llface.h"
|
#include "llface.h"
|
||||||
#include "llcombobox.h"
|
#include "llcombobox.h"
|
||||||
|
#include "lllayoutstack.h"
|
||||||
#include "llslider.h"
|
#include "llslider.h"
|
||||||
#include "llhudview.h"
|
#include "llhudview.h"
|
||||||
#include "lliconctrl.h"
|
#include "lliconctrl.h"
|
||||||
@@ -100,6 +101,28 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
|
|||||||
mVolumeSliderVisible(0),
|
mVolumeSliderVisible(0),
|
||||||
mHideImmediately(false)
|
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_media_hud.xml");
|
||||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_prim_media_controls.xml");
|
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_prim_media_controls.xml");
|
||||||
mInactivityTimer.reset();
|
mInactivityTimer.reset();
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
#include "llregionhandle.h"
|
#include "llregionhandle.h"
|
||||||
#include "llslurl.h"
|
#include "llslurl.h"
|
||||||
#include "llstartup.h" // gStartupState
|
#include "llstartup.h" // gStartupState
|
||||||
#include "llurlsimstring.h"
|
|
||||||
#include "llweb.h"
|
#include "llweb.h"
|
||||||
#include "llworldmap.h"
|
#include "llworldmap.h"
|
||||||
#include "llworldmapmessage.h"
|
#include "llworldmapmessage.h"
|
||||||
|
|||||||
@@ -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 <algorithm>
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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 <list>
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -419,13 +419,13 @@ void LLViewerMediaFocus::update()
|
|||||||
// We have an object and impl to point at.
|
// We have an object and impl to point at.
|
||||||
|
|
||||||
// Make sure the media HUD object exists.
|
// Make sure the media HUD object exists.
|
||||||
if(! mMediaControls.get())
|
/*if(! mMediaControls.get())
|
||||||
{
|
{
|
||||||
LLPanelPrimMediaControls* media_controls = new LLPanelPrimMediaControls();
|
LLPanelPrimMediaControls* media_controls = new LLPanelPrimMediaControls();
|
||||||
mMediaControls = media_controls->getHandle();
|
mMediaControls = media_controls->getHandle();
|
||||||
gHUDView->addChild(media_controls);
|
gHUDView->addChild(media_controls);
|
||||||
}
|
}
|
||||||
mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal);
|
mMediaControls.get()->setMediaFace(viewer_object, face, media_impl, normal);*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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<LLViewerMediaEventEmitter*>::iterator iter = mEmitters.begin();
|
|
||||||
|
|
||||||
while (iter != mEmitters.end())
|
|
||||||
{
|
|
||||||
LLViewerMediaEventEmitter* self = *iter;
|
|
||||||
++iter;
|
|
||||||
self->remObserver(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -193,7 +193,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel, bool filter)
|
|||||||
|
|
||||||
if (!parcel) return;
|
if (!parcel) return;
|
||||||
|
|
||||||
if (!gSavedSettings.getBOOL("AudioStreamingVideo"))
|
if (!gSavedSettings.getBOOL("AudioStreamingMedia"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string media_url = parcel->getMediaURL();
|
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);
|
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||||
if (option == 0)
|
if (option == 0)
|
||||||
{
|
{
|
||||||
gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
|
gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
|
||||||
LLViewerParcelMedia::play(parcel);
|
LLViewerParcelMedia::play(parcel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
|
gSavedSettings.setBOOL("AudioStreamingMedia", FALSE);
|
||||||
}
|
}
|
||||||
gSavedSettings.setWarning("FirstStreamingVideo", FALSE);
|
gSavedSettings.setWarning("FirstStreamingVideo", FALSE);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -186,7 +186,6 @@
|
|||||||
#include "llworldmapview.h"
|
#include "llworldmapview.h"
|
||||||
#include "pipeline.h"
|
#include "pipeline.h"
|
||||||
#include "llappviewer.h"
|
#include "llappviewer.h"
|
||||||
#include "llurlsimstring.h"
|
|
||||||
#include "llviewerdisplay.h"
|
#include "llviewerdisplay.h"
|
||||||
#include "llspatialpartition.h"
|
#include "llspatialpartition.h"
|
||||||
#include "llviewerjoystick.h"
|
#include "llviewerjoystick.h"
|
||||||
|
|||||||
152
indra/newview/skins/default/xui/en-us/floater_web_content.xml
Normal file
152
indra/newview/skins/default/xui/en-us/floater_web_content.xml
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
|
<floater
|
||||||
|
can_close="true"
|
||||||
|
can_drag_on_left="false"
|
||||||
|
can_minimize="true"
|
||||||
|
can_resize="true"
|
||||||
|
height="440"
|
||||||
|
min_height="140"
|
||||||
|
min_width="467"
|
||||||
|
name="floater_web_content"
|
||||||
|
rect_control="FloaterMediaRect"
|
||||||
|
title="Web Browser"
|
||||||
|
initial_mime_type="text/html"
|
||||||
|
width="820">
|
||||||
|
<layout_stack
|
||||||
|
|
||||||
|
bottom="0"
|
||||||
|
follows="left|right|top|bottom"
|
||||||
|
left="5"
|
||||||
|
name="stack1"
|
||||||
|
top="-20"
|
||||||
|
mouse_opaque="false"
|
||||||
|
width="810">
|
||||||
|
<layout_panel
|
||||||
|
auto_resize="false"
|
||||||
|
bottom="0"
|
||||||
|
height="25"
|
||||||
|
left="0"
|
||||||
|
name="nav_controls"
|
||||||
|
user_resize="false"
|
||||||
|
mouse_opaque="false"
|
||||||
|
width="815">
|
||||||
|
<button
|
||||||
|
bottom="0"
|
||||||
|
follows="left|top"
|
||||||
|
height="25"
|
||||||
|
label=""
|
||||||
|
image_overlay="go-previous-4.png"
|
||||||
|
left="0"
|
||||||
|
name="back"
|
||||||
|
width="25" >
|
||||||
|
<button.commit_callback
|
||||||
|
function="WebContent.Back" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
bottom_delta="0"
|
||||||
|
follows="left|top"
|
||||||
|
height="25" label=""
|
||||||
|
image_overlay="go-next-4.png"
|
||||||
|
left_delta="27"
|
||||||
|
name="forward"
|
||||||
|
width="25" >
|
||||||
|
<button.commit_callback
|
||||||
|
function="WebContent.Forward" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
bottom_delta="0"
|
||||||
|
enabled="true"
|
||||||
|
follows="left|top"
|
||||||
|
height="25"
|
||||||
|
label=""
|
||||||
|
image_overlay="media_btn_stoploading.png"
|
||||||
|
name="stop"
|
||||||
|
left_delta="27"
|
||||||
|
width="25">
|
||||||
|
<button.commit_callback
|
||||||
|
function="WebContent.Stop" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
bottom_delta="0"
|
||||||
|
follows="left|top"
|
||||||
|
height="25"
|
||||||
|
label=""
|
||||||
|
image_overlay="view-refresh-5.png"
|
||||||
|
name="reload"
|
||||||
|
left_delta="0"
|
||||||
|
width="25" >
|
||||||
|
<button.commit_callback
|
||||||
|
function="WebContent.Reload" />
|
||||||
|
</button>
|
||||||
|
<combo_box
|
||||||
|
allow_text_entry="true"
|
||||||
|
|
||||||
|
follows="left|top|right"
|
||||||
|
height="20"
|
||||||
|
left_delta="29"
|
||||||
|
max_chars="1024"
|
||||||
|
name="address"
|
||||||
|
select_all_on_focus_received="true"
|
||||||
|
bottom_delta="4"
|
||||||
|
width="706">
|
||||||
|
<combo_box.commit_callback
|
||||||
|
function="WebContent.EnterAddress" />
|
||||||
|
</combo_box>
|
||||||
|
<button
|
||||||
|
bottom_delta="-4"
|
||||||
|
follows="right|top"
|
||||||
|
enabled="true"
|
||||||
|
height="25"
|
||||||
|
label=""
|
||||||
|
image_overlay="media_btn_newwindow.png"
|
||||||
|
left_delta="709"
|
||||||
|
name="popexternal"
|
||||||
|
width="25">
|
||||||
|
<button.commit_callback
|
||||||
|
function="WebContent.PopExternal" />
|
||||||
|
</button>
|
||||||
|
</layout_panel>
|
||||||
|
<layout_panel
|
||||||
|
|
||||||
|
bottom="0"
|
||||||
|
height="20"
|
||||||
|
left="0"
|
||||||
|
name="external_controls"
|
||||||
|
auto_resize="true"
|
||||||
|
user_resize="false"
|
||||||
|
width="540">
|
||||||
|
<web_browser
|
||||||
|
bottom="0"
|
||||||
|
follows="left|right|top|bottom"
|
||||||
|
left="0"
|
||||||
|
name="webbrowser"
|
||||||
|
border_visible="false"
|
||||||
|
top="20"
|
||||||
|
width="540" />
|
||||||
|
</layout_panel>
|
||||||
|
<layout_panel name="status_bar"
|
||||||
|
height="23"
|
||||||
|
mouse_opaque="false"
|
||||||
|
auto_resize="false">
|
||||||
|
<text
|
||||||
|
type="string"
|
||||||
|
length="200"
|
||||||
|
follows="bottom|left"
|
||||||
|
height="20"
|
||||||
|
bottom="2"
|
||||||
|
left_delta="0"
|
||||||
|
name="statusbartext"
|
||||||
|
parse_urls="false"
|
||||||
|
width="495"/>
|
||||||
|
<progress_bar
|
||||||
|
color_bar="0.3 1.0 0.3 1"
|
||||||
|
follows="bottom|right"
|
||||||
|
height="16"
|
||||||
|
left="715"
|
||||||
|
bottom_delta="5"
|
||||||
|
left_pad="24"
|
||||||
|
name="statusbarprogress"
|
||||||
|
width="64"/>
|
||||||
|
</layout_panel>
|
||||||
|
</layout_stack>
|
||||||
|
</floater>
|
||||||
@@ -62,12 +62,12 @@
|
|||||||
left="475" mouse_opaque="true" name="start_location_text" v_pad="0" width="120">
|
left="475" mouse_opaque="true" name="start_location_text" v_pad="0" width="120">
|
||||||
Start Location:
|
Start Location:
|
||||||
</text>
|
</text>
|
||||||
<combo_box allow_text_entry="true" bottom_delta="0" left="475" follows="left|bottom" height="20"
|
<combo_box allow_text_entry="true" bottom_delta="-24" left="475" follows="left|bottom" height="20"
|
||||||
max_chars="128" mouse_opaque="true" name="start_location_combo" width="155">
|
max_chars="128" mouse_opaque="true" name="start_location_combo" width="155">
|
||||||
<combo_item name="MyHome" value="My Home">
|
<combo_item name="MyHome" value="home">
|
||||||
My Home
|
My Home
|
||||||
</combo_item>
|
</combo_item>
|
||||||
<combo_item name="MyLastLocation" value="My Last Location">
|
<combo_item name="MyLastLocation" value="last">
|
||||||
My Last Location
|
My Last Location
|
||||||
</combo_item>
|
</combo_item>
|
||||||
<combo_item name="Typeregionname" value="<Type region name>">
|
<combo_item name="Typeregionname" value="<Type region name>">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<text bottom="-300" height="12" name="audio_prefs_text">Audio Preferences:</text>
|
<text bottom="-300" height="12" name="audio_prefs_text">Audio Preferences:</text>
|
||||||
<panel border="true" bottom="-200" filename="panel_audio.xml" height="165" label="Volume" left="142" name="Volume Panel" width="260"/>
|
<panel border="true" bottom="-200" filename="panel_audio.xml" height="165" label="Volume" left="142" name="Volume Panel" width="260"/>
|
||||||
<check_box bottom="-220" control_name="AudioStreamingMusic" height="16" initial_value="true" label="Play Streaming Music When Available (uses more bandwidth)" left="142" name="streaming_music"/>
|
<check_box bottom="-220" control_name="AudioStreamingMusic" height="16" initial_value="true" label="Play Streaming Music When Available (uses more bandwidth)" left="142" name="streaming_music"/>
|
||||||
<check_box bottom_delta="-20" control_name="AudioStreamingVideo" follows="top" height="16" initial_value="true" label="Play Streaming Media When Available (uses more bandwidth)" name="streaming_video"/>
|
<check_box bottom_delta="-20" control_name="AudioStreamingMedia" follows="top" height="16" initial_value="true" label="Play Streaming Media When Available (uses more bandwidth)" name="streaming_video"/>
|
||||||
<check_box bottom_delta="-20" control_name="ParcelMediaAutoPlayEnable" follows="top" height="16" initial_value="true" label="Automatically play media" left="162" name="auto_streaming_video"/>
|
<check_box bottom_delta="-20" control_name="ParcelMediaAutoPlayEnable" follows="top" height="16" initial_value="true" label="Automatically play media" left="162" name="auto_streaming_video"/>
|
||||||
<check_box bottom_delta="-20" control_name="MediaEnableFilter" follows="top" height="16" initial_value="true" label="Ask for permission (enables filtering)" name="streaming_video"/>
|
<check_box bottom_delta="-20" control_name="MediaEnableFilter" follows="top" height="16" initial_value="true" label="Ask for permission (enables filtering)" name="streaming_video"/>
|
||||||
<check_box bottom_delta="-25" control_name="MuteWhenMinimized" follows="top" height="16" initial_value="true" label="Mute Audio When Window Minimized" left="142" name="mute_when_minimized"/>
|
<check_box bottom_delta="-25" control_name="MuteWhenMinimized" follows="top" height="16" initial_value="true" label="Mute Audio When Window Minimized" left="142" name="mute_when_minimized"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user