diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-07-02 16:26:17 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-07-02 16:26:17 +0300 |
commit | 8e2ec992d0bc937f72f6a1e96592f32798daac29 (patch) | |
tree | b106227140e23c7ff66e7ac15c85877394a0b580 /indra/newview/llsidepaneliteminfo.cpp | |
parent | 79f1e2178828a3e7c1738d8e0682d795aeb240bf (diff) | |
parent | 4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff) |
Merge downstream code and become version 3.8.1
Diffstat (limited to 'indra/newview/llsidepaneliteminfo.cpp')
-rwxr-xr-x | indra/newview/llsidepaneliteminfo.cpp | 35 |
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) |