summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llmessage/llexperiencecache.cpp19
-rw-r--r--indra/newview/llfloaterexperiencepicker.cpp5
-rwxr-xr-xindra/newview/llpreviewscript.cpp66
-rwxr-xr-xindra/newview/llpreviewscript.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_experienceprofile.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_live_lsleditor.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml4
7 files changed, 64 insertions, 39 deletions
diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp
index 921c1edc2e..5cca918baf 100644
--- a/indra/llmessage/llexperiencecache.cpp
+++ b/indra/llmessage/llexperiencecache.cpp
@@ -415,40 +415,39 @@ namespace LLExperienceCache
F64 now = LLFrameTimer::getTotalSeconds();
const U32 EXP_URL_SEND_THRESHOLD = 3000;
-
+ const U32 PAGE_SIZE = EXP_URL_SEND_THRESHOLD/UUID_STR_LENGTH;
std::ostringstream ostr;
ask_queue_t keys;
- ostr << sLookupURL;
+ ostr << sLookupURL << "?page_size=" << PAGE_SIZE;
- char arg='?';
int request_count = 0;
- for(ask_queue_t::const_iterator it = sAskQueue.begin() ; it != sAskQueue.end() && request_count < sMaximumLookups; ++it)
+ while(!sAskQueue.empty() && request_count < sMaximumLookups)
{
+ ask_queue_t::const_iterator it = sAskQueue.begin();
const LLUUID& key = it->first;
const std::string& key_type = it->second;
- ostr << arg << key_type << '=' << key.asString() ;
+ ostr << '&' << key_type << '=' << key.asString() ;
keys[key]=key_type;
request_count++;
sPendingQueue[key] = now;
-
- arg='&';
-
+
if(ostr.tellp() > EXP_URL_SEND_THRESHOLD)
{
LL_DEBUGS("ExperienceCache") << "requestExperiences() query: " << ostr.str() << LL_ENDL;
LLHTTPClient::get(ostr.str(), new LLExperienceResponder(keys));
ostr.clear();
ostr.str(sLookupURL);
- arg='?';
+ ostr << "?page_size=" << PAGE_SIZE;
keys.clear();
}
+ sAskQueue.erase(it);
}
if(ostr.tellp() > sLookupURL.size())
@@ -456,8 +455,6 @@ namespace LLExperienceCache
LL_DEBUGS("ExperienceCache") << "requestExperiences() query 2: " << ostr.str() << LL_ENDL;
LLHTTPClient::get(ostr.str(), new LLExperienceResponder(keys));
}
-
- sAskQueue.clear();
}
bool isRequestPending(const LLUUID& public_key)
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">