summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmediactrl.cpp13
-rw-r--r--indra/newview/llweb.cpp17
-rw-r--r--indra/newview/llweb.h1
3 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 08d07f9540..eaa2a60938 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -55,6 +55,8 @@
#include "llcheckboxctrl.h"
#include "llnotifications.h"
#include "lllineeditor.h"
+#include "llfloatermediabrowser.h"
+#include "llfloaterwebcontent.h"
extern BOOL gRestoreGL;
@@ -1331,7 +1333,16 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response)
{
if (response["open"])
{
- LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ std::string floater_name = gFloaterView->getParentFloater(this)->getInstanceName();
+ if ( floater_name == "media_browser" )
+ {
+ LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ }
+ else
+ if ( floater_name == "web_content" )
+ {
+ LLWeb::loadWebURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ }
}
else
{
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 91a713be56..2ecab2cbdf 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -96,6 +96,23 @@ void LLWeb::loadURL(const std::string& url, const std::string& target, const std
}
}
+// static
+void LLWeb::loadWebURL(const std::string& url, const std::string& target, const std::string& uuid)
+{
+ if(target == "_internal")
+ {
+ // Force load in the internal browser, as if with a blank target.
+ loadWebURLInternal(url, "", uuid);
+ }
+ else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
+ {
+ loadURLExternal(url);
+ }
+ else
+ {
+ loadWebURLInternal(url, target, uuid);
+ }
+}
// static
void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index 3fe5a4dcad..a74d4b6364 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -58,6 +58,7 @@ public:
static void loadURLExternal(const std::string& url, bool async, const std::string& uuid = LLStringUtil::null);
// Explicitly open a Web URL using the Web content floater vs. the more general media browser
+ static void LLWeb::loadWebURL(const std::string& url, const std::string& target, const std::string& uuid);
static void loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid);
static void loadWebURLInternal(const std::string &url) { loadWebURLInternal(url, LLStringUtil::null, LLStringUtil::null); }