From b9e80807091aa7a27f1a10a23dd32bbb292d9dfb Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 26 Mar 2015 16:41:16 -0700 Subject: Adding llagentlanguage to new LLCore::Http code moved some of llappearancemgr handling into llAgent. --- indra/newview/llagentlanguage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llagentlanguage.cpp') diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp index fe6236a32a..81fce9b257 100755 --- a/indra/newview/llagentlanguage.cpp +++ b/indra/newview/llagentlanguage.cpp @@ -32,6 +32,7 @@ #include "llviewerregion.h" // library includes #include "llui.h" // getLanguage() +#include "httpcommon.h" // static void LLAgentLanguage::init() @@ -69,7 +70,12 @@ bool LLAgentLanguage::update() body["language"] = language; body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); - LLHTTPClient::post(url, body, new LLHTTPClient::Responder); + //LLHTTPClient::post(url, body, new LLHTTPClient::Responder); + LLCore::HttpHandle handle = gAgent.requestPostCapibility("UpdateAgentLanguage", url, body); + if (handle == LLCORE_HTTP_HANDLE_INVALID) + { + LL_WARNS() << "Unable to change language." << LL_ENDL; + } } return true; } -- cgit v1.2.3 From 735364038767694ea29d9b6a168410e6482cc9c2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 27 Mar 2015 17:00:02 -0700 Subject: first set of chnages from code review from Nat --- indra/newview/llagentlanguage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llagentlanguage.cpp') diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp index 81fce9b257..f2ac323578 100755 --- a/indra/newview/llagentlanguage.cpp +++ b/indra/newview/llagentlanguage.cpp @@ -71,7 +71,7 @@ bool LLAgentLanguage::update() body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); //LLHTTPClient::post(url, body, new LLHTTPClient::Responder); - LLCore::HttpHandle handle = gAgent.requestPostCapibility("UpdateAgentLanguage", url, body); + LLCore::HttpHandle handle = gAgent.requestPostCapability("UpdateAgentLanguage", url, body); if (handle == LLCORE_HTTP_HANDLE_INVALID) { LL_WARNS() << "Unable to change language." << LL_ENDL; -- cgit v1.2.3 From 0d3fb07bfa205b65f242ef2b761e827ff30e42fe Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 3 Jun 2015 16:04:40 -0700 Subject: Remove vestigial httpclient.h include from files that no longer need it. --- indra/newview/llagentlanguage.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llagentlanguage.cpp') diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp index f2ac323578..66aec42417 100755 --- a/indra/newview/llagentlanguage.cpp +++ b/indra/newview/llagentlanguage.cpp @@ -70,7 +70,6 @@ bool LLAgentLanguage::update() body["language"] = language; body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); - //LLHTTPClient::post(url, body, new LLHTTPClient::Responder); LLCore::HttpHandle handle = gAgent.requestPostCapability("UpdateAgentLanguage", url, body); if (handle == LLCORE_HTTP_HANDLE_INVALID) { -- cgit v1.2.3 From cf4fec954ca46a139465144ccc3888b8fc7d41da Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 8 Jun 2015 17:29:01 -0700 Subject: Added a way to pass a policy Id to the coroadapter. Changed language, appearance, and maturity to conform to use the adapter rather than the SDHandler --- indra/newview/llagentlanguage.cpp | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'indra/newview/llagentlanguage.cpp') diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp index 66aec42417..cdb0e3302d 100755 --- a/indra/newview/llagentlanguage.cpp +++ b/indra/newview/llagentlanguage.cpp @@ -55,26 +55,17 @@ void LLAgentLanguage::onChange() // static bool LLAgentLanguage::update() { - LLSD body; - std::string url; + LLSD body; - if (gAgent.getRegion()) - { - url = gAgent.getRegion()->getCapability("UpdateAgentLanguage"); - } - - if (!url.empty()) - { - std::string language = LLUI::getLanguage(); + std::string language = LLUI::getLanguage(); - body["language"] = language; - body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); + body["language"] = language; + body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic"); - LLCore::HttpHandle handle = gAgent.requestPostCapability("UpdateAgentLanguage", url, body); - if (handle == LLCORE_HTTP_HANDLE_INVALID) - { - LL_WARNS() << "Unable to change language." << LL_ENDL; - } - } + if (!gAgent.requestPostCapability("UpdateAgentLanguage", body)) + { + LL_WARNS("Language") << "Language capability unavailable." << LL_ENDL; + } + return true; } -- cgit v1.2.3