aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloatertos.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatertos.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp
index ee5beb8..6a392e0 100644
--- a/linden/indra/newview/llfloatertos.cpp
+++ b/linden/indra/newview/llfloatertos.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -33,21 +34,25 @@
33 34
34#include "llfloatertos.h" 35#include "llfloatertos.h"
35 36
36#include "llbutton.h" 37// viewer includes
37#include "llradiogroup.h" 38#include "llagent.h"
38#include "llvfile.h"
39#include "lltextbox.h"
40#include "llviewertexteditor.h"
41#include "llappviewer.h" 39#include "llappviewer.h"
42#include "llstartup.h" 40#include "llstartup.h"
43#include "message.h"
44#include "llagent.h"
45#include "lluictrlfactory.h"
46#include "llviewerwindow.h"
47#include "llviewerstats.h" 41#include "llviewerstats.h"
48#include "llui.h" 42#include "llviewertexteditor.h"
43#include "llviewerwindow.h"
44
45// linden library includes
46#include "llbutton.h"
49#include "llhttpclient.h" 47#include "llhttpclient.h"
48#include "llhttpstatuscodes.h" // for HTTP_FOUND
50#include "llradiogroup.h" 49#include "llradiogroup.h"
50#include "lltextbox.h"
51#include "llui.h"
52#include "lluictrlfactory.h"
53#include "llvfile.h"
54#include "message.h"
55
51 56
52// static 57// static
53LLFloaterTOS* LLFloaterTOS::sInstance = NULL; 58LLFloaterTOS* LLFloaterTOS::sInstance = NULL;
@@ -114,7 +119,13 @@ class LLIamHere : public LLHTTPClient::Responder
114 virtual void error( U32 status, const std::string& reason ) 119 virtual void error( U32 status, const std::string& reason )
115 { 120 {
116 if ( mParent ) 121 if ( mParent )
117 mParent->setSiteIsAlive( false ); 122 {
123 // *HACK: For purposes of this alive check, 302 Found
124 // (aka Moved Temporarily) is considered alive. The web site
125 // redirects this link to a "cache busting" temporary URL. JC
126 bool alive = (status == HTTP_FOUND);
127 mParent->setSiteIsAlive( alive );
128 }
118 }; 129 };
119}; 130};
120 131
@@ -184,12 +195,6 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
184 // but if the page is unavailable, we need to do this now 195 // but if the page is unavailable, we need to do this now
185 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); 196 LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
186 tos_agreement->setEnabled( true ); 197 tos_agreement->setEnabled( true );
187
188 if ( web_browser )
189 {
190 // hide browser control (revealing default text message)
191 web_browser->setVisible( FALSE );
192 };
193 }; 198 };
194 }; 199 };
195} 200}
@@ -257,7 +262,7 @@ void LLFloaterTOS::onCancel( void* userdata )
257{ 262{
258 LLFloaterTOS* self = (LLFloaterTOS*) userdata; 263 LLFloaterTOS* self = (LLFloaterTOS*) userdata;
259 llinfos << "User disagrees with TOS." << llendl; 264 llinfos << "User disagrees with TOS." << llendl;
260 gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done); 265 LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
261 LLStartUp::setStartupState( STATE_LOGIN_SHOW ); 266 LLStartUp::setStartupState( STATE_LOGIN_SHOW );
262 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS 267 self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
263 self->close(); // destroys this object 268 self->close(); // destroys this object