diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 55b221e7161fe6a6682ded12a40b63ab9fe341d6..52132c38d36bd21b20edfb06a29f634e8aee542e 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -160,7 +160,7 @@ class LLWindow virtual void setLanguageTextInput( const LLCoordGL & pos ) {}; virtual void updateLanguageTextInputArea() {} virtual void interruptLanguageTextInput() {} - virtual void spawnWebBrowser(const std::string& escaped_url) {}; + virtual void spawnWebBrowser(const std::string& escaped_url, bool async) {}; static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 022b97f481fa1979f3c2349284f3ec4071c1a68c..7026a3f7a634602e35bcd8f0c3006b3a09bcc492 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -3178,7 +3178,7 @@ S32 OSMessageBoxMacOSX(const std::string& text, const std::string& caption, U32 // Open a URL with the user's default web browser. // Must begin with protocol identifier. -void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url) +void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async) { bool found = false; S32 i; diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 7c6b32402960b161d7ca22bc8857b052b0f931c5..5ac74bb00456551c5260e14e880c190b09323084 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -116,7 +116,7 @@ class LLWindowMacOSX : public LLWindow /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); /*virtual*/ void interruptLanguageTextInput(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index efa0110f8b4ffd9a5efa1202b94f0c3276252d93..4d25b4134ec07b4208665395a133deed8374cebd 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2465,7 +2465,7 @@ void exec_cmd(const std::string& cmd, const std::string& arg) // Open a URL with the user's default web browser. // Must begin with protocol identifier. -void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url) +void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) { llinfos << "spawn_web_browser: " << escaped_url << llendl; diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index e6bdd46a77f204fd232da297663fde2985ee1b71..8e65a2f3245c39990fb65054ce193d65184baf8d 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -125,7 +125,7 @@ class LLWindowSDL : public LLWindow /*virtual*/ void *getPlatformWindow(); /*virtual*/ void bringToFront(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 8df9dad58114d3641c873efc178a8ae73091754b..d726c600182a1d0fd29539e548b6e5af6708836b 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2959,7 +2959,7 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t } -void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) +void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async) { bool found = false; S32 i; @@ -2989,7 +2989,12 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) // let the OS decide what to use to open the URL SHELLEXECUTEINFO sei = { sizeof( sei ) }; - sei.fMask = SEE_MASK_FLAG_DDEWAIT; + // NOTE: this assumes that SL will stick around long enough to complete the DDE message exchange + // necessary for ShellExecuteEx to complete + if (async) + { + sei.fMask = SEE_MASK_ASYNCOK; + } sei.nShow = SW_SHOWNORMAL; sei.lpVerb = L"open"; sei.lpFile = url_utf16.c_str(); diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 9d5773577202a06547903ac686cb112ebf1b2ed3..d4a3446515ef09b8fc34f9f01b16a5c017606666 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -114,7 +114,7 @@ class LLWindowWin32 : public LLWindow /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); /*virtual*/ void updateLanguageTextInputArea(); /*virtual*/ void interruptLanguageTextInput(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url ); diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 85d6b2f5ffa5f85a5a856ca0a44785136647deb4..436e077e9b65c695035a334bf3c104859485d8de 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -89,6 +89,7 @@ class MediaPluginWebKit : std::string mProfileDir; std::string mHostLanguage; + std::string mUserAgent; bool mCookiesEnabled; bool mJavascriptEnabled; bool mPluginsEnabled; @@ -300,7 +301,7 @@ class MediaPluginWebKit : LLQtWebKit::getInstance()->addObserver( mBrowserWindowId, this ); // append details to agent string - LLQtWebKit::getInstance()->setBrowserAgentId( "LLPluginMedia Web Browser" ); + LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); #if !LL_QTWEBKIT_USES_PIXMAPS // don't flip bitmap @@ -688,6 +689,7 @@ MediaPluginWebKit::MediaPluginWebKit(LLPluginInstance::sendMessageFunction host_ mHostLanguage = "en"; // default to english mJavascriptEnabled = true; // default to on mPluginsEnabled = true; // default to on + mUserAgent = "LLPluginMedia Web Browser"; } MediaPluginWebKit::~MediaPluginWebKit() @@ -1103,8 +1105,8 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) } else if(message_name == "set_user_agent") { - std::string user_agent = message_in.getValue("user_agent"); - LLQtWebKit::getInstance()->setBrowserAgentId( user_agent ); + mUserAgent = message_in.getValue("user_agent"); + LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent ); } else if(message_name == "init_history") { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a8d69a38cd9c203597b83576920aaea246506b31..43c8c679c69c6ba3c2074d2198d5c5b4f931d834 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 63d9ed19ad65b801e9b8d761def14f608bc32886..60a6d2f072be002643486eb135a88033178e8155 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/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 34cef1bee7f4c2330200b2bff26a1d65a7360e64..54455afa4f3a45aa78fa472500dbc88467540bc4 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -551,7 +551,9 @@ void LLPanelPlaces::onTeleportButtonClicked() { LLSD payload; payload["asset_id"] = mItem->getAssetUUID(); - LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload); + LLSD args; + args["LOCATION"] = mItem->getName(); + LLNotificationsUtil::add("TeleportFromLandmark", args, payload); } else if (mPlaceInfoType == AGENT_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE || diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index d8319f3cc325246a9c241f782925dac6d91aa19f..2238acd64376a1402c602640bf21a71f3ed11d1a 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1151,8 +1151,8 @@ class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> void load(); void save(); - static F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in); - static F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in); + static F32 transformFromLegacyVolume(F32 volume_in); + static F32 transformToLegacyVolume(F32 volume_in); typedef std::map<LLUUID, F32> speaker_data_map_t; speaker_data_map_t mSpeakersData; diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 3385b75c65224ebd8c06fe221b2cb49377b2a28c..1a64f9d881e5fa8881065d7d94d94e49befa5347 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -102,9 +102,19 @@ 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 f4666c9280a975897ee44bbf8c1bc4ad1177c0c0..1119b80bb4f94ad327ff5918275eaa72d892dce0 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -54,8 +54,10 @@ class LLWeb 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);