diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 05a6555a8e..97fd2d1d03 100755 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -63,6 +63,9 @@ #include "rlvhandler.h" // [/RLVa:KB] #include "llviewernetwork.h" // For OpenSim export perms +#include "llexperienceassociationresponder.h" +#include "llexperiencecache.h" +#include "llslurl.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLPropertiesObserver @@ -265,6 +268,17 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) is_obj_modify = object->permOwnerModify(); } + // Experience info + if(item->getInventoryType() == LLInventoryType::IT_LSL) + { + getChildView("LabelItemExperienceTitle")->setVisible(TRUE); + LLTextBox* tb = getChild("LabelItemExperience"); + tb->setText(getString("loading_experience")); + tb->setVisible(TRUE); + ExperienceAssociationResponder::fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), boost::bind(&LLFloaterProperties::setAssociatedExperience, getDerivedHandle(), _1)); + } + // + ////////////////////// // ITEM NAME & DESC // ////////////////////// @@ -574,6 +588,29 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } } +// Experience info +void LLFloaterProperties::setAssociatedExperience( LLHandle hInfo, const LLSD& experience ) +{ + LLFloaterProperties* info = hInfo.get(); + if(info) + { + LLUUID id; + if(experience.has(LLExperienceCache::EXPERIENCE_ID)) + { + id=experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); + } + if(id.notNull()) + { + info->getChild("LabelItemExperience")->setText(LLSLURL("experience", id, "profile").getSLURLString()); + } + else + { + info->getChild("LabelItemExperience")->setText(LLTrans::getString("ExperienceNameNull")); + } + } +} +// + void LLFloaterProperties::onClickCreator() { LLInventoryItem* item = findItem(); diff --git a/indra/newview/llfloaterproperties.h b/indra/newview/llfloaterproperties.h index 7921917e3b..3612887a47 100755 --- a/indra/newview/llfloaterproperties.h +++ b/indra/newview/llfloaterproperties.h @@ -75,6 +75,9 @@ protected: void refreshFromItem(LLInventoryItem* item); virtual void draw(); + // Experience info + static void setAssociatedExperience( LLHandle hInfo, const LLSD& experience ); + protected: // The item id of the inventory item in question. LLUUID mItemID; diff --git a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml index 6b922272cb..dc8b59b538 100755 --- a/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml @@ -1,5 +1,8 @@ + + (laden) + (unbekannt) @@ -35,6 +38,9 @@ Mittwoch, 24. Mai 2006, 12:50:46 + + Erlebnis: + Sie: diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 6d0aed3021..ed6b462e00 100755 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -1,13 +1,17 @@ + + (loading) + (unknown) @@ -178,6 +182,28 @@ width="252"> Wed May 24 12:50:46 2006 + + Experience: + + You: @@ -362,7 +388,7 @@ layout="topleft" left="225" name="BaseMaskDebug" - top="125" + top="145" width="330"> B: diff --git a/indra/newview/skins/vintage/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/vintage/xui/en/floater_inventory_item_properties.xml index a72b0b8654..ae7fe7599e 100755 --- a/indra/newview/skins/vintage/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/vintage/xui/en/floater_inventory_item_properties.xml @@ -1,13 +1,17 @@ + + (loading) + (unknown) @@ -178,6 +182,28 @@ width="252"> Wed May 24 12:50:46 2006 + + Experience: + + You: