diff options
Diffstat (limited to 'linden/indra/newview/floatervoicelicense.cpp')
-rw-r--r-- | linden/indra/newview/floatervoicelicense.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/linden/indra/newview/floatervoicelicense.cpp b/linden/indra/newview/floatervoicelicense.cpp index 840a9e6..e8cd4f3 100644 --- a/linden/indra/newview/floatervoicelicense.cpp +++ b/linden/indra/newview/floatervoicelicense.cpp | |||
@@ -122,7 +122,7 @@ BOOL FloaterVoiceLicense::postBuild() | |||
122 | LLTextEditor *editor = getChild<LLTextEditor>("license_text"); | 122 | LLTextEditor *editor = getChild<LLTextEditor>("license_text"); |
123 | editor->setVisible( FALSE ); | 123 | editor->setVisible( FALSE ); |
124 | 124 | ||
125 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("license_html"); | 125 | LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("license_html"); |
126 | if ( web_browser ) | 126 | if ( web_browser ) |
127 | { | 127 | { |
128 | // start to observe it so we see navigate complete events | 128 | // start to observe it so we see navigate complete events |
@@ -137,7 +137,7 @@ BOOL FloaterVoiceLicense::postBuild() | |||
137 | 137 | ||
138 | void FloaterVoiceLicense::setSiteIsAlive( bool alive ) | 138 | void FloaterVoiceLicense::setSiteIsAlive( bool alive ) |
139 | { | 139 | { |
140 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("license_html"); | 140 | LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("license_html"); |
141 | // if the contents of the site was retrieved | 141 | // if the contents of the site was retrieved |
142 | if ( alive ) | 142 | if ( alive ) |
143 | { | 143 | { |
@@ -158,12 +158,6 @@ void FloaterVoiceLicense::setSiteIsAlive( bool alive ) | |||
158 | 158 | ||
159 | FloaterVoiceLicense::~FloaterVoiceLicense() | 159 | FloaterVoiceLicense::~FloaterVoiceLicense() |
160 | { | 160 | { |
161 | // stop observing events | ||
162 | LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("license_html"); | ||
163 | if ( web_browser ) | ||
164 | { | ||
165 | web_browser->remObserver( this ); | ||
166 | } | ||
167 | 161 | ||
168 | // tell the responder we're not here anymore | 162 | // tell the responder we're not here anymore |
169 | if ( gResponsePtr ) | 163 | if ( gResponsePtr ) |
@@ -224,14 +218,17 @@ void FloaterVoiceLicense::onCancel( void* userdata ) | |||
224 | } | 218 | } |
225 | 219 | ||
226 | //virtual | 220 | //virtual |
227 | void FloaterVoiceLicense::onNavigateComplete( const EventType& eventIn ) | 221 | void FloaterVoiceLicense::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent event) |
228 | { | 222 | { |
229 | // skip past the loading screen navigate complete | 223 | if(event == MEDIA_EVENT_NAVIGATE_COMPLETE) |
230 | if ( ++mLoadCompleteCount == 2 ) | ||
231 | { | 224 | { |
232 | llinfos << "NAVIGATE COMPLETE" << llendl; | 225 | // skip past the loading screen navigate complete |
233 | // enable Agree to License radio button now that page has loaded | 226 | if ( ++mLoadCompleteCount == 2 ) |
234 | LLCheckBoxCtrl * license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | 227 | { |
235 | license_agreement->setEnabled( true ); | 228 | llinfos << "NAVIGATE COMPLETE" << llendl; |
229 | // enable Agree to License radio button now that page has loaded | ||
230 | LLCheckBoxCtrl * license_agreement = getChild<LLCheckBoxCtrl>("agree_chk"); | ||
231 | license_agreement->setEnabled( true ); | ||
232 | } | ||
236 | } | 233 | } |
237 | } | 234 | } |