diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/cmake/00-Common.cmake | 3 | ||||
-rw-r--r-- | indra/media_plugins/cef/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 16 | ||||
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 2 | ||||
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 11 | ||||
-rwxr-xr-x | indra/newview/llfloatertos.cpp | 26 | ||||
-rwxr-xr-x | indra/newview/llweb.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/floater_tos.xml | 15 |
8 files changed, 73 insertions, 8 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 1a3b6c5117..86fc2dfff5 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -166,6 +166,9 @@ if (LINUX) -pthread ) + # force this platform to accept TOS via external browser + add_definitions(-DEXTERNAL_TOS) + add_definitions(-DAPPID=secondlife) add_definitions(-fvisibility=hidden) # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway. diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 16015be672..1f6163e41e 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -61,7 +61,7 @@ set (media_plugin_cef_LINK_LIBRARIES if (LINUX) message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n" " Please create a volume_catcher implementation for this platform.") - + elseif (DARWIN) list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher.cpp) find_library(CORESERVICES_LIBRARY CoreServices) @@ -98,7 +98,7 @@ if (WINDOWS) set_target_properties( media_plugin_cef PROPERTIES - LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT" + LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT" LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD" ) endif (WINDOWS) diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index be69858d47..60f6264db4 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -62,6 +62,7 @@ private: void onStatusMessageCallback(std::string value); void onTitleChangeCallback(std::string title); void onLoadStartCallback(); + void onRequestExitCallback(); void onLoadEndCallback(int httpStatusCode); void onAddressChangeCallback(std::string url); void onNavigateURLCallback(std::string url, std::string target); @@ -128,7 +129,6 @@ MediaPluginBase(host_send_func, host_user_data) // MediaPluginCEF::~MediaPluginCEF() { - mLLCEFLib->requestExit(); } //////////////////////////////////////////////////////////////////////////////// @@ -201,6 +201,16 @@ void MediaPluginCEF::onLoadStartCallback() //////////////////////////////////////////////////////////////////////////////// // +void MediaPluginCEF::onRequestExitCallback() +{ + mLLCEFLib->shutdown(); + + LLPluginMessage message("base", "goodbye"); + sendMessage(message); +} + +//////////////////////////////////////////////////////////////////////////////// +// void MediaPluginCEF::onLoadEndCallback(int httpStatusCode) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_complete"); @@ -344,8 +354,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { - LLPluginMessage message("base", "goodbye"); - sendMessage(message); + mLLCEFLib->requestExit(); } else if (message_name == "shm_added") { @@ -401,6 +410,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2)); mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4)); mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2)); + mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this)); LLCEFLib::LLCEFLibSettings settings; settings.initial_width = 1024; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5f378c64e8..6fac330db4 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2005,7 +2005,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>ChatBarCustomWidth</key> <map> diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index dac610eda1..f7861fb4fd 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -108,6 +108,7 @@ #include "llpluginclassmedia.h" #include "llteleporthistorystorage.h" #include "llproxy.h" +#include "llweb.h" #include "lllogininstance.h" // to check if logged in yet #include "llsdserialize.h" @@ -1942,6 +1943,16 @@ BOOL LLPanelPreference::postBuild() gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&LLPanelPreference::Updater::update, mBandWidthUpdater, _2)); } +#ifdef EXTERNAL_TOS + LLRadioGroup* ext_browser_settings = getChild<LLRadioGroup>("preferred_browser_behavior"); + if (ext_browser_settings) + { + // turn off ability to set external/internal browser + ext_browser_settings->setSelectedByValue(LLWeb::BROWSER_EXTERNAL_ONLY, true); + ext_browser_settings->setEnabled(false); + } +#endif + apply(); return true; } diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index ae33acb842..4cb1ca6cc0 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -46,7 +46,6 @@ #include "message.h" #include "llstartup.h" // login_alert_done - LLFloaterTOS::LLFloaterTOS(const LLSD& data) : LLModalDialog( data["message"].asString() ), mMessage(data["message"].asString()), @@ -85,7 +84,7 @@ protected: { if ( mParent ) { - mParent->setSiteIsAlive( true ); + mParent->setSiteIsAlive(true); } } @@ -136,6 +135,20 @@ BOOL LLFloaterTOS::postBuild() LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); if ( web_browser ) { +// if we are forced to send users to an external site in their system browser +// (e.g.) Linux users because of lack of media support for HTML ToS page +// remove exisiting UI and replace with a link to external page where users can accept ToS +#ifdef EXTERNAL_TOS + LLTextBox* header = getChild<LLTextBox>("tos_heading"); + if (header) + header->setVisible(false); + + LLTextBox* external_prompt = getChild<LLTextBox>("external_tos_required"); + if (external_prompt) + external_prompt->setVisible(true); + + web_browser->setVisible(false); +#else web_browser->addObserver(this); // Don't use the start_url parameter for this browser instance -- it may finish loading before we get to add our observer. @@ -147,6 +160,7 @@ BOOL LLFloaterTOS::postBuild() // All links from tos_html should be opened in external browser media_plugin->setOverrideClickTarget("_external"); } +#endif } return TRUE; @@ -154,6 +168,13 @@ BOOL LLFloaterTOS::postBuild() void LLFloaterTOS::setSiteIsAlive( bool alive ) { +// if we are forced to send users to an external site in their system browser +// (e.g.) Linux users because of lack of media support for HTML ToS page +// force the regular HTML UI to deactivate so alternative is rendered instead. +#ifdef EXTERNAL_TOS + mSiteAlive = false; +#else + mSiteAlive = alive; // only do this for TOS pages @@ -182,6 +203,7 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) tos_agreement->setEnabled( true ); } } +#endif } LLFloaterTOS::~LLFloaterTOS() diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 0be6e49834..b37e41fb85 100755 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -234,6 +234,9 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, //static bool LLWeb::useExternalBrowser(const std::string &url) { +#ifdef EXTERNAL_TOS + return true; +#else if (gSavedSettings.getU32("PreferredBrowserBehavior") == BROWSER_EXTERNAL_ONLY) { return true; @@ -250,4 +253,5 @@ bool LLWeb::useExternalBrowser(const std::string &url) return !(boost::regex_search(uri_string, matches, pattern)); } return false; +#endif } diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml index af1617eb39..c5313391c6 100755 --- a/indra/newview/skins/default/xui/en/floater_tos.xml +++ b/indra/newview/skins/default/xui/en/floater_tos.xml @@ -57,6 +57,21 @@ width="552"> Please read the following Terms of Service and Privacy Policy carefully. To continue logging in to [SECOND_LIFE], you must accept the agreement. </text> + <text + type="string" + length="1" + follows="left|top" + font="SansSerif" + height="30" + layout="topleft" + left="16" + name="external_tos_required" + visible="false" + top="32" + word_wrap="true" + width="552"> + To continue logging in to [SECOND_LIFE], you must accept the [https://id.secondlife.com/openid/login?return_to=https%3A%2F%2Fmy.secondlife.com%2Fopenid Terms of Service and Privacy Policy]. + </text> <web_browser trusted_content="true" follows="left|top" |