From 58d0360b3a78729d0446d3703160ecb4b97721a3 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Tue, 1 Mar 2011 14:19:55 +0100
Subject: fix news bar doesn't open internal browser
---
linden/indra/llplugin/llpluginclassmedia.cpp | 3 ++-
linden/indra/newview/app_settings/logcontrol.xml | 16 +++++++++-------
linden/indra/newview/llmediactrl.cpp | 7 ++++++-
linden/indra/newview/llpanellogin.cpp | 1 +
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp
index 5a81c46..02da271 100755
--- a/linden/indra/llplugin/llpluginclassmedia.cpp
+++ b/linden/indra/llplugin/llpluginclassmedia.cpp
@@ -777,7 +777,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mDirtyRect.unionWith(newDirtyRect);
}
- LL_DEBUGS("PluginClassMedia") << "adjusted incoming rect is: ("
+ LL_DEBUGS("PluginClassMediaRect") << "adjusted incoming rect is: ("
<< newDirtyRect.mLeft << ", "
<< newDirtyRect.mTop << ", "
<< newDirtyRect.mRight << ", "
@@ -973,6 +973,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
{
mClickURL = message.getValue("uri");
mClickTarget = message.getValue("target");
+ LL_DEBUGS("PluginClassMedia") << "Click target \"" << mClickTarget << "\"" << LL_ENDL;
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_CLICK_LINK_HREF);
}
else if(message_name == "click_nofollow")
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index cdc837d..b7bc07b 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -57,7 +57,7 @@
-
+
@@ -65,15 +65,17 @@
+
+ NewsBar
- Plugin
+
PluginClassMedia
- PluginInstance
- PluginPipe
- PluginChild
+
+
+
- PluginParent
- PluginViewerMedia
+
+
diff --git a/linden/indra/newview/llmediactrl.cpp b/linden/indra/newview/llmediactrl.cpp
index 8b60326..ff7ba22 100644
--- a/linden/indra/newview/llmediactrl.cpp
+++ b/linden/indra/newview/llmediactrl.cpp
@@ -37,6 +37,7 @@
// viewer includes
#include "llfloaterhtml.h"
+#include "llfloatermediabrowser.h"
#include "llfloaterworldmap.h"
#include "lluictrlfactory.h"
#include "llurldispatcher.h"
@@ -746,7 +747,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
case MEDIA_EVENT_CURSOR_CHANGED:
{
- LL_INFOS("Media") << "Media event: MEDIA_EVENT_CURSOR_CHANGED, new cursor is " << self->getCursorName() << LL_ENDL;
+ LL_DEBUGS("MediaEventCursor") << "Media event: MEDIA_EVENT_CURSOR_CHANGED, new cursor is " << self->getCursorName() << LL_ENDL;
std::string cursor = self->getCursorName();
@@ -865,6 +866,7 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self )
const std::string protocol2( "https://" );
if( mOpenLinksInExternalBrowser )
{
+ LL_DEBUGS("Media") << "OpenLinksInExternalBrowser" << LL_ENDL;
if ( !url.empty() )
{
if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 ||
@@ -877,6 +879,7 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self )
else
if( mOpenLinksInInternalBrowser )
{
+ LL_DEBUGS("Media") << "OpenLinksInInternalBrowser" << LL_ENDL;
if ( !url.empty() )
{
if ( LLStringUtil::compareInsensitive( url.substr( 0, protocol1.length() ), protocol1 ) == 0 ||
@@ -891,6 +894,8 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self )
// "Second Life Browser",
// open_links_externally,
// mTrusted);
+
+ LLFloaterMediaBrowser::getInstance()->openMedia(url);
}
}
}
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 4fe0624..e67f336 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -1216,6 +1216,7 @@ bool LLPanelLogin::loadNewsBar()
curl_free(curl_version);
curl_free(curl_skin);
+ LL_DEBUGS("NewsBar")<< "news bar setup to navigate to: " << full_url.str() << LL_ENDL;
news_bar->navigateTo( full_url.str() );
--
cgit v1.1