summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-07-09 12:30:57 -0400
committerOz Linden <oz@lindenlab.com>2015-07-09 12:30:57 -0400
commitc2f9c5ac8189b8076d51711c3be09dfbe309e22b (patch)
tree0c0a469645c77c62ff0456d2230cb6b2c3e996c0 /indra/newview/llsidepaneliteminfo.cpp
parentc91205c47627e46369d3a2e183de7a4157c051a8 (diff)
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
merge changes for 3.8.0-release
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rwxr-xr-xindra/newview/llsidepaneliteminfo.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 126f1fb9de..a7cfc173af 100755
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -44,6 +44,9 @@
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
+#include "llexperienceassociationresponder.h"
+#include "llexperiencecache.h"
+#include "lltrans.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -319,6 +322,15 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
is_obj_modify = object->permOwnerModify();
}
+ if(item->getInventoryType() == LLInventoryType::IT_LSL)
+ {
+ getChildView("LabelItemExperienceTitle")->setVisible(TRUE);
+ LLTextBox* tb = getChild<LLTextBox>("LabelItemExperience");
+ tb->setText(getString("loading_experience"));
+ tb->setVisible(TRUE);
+ ExperienceAssociationResponder::fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), boost::bind(&LLSidepanelItemInfo::setAssociatedExperience, getDerivedHandle<LLSidepanelItemInfo>(), _1));
+ }
+
//////////////////////
// ITEM NAME & DESC //
//////////////////////
@@ -674,6 +686,29 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
}
}
+
+void LLSidepanelItemInfo::setAssociatedExperience( LLHandle<LLSidepanelItemInfo> hInfo, const LLSD& experience )
+{
+ LLSidepanelItemInfo* info = hInfo.get();
+ if(info)
+ {
+ LLUUID id;
+ if(experience.has(LLExperienceCache::EXPERIENCE_ID))
+ {
+ id=experience[LLExperienceCache::EXPERIENCE_ID].asUUID();
+ }
+ if(id.notNull())
+ {
+ info->getChild<LLTextBox>("LabelItemExperience")->setText(LLSLURL("experience", id, "profile").getSLURLString());
+ }
+ else
+ {
+ info->getChild<LLTextBox>("LabelItemExperience")->setText(LLTrans::getString("ExperienceNameNull"));
+ }
+ }
+}
+
+
void LLSidepanelItemInfo::startObjectInventoryObserver()
{
if (!mObjectInventoryObserver)