diff options
author | dolphin <dolphin@lindenlab.com> | 2014-03-10 10:15:19 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-03-10 10:15:19 -0700 |
commit | 7b9817cbcc5acab58d9d4355984b429850bd3ef8 (patch) | |
tree | e6e297900643f01962ee9b527532d6207db1acff /indra/newview | |
parent | 96457e1affe33d75208cabf7529b53eee8e8105b (diff) |
Fixed a bug that lost callbacks if > 10 experiences were looked up at a time.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterexperiencepicker.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 66 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_experienceprofile.xml | 4 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/floater_live_lsleditor.xml | 4 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/notifications.xml | 4 |
6 files changed, 56 insertions, 28 deletions
diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp index be53f2e12c..b82257ee56 100644 --- a/indra/newview/llfloaterexperiencepicker.cpp +++ b/indra/newview/llfloaterexperiencepicker.cpp @@ -439,7 +439,10 @@ void LLFloaterExperiencePicker::filterContent() void LLFloaterExperiencePicker::onMaturity() { - filterContent(); + if(mResponse.has("experience_keys") && mResponse["experience_keys"].beginArray() != mResponse["experience_keys"].endArray()) + { + filterContent(); + } } bool LLFloaterExperiencePicker::isExperienceHidden( const LLSD& experience) const diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index d7d1ed3dfc..e59c1c21f6 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1298,8 +1298,6 @@ void LLLiveLSLEditor::setExperienceIds( const LLSD& experience_ids ) void LLLiveLSLEditor::updateExperiencePanel() { - BOOL editable = getIsModifiable(); - if(mScriptEd->getAssociatedExperience().isNull()) { mExperienceEnabled->set(FALSE); @@ -1317,43 +1315,67 @@ void LLLiveLSLEditor::updateExperiencePanel() getChild<LLButton>("view_profile")->setVisible(FALSE); } else - { - mExperienceEnabled->setToolTip(getString("experience_enabled")); - mExperienceEnabled->setEnabled(editable); - mExperienceEnabled->set(TRUE); - mExperiences->setVisible(TRUE); - getChild<LLButton>("view_profile")->setVisible(TRUE); + { + mExperienceEnabled->setToolTip(getString("experience_enabled")); + mExperienceEnabled->setEnabled(getIsModifiable()); + mExperiences->setVisible(TRUE); buildExperienceList(); } } -void LLLiveLSLEditor::addExperienceInfo(const LLSD& experience, BOOL enabled) -{ - LLUUID id = experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); - EAddPosition position = (id == mScriptEd->getAssociatedExperience())?ADD_TOP:ADD_BOTTOM; - LLScrollListItem* item=mExperiences->add(experience[LLExperienceCache::NAME], id, position ); - if(!enabled) - { - item->setEnabled(FALSE); - } -} - void LLLiveLSLEditor::buildExperienceList() { mExperiences->clearRows(); bool foundAssociated=false; + const LLUUID& associated = mScriptEd->getAssociatedExperience(); + LLSD experience; + LLUUID last; + LLScrollListItem* item; for(LLSD::array_const_iterator it = mExperienceIds.beginArray(); it != mExperienceIds.endArray(); ++it) { LLUUID id = it->asUUID(); - foundAssociated |= (id == mScriptEd->getAssociatedExperience()); - LLExperienceCache::get(id, boost::bind(&LLLiveLSLEditor::addExperienceInfo, this, _1, TRUE)); + EAddPosition position = ADD_BOTTOM; + if(id == associated) + { + foundAssociated = true; + position = ADD_TOP; + } + if(LLExperienceCache::get(id, experience)) + { + mExperiences->add(experience[LLExperienceCache::NAME].asString(), id, position); + } + else + { + mExperiences->add(getString("loading"), id, position); + last = id; + } + } if(!foundAssociated ) { - LLExperienceCache::get(mScriptEd->getAssociatedExperience(), boost::bind(&LLLiveLSLEditor::addExperienceInfo, this, _1, FALSE)); + if(LLExperienceCache::get(associated, experience)) + { + item=mExperiences->add(experience[LLExperienceCache::NAME].asString(), associated, ADD_TOP); + } + else + { + item=mExperiences->add(getString("loading"), associated, ADD_TOP); + last = associated; + } + item->setEnabled(FALSE); } + if(last.notNull()) + { + mExperiences->setEnabled(FALSE); + LLExperienceCache::get(last, boost::bind(&LLLiveLSLEditor::buildExperienceList, this)); + } + else + { + mExperiences->setEnabled(TRUE); + getChild<LLButton>("view_profile")->setVisible(TRUE); + } } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 29d1443d6c..0264601d83 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -240,7 +240,6 @@ public: static void onToggleExperience(LLUICtrl *ui, void* userdata); static void onViewProfile(LLUICtrl *ui, void* userdata); - void addExperienceInfo( const LLSD& experience, BOOL enabled ); void setExperienceIds(const LLSD& experience_ids); void buildExperienceList(); void updateExperiencePanel(); diff --git a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml index fda84b0d4a..fa4e6c02db 100644 --- a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml +++ b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml @@ -10,7 +10,7 @@ min_width="325" min_height="325" width="358" - height="580"> + height="660"> <floater.string name="empty_slurl"> (none) @@ -42,7 +42,7 @@ <tab_container hide_tabs="true" follows="all" - height="540" + height="620" layout="topleft" left="5" min_height="250" diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml index d8c2a753a1..40b47dc1d7 100755 --- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml @@ -37,6 +37,10 @@ name="add_experiences"> Select to add an experience </floater.string> + <floater.string + name="loading"> + Loading... + </floater.string> <panel bevel_style="none" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 0da1e546ee..9482ebb520 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7003,7 +7003,7 @@ Unable to acquire a new experience: <notification icon="notify.tga" name="TeleportedHomeExperienceRemoved" - persist="true" + persist="false" type="notify"> You have been teleported from the region [region_name] for removing the experience secondlife:///app/experience/[public_id]/profile and are no longer permitted in the region. <form name="form"> @@ -7015,7 +7015,7 @@ Unable to acquire a new experience: <notification icon="notify.tga" name="TrustedExperienceEntry" - persist="true" + persist="false" type="notify"> You have been allowed into the region [region_name] by participating in the trusted experience secondlife:///app/experience/[public_id]/profile removing this experience may kick you from the region. <form name="form"> |