diff options
| author | brad kittenbrink <brad@lindenlab.com> | 2009-08-27 16:25:02 -0400 |
|---|---|---|
| committer | brad kittenbrink <brad@lindenlab.com> | 2009-08-27 16:25:02 -0400 |
| commit | d020dae7b9c156a08d1dd17eade7f36011f4d0fe (patch) | |
| tree | 67b1a28222116b20c5fa7bcc1cbd86ca47a91aa7 /indra/newview/llfloatertos.cpp | |
| parent | 745845f79987e4b4ab7f5728746a0eda8898930f (diff) | |
| parent | 70600ea66adc816e72e91e804deebde40ed6b1bc (diff) | |
Merged latest login-api with latest viewer-2.0.0-3 up through plugin-api-05 merge (r131929).
Some minor post-merge cleanups still required.
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
| -rw-r--r-- | indra/newview/llfloatertos.cpp | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 1060a5e031..d9bc43f3b4 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -35,8 +35,6 @@ #include "llfloatertos.h" // viewer includes -#include "llappviewer.h" -#include "llstartup.h" #include "llviewerstats.h" #include "llviewerwindow.h" @@ -52,11 +50,12 @@ #include "message.h" -LLFloaterTOS::LLFloaterTOS(const LLSD& message) -: LLModalDialog( message, 100, 100 ), - mMessage(message.asString()), +LLFloaterTOS::LLFloaterTOS(const LLSD& data) +: LLModalDialog( data["message"].asString(), 100, 100 ), + mMessage(data["message"].asString()), mWebBrowserWindowId( 0 ), - mLoadCompleteCount( 0 ) + mLoadCompleteCount( 0 ), + mReplyPumpName(data["reply_pump"].asString()) { } @@ -193,25 +192,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->mReplyPumpName != "") { - LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(true)); } - else - #endif - LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication self->closeFloater(); // destroys this object } @@ -220,8 +206,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->mReplyPumpName != "") + { + LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(false)); + } + self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS self->closeFloater(); // destroys this object } @@ -241,3 +231,4 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev } } } + |
