summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-11 12:09:18 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-08-11 12:09:18 -0400
commit8f4811f3fd7f252a5f5bc50ed11fecd8e42f3e68 (patch)
tree3c4dd969547645ac8e576d4fefb8d6cc2c68d0ce /indra/newview/llfloatertos.cpp
parent469836c4c7e8810502a89ce291bbd64548f0c70c (diff)
Better solution for fixing up the LLFloaterTOS callback after the last viewer-2.0.0-3 merge.
LLFloaterTOS and LLLoginInstance now communicate through an event pump "lllogininstance_tos_callback". reviewed by Mani.
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rw-r--r--indra/newview/llfloatertos.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 11f35bedad..e43c3ecde7 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -52,12 +52,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 ),
- mCallback()
+ mReplyPumpName(data["reply_pump"].asString())
{
}
@@ -205,9 +205,9 @@ void LLFloaterTOS::onContinue( void* userdata )
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User agrees with TOS." << llendl;
- if(self->mCallback)
+ if(self->mReplyPumpName != "")
{
- self->mCallback(true);
+ LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(true));
}
self->closeFloater(); // destroys this object
@@ -219,9 +219,9 @@ void LLFloaterTOS::onCancel( void* userdata )
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User disagrees with TOS." << llendl;
- if(self->mCallback)
+ if(self->mReplyPumpName != "")
{
- self->mCallback(false);
+ LLEventPumps::instance().obtain(self->mReplyPumpName).post(LLSD(false));
}
self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
@@ -240,3 +240,4 @@ void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
tos_agreement->setEnabled( true );
};
}
+