aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llfloatertos.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llfloatertos.cpp')
-rw-r--r--linden/indra/newview/llfloatertos.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp
index fd069c9..c64173e 100644
--- a/linden/indra/newview/llfloatertos.cpp
+++ b/linden/indra/newview/llfloatertos.cpp
@@ -145,7 +145,6 @@ BOOL LLFloaterTOS::postBuild()
145 return TRUE; 145 return TRUE;
146 } 146 }
147 147
148#if LL_LIBXUL_ENABLED
149 // disable Agree to TOS radio button until the page has fully loaded 148 // disable Agree to TOS radio button until the page has fully loaded
150 LLRadioGroup* tos_agreement = LLUICtrlFactory::getRadioGroupByName(this, "tos_agreement"); 149 LLRadioGroup* tos_agreement = LLUICtrlFactory::getRadioGroupByName(this, "tos_agreement");
151 if ( tos_agreement ) 150 if ( tos_agreement )
@@ -160,7 +159,7 @@ BOOL LLFloaterTOS::postBuild()
160 editor->setVisible( FALSE ); 159 editor->setVisible( FALSE );
161 }; 160 };
162 161
163 LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); 162 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
164 if ( web_browser ) 163 if ( web_browser )
165 { 164 {
166 // start to observe it so we see navigate complete events 165 // start to observe it so we see navigate complete events
@@ -170,20 +169,8 @@ BOOL LLFloaterTOS::postBuild()
170 }; 169 };
171 170
172 gResponsePtr = LLIamHere::build( this ); 171 gResponsePtr = LLIamHere::build( this );
173 LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); 172 LLHTTPClient::get( getString( "real_url" ), gResponsePtr );
174 }; 173 };
175#else
176 LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text");
177 if (Editor)
178 {
179 Editor->setHandleEditKeysDirectly( TRUE );
180 Editor->setEnabled( FALSE );
181 Editor->setReadOnlyFgColor(LLColor4::white);
182 Editor->setWordWrap(TRUE);
183 Editor->setFocus(TRUE);
184 }
185 childSetValue("tos_text", LLSD(mMessage));
186#endif
187 174
188 return TRUE; 175 return TRUE;
189} 176}
@@ -193,15 +180,14 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
193 // only do this for TOS pages 180 // only do this for TOS pages
194 if ( mType == TOS_TOS ) 181 if ( mType == TOS_TOS )
195 { 182 {
196#if LL_LIBXUL_ENABLED 183 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
197 LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html");
198 // if the contents of the site was retrieved 184 // if the contents of the site was retrieved
199 if ( alive ) 185 if ( alive )
200 { 186 {
201 if ( web_browser ) 187 if ( web_browser )
202 { 188 {
203 // navigate to the "real" page 189 // navigate to the "real" page
204 web_browser->navigateTo( childGetValue( "real_url" ).asString() ); 190 web_browser->navigateTo( getString( "real_url" ) );
205 }; 191 };
206 } 192 }
207 else 193 else
@@ -220,20 +206,17 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
220 web_browser->setVisible( FALSE ); 206 web_browser->setVisible( FALSE );
221 }; 207 };
222 }; 208 };
223#endif // LL_LIBXUL_ENABLED
224 }; 209 };
225} 210}
226 211
227LLFloaterTOS::~LLFloaterTOS() 212LLFloaterTOS::~LLFloaterTOS()
228{ 213{
229#if LL_LIBXUL_ENABLED
230 // stop obsaerving events 214 // stop obsaerving events
231 LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); 215 LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
232 if ( web_browser ) 216 if ( web_browser )
233 { 217 {
234 web_browser->addObserver( this ); 218 web_browser->addObserver( this );
235 }; 219 };
236#endif // LL_LIBXUL_ENABLED
237 220
238 // tell the responder we're not here anymore 221 // tell the responder we're not here anymore
239 if ( gResponsePtr ) 222 if ( gResponsePtr )