Skip to content
Snippets Groups Projects
Commit 22985813 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Add support for opensim avatar picker url

parent 26e23b91
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,10 @@
#include "lluictrlfactory.h"
#include "llmediactrl.h"
#include "llagent.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
#include "llweb.h"
LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
: LLFloater(key)
......@@ -56,6 +60,18 @@ LLFloaterAvatar::~LLFloaterAvatar()
BOOL LLFloaterAvatar::postBuild()
{
enableResizeCtrls(true, true, false);
LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
if (avatar_picker)
{
avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
if (auto* regionp = gAgent.getRegion())
{
std::string ava_url = regionp->getAvatarPickerURL();
ava_url = LLWeb::expandURLSubstitutions(ava_url, LLSD());
avatar_picker->navigateTo(ava_url, HTTP_CONTENT_TEXT_HTML);
}
}
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment