summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneliteminfo.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-02-24 21:02:12 -0500
committerNat Goodspeed <nat@lindenlab.com>2015-02-24 21:02:12 -0500
commitb5324afb6f2e45deefb9b79e7e2192bc686b181a (patch)
treedcae0395e2975f736a90c1fa3c67d6f318e01cc7 /indra/newview/llsidepaneliteminfo.cpp
parent9b45bc992edf8d049d8a1abe2e778870a493295a (diff)
parentc7841b48bdec74848a64e2dd0eac453ce855093d (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-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 1d20b7bed5..d75d4ae951 100755
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -43,6 +43,9 @@
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
+#include "llexperienceassociationresponder.h"
+#include "llexperiencecache.h"
+#include "lltrans.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -316,6 +319,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 //
//////////////////////
@@ -666,6 +678,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)