summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rw-r--r--indra/newview/llfloatertos.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 1e84902594..40bd6360ed 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -36,8 +36,6 @@
// viewer includes
#include "llagent.h"
-#include "llappviewer.h"
-#include "llstartup.h"
#include "llviewerstats.h"
#include "llviewertexteditor.h"
#include "llviewerwindow.h"
@@ -58,7 +56,8 @@ LLFloaterTOS::LLFloaterTOS(const LLSD& message)
: LLModalDialog( message, 100, 100 ),
mMessage(message.asString()),
mWebBrowserWindowId( 0 ),
- mLoadCompleteCount( 0 )
+ mLoadCompleteCount( 0 ),
+ mCallback(callback)
{
}
@@ -205,25 +204,12 @@ void LLFloaterTOS::onContinue( void* userdata )
{
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User agrees with TOS." << llendl;
- if (self->getInstanceName() == "message_tos")
- {
- gAcceptTOS = TRUE;
- }
- else
- {
- gAcceptCriticalMessage = TRUE;
- }
- // Testing TOS dialog
- #if ! LL_RELEASE_FOR_DOWNLOAD
- if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
+ if(self->mCallback)
{
- LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ self->mCallback(true);
}
- else
- #endif
- LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
self->closeFloater(); // destroys this object
}
@@ -232,8 +218,12 @@ void LLFloaterTOS::onCancel( void* userdata )
{
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User disagrees with TOS." << llendl;
- LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
- LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+
+ if(self->mCallback)
+ {
+ self->mCallback(false);
+ }
+
self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
self->closeFloater(); // destroys this object
}