summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelexperiences.cpp
diff options
context:
space:
mode:
authordolphin@dolphin-THINK.lindenlab.com <dolphin@dolphin-THINK.lindenlab.com>2012-11-19 08:06:42 -0800
committerdolphin@dolphin-THINK.lindenlab.com <dolphin@dolphin-THINK.lindenlab.com>2012-11-19 08:06:42 -0800
commit2cde962d5db94baf860eb94fecaf9671548b2c53 (patch)
treee0be2ff2ec0a6812ed4bcff88bada3dae85adec8 /indra/newview/llpanelexperiences.cpp
parent723ab8b108beb7fc140b8be163d59b5dfa896ca8 (diff)
Test populating the experience keys UI with avatar name data.
Diffstat (limited to 'indra/newview/llpanelexperiences.cpp')
-rw-r--r--indra/newview/llpanelexperiences.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp
index f174171a97..bc9d3cc0ee 100644
--- a/indra/newview/llpanelexperiences.cpp
+++ b/indra/newview/llpanelexperiences.cpp
@@ -3,6 +3,7 @@
#include "llpanelprofile.h"
#include "lluictrlfactory.h"
+#include "llexperiencecache.h"
#include "llpanelexperiences.h"
@@ -34,15 +35,16 @@ BOOL LLPanelExperiences::postBuild( void )
mExperiencesList->setNoItemsCommentText(getString("no_experiences"));
}
- LLExperienceItem* item = new LLExperienceItem();
- item->setExperienceName("experience 1");
- item->setExperienceDescription("hey, I\'m an experience!");
- mExperiencesList->addItem(item);
-
- item = new LLExperienceItem();
- item->setExperienceName("experience 2");
- item->setExperienceDescription("hey, I\'m another experience!");
- mExperiencesList->addItem(item);
+ const LLExperienceCache::cache_t& experiences = LLExperienceCache::getCached();
+
+ LLExperienceCache::cache_t::const_iterator it = experiences.begin();
+ for( ; it != experiences.end() && mExperiencesList->getChildCount() < 10 ; ++it)
+ {
+ LLExperienceItem* item = new LLExperienceItem();
+ item->setExperienceName(it->second.mDisplayName);
+ item->setExperienceDescription(it->second.mDescription);
+ mExperiencesList->addItem(item);
+ }
mExperiencesAccTab = getChild<LLAccordionCtrlTab>("tab_experiences");
mExperiencesAccTab->setDropDownStateChangedCallback(boost::bind(&LLPanelExperiences::onAccordionStateChanged, this, mExperiencesAccTab));
@@ -179,7 +181,8 @@ LLExperienceItem::LLExperienceItem()
void LLExperienceItem::init( LLExperienceData* experience_data )
{
-
+ setExperienceDescription(experience_data->mDescription);
+ setExperienceName(experience_data->mDisplayName);
}
void LLExperienceItem::setExperienceDescription( const std::string& val )