summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-07 15:01:01 -0700
committerJames Cook <james@lindenlab.com>2010-05-07 15:01:01 -0700
commit0e9faa3f0492f3ea1988377ee55c8b772d69ebed (patch)
treea6bf6958e5fc073144d3705268d5d253f5332892 /indra
parent2a2c51f278a5ee4dbfc21dfb25fe3eaee94082d7 (diff)
DEV-49780 Avatar picker uses new People API interface
Reviewed with Callum
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloateravatarpicker.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index f3b14b9b3d..f7f01116b1 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -57,6 +57,8 @@
#include "lluictrlfactory.h"
#include "message.h"
+//#include "llsdserialize.h"
+
LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
BOOL allow_multiple,
BOOL closeOnSelect)
@@ -351,20 +353,26 @@ public:
LLAvatarPickerResponder(const LLUUID& id) : mQueryID(id) { }
- /*virtual*/ void result(const LLSD& content)
+ /*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content)
{
- LLFloaterAvatarPicker* floater =
- LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
- if (floater)
+ //std::ostringstream ss;
+ //LLSDSerialize::toPrettyXML(content, ss);
+ //llinfos << ss.str() << llendl;
+
+ if (isGoodStatus(status))
{
- floater->processResponse(mQueryID, content);
+ LLFloaterAvatarPicker* floater =
+ LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
+ if (floater)
+ {
+ floater->processResponse(mQueryID, content);
+ }
+ }
+ else
+ {
+ llinfos << "avatar picker failed " << status
+ << " reason " << reason << llendl;
}
- }
-
- /*virtual*/ void error(U32 status, const std::string& reason)
- {
- llinfos << "avatar picker failed " << status
- << " reason " << reason << llendl;
}
};
@@ -390,7 +398,7 @@ void LLFloaterAvatarPicker::find()
{
url += "/";
}
- url += "?name=";
+ url += "?names=";
url += LLURI::escape(text);
llinfos << "avatar picker " << url << llendl;
LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID));