diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloatertos.cpp | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index 35b4531..26346d5 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp | |||
@@ -125,9 +125,9 @@ BOOL LLFloaterTOS::postBuild() | |||
125 | childSetAction("Cancel", onCancel, this); | 125 | childSetAction("Cancel", onCancel, this); |
126 | childSetCommitCallback("tos_agreement", updateAgree, this); | 126 | childSetCommitCallback("tos_agreement", updateAgree, this); |
127 | 127 | ||
128 | // this displays the critical message | ||
129 | if ( mType != TOS_TOS ) | 128 | if ( mType != TOS_TOS ) |
130 | { | 129 | { |
130 | // this displays the critical message | ||
131 | LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); | 131 | LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); |
132 | if (Editor) | 132 | if (Editor) |
133 | { | 133 | { |
@@ -137,25 +137,11 @@ BOOL LLFloaterTOS::postBuild() | |||
137 | Editor->setWordWrap(TRUE); | 137 | Editor->setWordWrap(TRUE); |
138 | Editor->setFocus(TRUE); | 138 | Editor->setFocus(TRUE); |
139 | } | 139 | } |
140 | childSetValue("tos_text", LLSD(mMessage)); | 140 | childSetValue("tos_text", LLSD(mMessage)); |
141 | }; | 141 | return TRUE; |
142 | 142 | } | |
143 | // this displays the critical message | ||
144 | if ( mType != TOS_TOS ) | ||
145 | { | ||
146 | LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); | ||
147 | if (Editor) | ||
148 | { | ||
149 | Editor->setHandleEditKeysDirectly( TRUE ); | ||
150 | Editor->setEnabled( FALSE ); | ||
151 | Editor->setReadOnlyFgColor(LLColor4::white); | ||
152 | Editor->setWordWrap(TRUE); | ||
153 | Editor->setFocus(TRUE); | ||
154 | } | ||
155 | childSetValue("tos_text", LLSD(mMessage)); | ||
156 | }; | ||
157 | 143 | ||
158 | #if LL_LIBXUL_ENABLED | 144 | #if LL_LIBXUL_ENABLED |
159 | // disable Agree to TOS radio button until the page has fully loaded | 145 | // disable Agree to TOS radio button until the page has fully loaded |
160 | LLRadioGroup* tos_agreement = LLUICtrlFactory::getRadioGroupByName(this, "tos_agreement"); | 146 | LLRadioGroup* tos_agreement = LLUICtrlFactory::getRadioGroupByName(this, "tos_agreement"); |
161 | if ( tos_agreement ) | 147 | if ( tos_agreement ) |
@@ -163,19 +149,26 @@ BOOL LLFloaterTOS::postBuild() | |||
163 | tos_agreement->setEnabled( false ); | 149 | tos_agreement->setEnabled( false ); |
164 | }; | 150 | }; |
165 | 151 | ||
152 | // hide the SL text widget if we're displaying TOS with using a browser widget. | ||
153 | LLTextEditor *editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); | ||
154 | if ( editor ) | ||
155 | { | ||
156 | editor->setVisible( FALSE ); | ||
157 | }; | ||
158 | |||
166 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); | 159 | LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); |
167 | if ( web_browser ) | 160 | if ( web_browser ) |
168 | { | 161 | { |
169 | // start to observe it so we see navigate complete events | 162 | // start to observe it so we see navigate complete events |
170 | if ( web_browser ) | 163 | if ( web_browser ) |
171 | { | 164 | { |
172 | web_browser->addObserver( this ); | 165 | web_browser->addObserver( this ); |
173 | }; | 166 | }; |
174 | 167 | ||
175 | gResponsePtr = LLIamHere::build( this ); | 168 | gResponsePtr = LLIamHere::build( this ); |
176 | LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); | 169 | LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); |
177 | }; | 170 | }; |
178 | #else | 171 | #else |
179 | LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); | 172 | LLTextEditor *Editor = LLUICtrlFactory::getTextEditorByName(this, "tos_text"); |
180 | if (Editor) | 173 | if (Editor) |
181 | { | 174 | { |
@@ -186,7 +179,8 @@ BOOL LLFloaterTOS::postBuild() | |||
186 | Editor->setFocus(TRUE); | 179 | Editor->setFocus(TRUE); |
187 | } | 180 | } |
188 | childSetValue("tos_text", LLSD(mMessage)); | 181 | childSetValue("tos_text", LLSD(mMessage)); |
189 | #endif | 182 | #endif |
183 | |||
190 | return TRUE; | 184 | return TRUE; |
191 | } | 185 | } |
192 | 186 | ||