summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatertos.cpp')
-rw-r--r--indra/newview/llfloatertos.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 4de34f13dd..bd403f68d7 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -74,10 +74,7 @@ BOOL LLFloaterTOS::postBuild()
}
// disable Agree to TOS radio button until the page has fully loaded
- LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
- tos_agreement->setEnabled(false);
- LLTextBox* tos_list = getChild<LLTextBox>("agree_list");
- tos_list->setEnabled(false);
+ updateAgreeEnabled(false);
// hide the SL text widget if we're displaying TOS with using a browser widget.
LLUICtrl *editor = getChild<LLUICtrl>("tos_text");
@@ -150,8 +147,7 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
LL_INFOS("TOS") << "ToS page: ToS page unavailable!" << LL_ENDL;
// normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads)
// but if the page is unavailable, we need to do this now
- LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
- tos_agreement->setEnabled( true );
+ updateAgreeEnabled(true);
LLTextBox* tos_list = getChild<LLTextBox>("agree_list");
tos_list->setEnabled(true);
}
@@ -170,6 +166,17 @@ void LLFloaterTOS::draw()
LLModalDialog::draw();
}
+
+// update status of "Agree" checkbox and text
+void LLFloaterTOS::updateAgreeEnabled(bool enabled)
+{
+ LLCheckBoxCtrl* tos_agreement_agree_cb = getChild<LLCheckBoxCtrl>("agree_chk");
+ tos_agreement_agree_cb->setEnabled(enabled);
+
+ LLTextBox* tos_agreement_agree_text = getChild<LLTextBox>("agree_list");
+ tos_agreement_agree_text->setEnabled(enabled);
+}
+
// static
void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata )
{
@@ -231,11 +238,8 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev
else if(mRealNavigateBegun)
{
LL_INFOS("TOS") << "TOS: NAVIGATE COMPLETE" << LL_ENDL;
- // enable Agree to TOS radio button now that page has loaded
- LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
- tos_agreement->setEnabled( true );
- LLTextBox* tos_list = getChild<LLTextBox>("agree_list");
- tos_list->setEnabled(true);
+ // enable Agree to TOS check box now that page has loaded
+ updateAgreeEnabled(true);
}
}
}
@@ -248,9 +252,8 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLHandle<LLFloater> handle, std::string u
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
-
httpOpts->setWantHeaders(true);
-
+ httpOpts->setHeadersOnly(true);
LL_INFOS("testSiteIsAliveCoro") << "Generic POST for " << url << LL_ENDL;