diff options
Diffstat (limited to 'linden/indra/newview/llfloatertos.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertos.cpp | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index 6a392e0..2dedc79 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp | |||
@@ -161,12 +161,10 @@ BOOL LLFloaterTOS::postBuild() | |||
161 | LLTextEditor *editor = getChild<LLTextEditor>("tos_text"); | 161 | LLTextEditor *editor = getChild<LLTextEditor>("tos_text"); |
162 | editor->setVisible( FALSE ); | 162 | editor->setVisible( FALSE ); |
163 | 163 | ||
164 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); | 164 | LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); |
165 | if ( web_browser ) | 165 | if ( web_browser ) |
166 | { | 166 | { |
167 | // start to observe it so we see navigate complete events | 167 | web_browser->addObserver(this); |
168 | web_browser->addObserver( this ); | ||
169 | |||
170 | gResponsePtr = LLIamHere::build( this ); | 168 | gResponsePtr = LLIamHere::build( this ); |
171 | LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); | 169 | LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); |
172 | } | 170 | } |
@@ -179,7 +177,7 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) | |||
179 | // only do this for TOS pages | 177 | // only do this for TOS pages |
180 | if ( mType == TOS_TOS ) | 178 | if ( mType == TOS_TOS ) |
181 | { | 179 | { |
182 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); | 180 | LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("tos_html"); |
183 | // if the contents of the site was retrieved | 181 | // if the contents of the site was retrieved |
184 | if ( alive ) | 182 | if ( alive ) |
185 | { | 183 | { |
@@ -201,12 +199,6 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) | |||
201 | 199 | ||
202 | LLFloaterTOS::~LLFloaterTOS() | 200 | LLFloaterTOS::~LLFloaterTOS() |
203 | { | 201 | { |
204 | // stop obsaerving events | ||
205 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html"); | ||
206 | if ( web_browser ) | ||
207 | { | ||
208 | web_browser->remObserver( this ); | ||
209 | }; | ||
210 | 202 | ||
211 | // tell the responder we're not here anymore | 203 | // tell the responder we're not here anymore |
212 | if ( gResponsePtr ) | 204 | if ( gResponsePtr ) |
@@ -269,14 +261,17 @@ void LLFloaterTOS::onCancel( void* userdata ) | |||
269 | } | 261 | } |
270 | 262 | ||
271 | //virtual | 263 | //virtual |
272 | void LLFloaterTOS::onNavigateComplete( const EventType& eventIn ) | 264 | void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) |
273 | { | 265 | { |
274 | // skip past the loading screen navigate complete | 266 | if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) |
275 | if ( ++mLoadCompleteCount == 2 ) | ||
276 | { | 267 | { |
277 | llinfos << "NAVIGATE COMPLETE" << llendl; | 268 | // skip past the loading screen navigate complete |
278 | // enable Agree to TOS radio button now that page has loaded | 269 | if ( ++mLoadCompleteCount == 2 ) |
279 | LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | 270 | { |
280 | tos_agreement->setEnabled( true ); | 271 | llinfos << "NAVIGATE COMPLETE" << llendl; |
281 | }; | 272 | // enable Agree to TOS radio button now that page has loaded |
273 | LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | ||
274 | tos_agreement->setEnabled( true ); | ||
275 | } | ||
276 | } | ||
282 | } | 277 | } |