diff options
author | callum_linden <none@none> | 2015-11-13 16:19:16 -0800 |
---|---|---|
committer | callum_linden <none@none> | 2015-11-13 16:19:16 -0800 |
commit | ec55f2cd10db838140b34b04717e9e50a6b736ce (patch) | |
tree | a388597838c75bc37430ca9d848902ac7a55e78e /indra/newview/llfloatertos.cpp | |
parent | 2091813119fbe915ad1427ad51202e67ff086180 (diff) |
MAINT-5862 Fix Provide a way for new Linux users to accept ToS
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rwxr-xr-x | indra/newview/llfloatertos.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
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() |