summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llappviewerwin32.cpp2
-rw-r--r--indra/newview/llweb.cpp12
-rw-r--r--indra/newview/llweb.h4
4 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a8d69a38cd..43c8c679c6 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1649,7 +1649,7 @@ bool LLAppViewer::cleanup()
// HACK: Attempt to wait until the screen res. switch is complete.
ms_sleep(1000);
- LLWeb::loadURLExternal( gLaunchFileOnQuit );
+ LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
llinfos << "File launched." << llendflush;
}
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 63d9ed19ad..60a6d2f072 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -469,7 +469,7 @@ bool LLAppViewerWin32::initHardwareTest()
if (OSBTN_NO== button)
{
LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
- LLWeb::loadURLExternal(DIRECTX_9_URL);
+ LLWeb::loadURLExternal(DIRECTX_9_URL, false);
return false;
}
gWarningSettings.setBOOL("AboutDirectX9", FALSE);
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 3385b75c65..1a64f9d881 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -103,8 +103,18 @@ void LLWeb::loadURLInternal(const std::string &url)
// static
void LLWeb::loadURLExternal(const std::string& url)
{
+ loadURLExternal(url, true);
+}
+
+
+// static
+void LLWeb::loadURLExternal(const std::string& url, bool async)
+{
std::string escaped_url = escapeURL(url);
- gViewerWindow->getWindow()->spawnWebBrowser(escaped_url);
+ if (gViewerWindow)
+ {
+ gViewerWindow->getWindow()->spawnWebBrowser(escaped_url, async);
+ }
}
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index f4666c9280..1119b80bb4 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -54,8 +54,10 @@ public:
static void loadURL(const char* url) { loadURL( ll_safe_string(url) ); }
/// Load the given url in the Second Life internal web browser
static void loadURLInternal(const std::string &url);
- /// Load the given url in the operating system's web browser
+ /// Load the given url in the operating system's web browser, async if we want to return immediately
+ /// before browser has spawned
static void loadURLExternal(const std::string& url);
+ static void loadURLExternal(const std::string& url, bool async);
/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
static std::string escapeURL(const std::string& url);