summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/featuretable.txt2
-rw-r--r--indra/newview/featuretable_linux.txt6
-rw-r--r--indra/newview/featuretable_mac.txt3
-rw-r--r--indra/newview/gpu_table.txt2
-rw-r--r--indra/newview/linux_tools/client-readme.txt4
-rwxr-xr-xindra/newview/linux_tools/wrapper.sh3
-rw-r--r--indra/newview/llagent.cpp2
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llassetuploadresponders.cpp4
-rw-r--r--indra/newview/llcompilequeue.cpp6
-rw-r--r--indra/newview/llcompilequeue.h6
-rw-r--r--indra/newview/lldrawpool.cpp51
-rw-r--r--indra/newview/lldrawpoolalpha.cpp8
-rw-r--r--indra/newview/lldrawpoolbump.cpp12
-rw-r--r--indra/newview/lldrawpoolwater.cpp6
-rw-r--r--indra/newview/lldynamictexture.cpp21
-rw-r--r--indra/newview/llfeaturemanager.cpp8
-rw-r--r--indra/newview/llflexibleobject.cpp11
-rw-r--r--indra/newview/llflexibleobject.h2
-rw-r--r--indra/newview/llfloaterabout.cpp16
-rw-r--r--indra/newview/llfloateranimpreview.h2
-rw-r--r--indra/newview/llfloaterauction.cpp8
-rw-r--r--indra/newview/llfloateravatarpicker.cpp46
-rw-r--r--indra/newview/llfloateravatarpicker.h2
-rw-r--r--indra/newview/llfloaterfriends.cpp3
-rw-r--r--indra/newview/llfloaterfriends.h2
-rw-r--r--indra/newview/llfloatergodtools.cpp2
-rw-r--r--indra/newview/llfloatergroupinvite.cpp7
-rw-r--r--indra/newview/llfloatergroupinvite.h2
-rw-r--r--indra/newview/llfloatergroups.cpp45
-rw-r--r--indra/newview/llfloatergroups.h2
-rw-r--r--indra/newview/llfloaterimagepreview.cpp9
-rw-r--r--indra/newview/llfloaterinspect.cpp8
-rw-r--r--indra/newview/llfloaterpostcard.cpp2
-rw-r--r--indra/newview/llfloaterpostcard.h2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp22
-rw-r--r--indra/newview/llfloaterregioninfo.h2
-rw-r--r--indra/newview/llfloaterreporter.cpp2
-rw-r--r--indra/newview/llfloaterreporter.h2
-rw-r--r--indra/newview/llfloatersnapshot.cpp8
-rw-r--r--indra/newview/llfloatertools.cpp18
-rw-r--r--indra/newview/llfloatertos.cpp14
-rw-r--r--indra/newview/llfloaterworldmap.cpp8
-rw-r--r--indra/newview/llfolderview.cpp83
-rw-r--r--indra/newview/llfolderview.h3
-rw-r--r--indra/newview/llgesturemgr.cpp2
-rw-r--r--indra/newview/llgesturemgr.h2
-rw-r--r--indra/newview/llinventorybridge.cpp47
-rw-r--r--indra/newview/lllandmarklist.cpp3
-rw-r--r--indra/newview/lllandmarklist.h3
-rw-r--r--indra/newview/llmaniptranslate.cpp15
-rw-r--r--indra/newview/llmutelist.cpp4
-rw-r--r--indra/newview/llmutelist.h2
-rw-r--r--indra/newview/llpanelclassified.cpp59
-rw-r--r--indra/newview/llpanelclassified.h5
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp22
-rw-r--r--indra/newview/llpanelgroupgeneral.h2
-rw-r--r--indra/newview/llpanelgroupinvite.cpp146
-rw-r--r--indra/newview/llpanelgroupinvite.h8
-rw-r--r--indra/newview/llpanellogin.cpp47
-rw-r--r--indra/newview/llpanellogin.h2
-rw-r--r--indra/newview/llpanelobject.cpp75
-rw-r--r--indra/newview/llpanelobject.h7
-rw-r--r--indra/newview/llpreview.cpp8
-rw-r--r--indra/newview/llpreview.h2
-rw-r--r--indra/newview/llpreviewgesture.cpp7
-rw-r--r--indra/newview/llpreviewgesture.h4
-rw-r--r--indra/newview/llpreviewnotecard.cpp4
-rw-r--r--indra/newview/llpreviewnotecard.h4
-rw-r--r--indra/newview/llpreviewscript.cpp46
-rw-r--r--indra/newview/llpreviewscript.h16
-rw-r--r--indra/newview/llspatialpartition.cpp19
-rw-r--r--indra/newview/llspatialpartition.h22
-rw-r--r--indra/newview/llstartup.cpp656
-rw-r--r--indra/newview/llstartup.h61
-rw-r--r--indra/newview/llstatusbar.cpp2
-rw-r--r--indra/newview/lltexlayer.cpp2
-rw-r--r--indra/newview/lltexlayer.h2
-rw-r--r--indra/newview/lltexturectrl.cpp18
-rw-r--r--indra/newview/lltexturectrl.h4
-rw-r--r--indra/newview/lltoolgrab.cpp7
-rw-r--r--indra/newview/lltoolmorph.cpp2
-rw-r--r--indra/newview/lltracker.cpp51
-rw-r--r--indra/newview/llviewerassetstorage.cpp10
-rw-r--r--indra/newview/llviewerassetstorage.h2
-rw-r--r--indra/newview/llviewerdisplay.cpp11
-rw-r--r--indra/newview/llviewerinventory.cpp88
-rw-r--r--indra/newview/llviewerinventory.h6
-rw-r--r--indra/newview/llviewermenu.cpp48
-rw-r--r--indra/newview/llviewermenufile.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp184
-rw-r--r--indra/newview/llviewermessage.h3
-rw-r--r--indra/newview/llviewerobject.cpp2
-rw-r--r--indra/newview/llviewerobject.h2
-rw-r--r--indra/newview/llviewerobjectlist.cpp40
-rw-r--r--indra/newview/llviewerregion.cpp9
-rw-r--r--indra/newview/llviewertexteditor.cpp91
-rw-r--r--indra/newview/llviewertexteditor.h6
-rw-r--r--indra/newview/llviewerwindow.cpp20
-rw-r--r--indra/newview/llvoavatar.cpp1
-rw-r--r--indra/newview/llvoiceclient.cpp2
-rw-r--r--indra/newview/llvopartgroup.cpp2
-rw-r--r--indra/newview/llvosky.cpp6
-rw-r--r--indra/newview/llvovolume.cpp6
-rw-r--r--indra/newview/llwearable.cpp3
-rw-r--r--indra/newview/llwearable.h2
-rw-r--r--indra/newview/llwearablelist.cpp2
-rw-r--r--indra/newview/llwearablelist.h2
-rw-r--r--indra/newview/pipeline.cpp8
-rw-r--r--indra/newview/pipeline.h2
-rwxr-xr-xindra/newview/viewer_manifest.py2
111 files changed, 1528 insertions, 902 deletions
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 28b1ddc131..f98b42bba2 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 6c7acfa187..f31fc0dbb6 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -34,6 +34,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
@@ -107,6 +109,8 @@ RenderAvatarVP 0 0
RenderLighting 1 0
RenderParticleCount 1 1024
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
+UseOcclusion 0 0
list low
@@ -145,6 +149,7 @@ RenderVBO 1 0
RenderAniso 1 0
RenderLighting 1 0
RenderTerrainDetail 1 0
+RenderCubeMap 0 0
list GeForce2
RenderVBO 1 1
@@ -156,6 +161,7 @@ RenderTerrainDetail 1 0
list GeForce3
list ATI
+UseOcclusion 0 0
list Radeon8500
RenderLighting 1 0
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 2685e3b7b4..fe5ae7a4ae 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -35,7 +35,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
-
+UseOcclusion 1 1
+RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 74fbe2c7f2..066990bafa 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -25,6 +25,8 @@ ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 2
ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1
ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1
ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1
+ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1
+ATI Mobility Radeon .*ATI.*Mobility.* 0
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3
ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3
ATI FireGL 5xxx .*ATI.*FireGL V5.* 3
diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt
index e07384cc93..59ebf6793a 100644
--- a/indra/newview/linux_tools/client-readme.txt
+++ b/indra/newview/linux_tools/client-readme.txt
@@ -97,6 +97,10 @@ you wish.
These are the most commonly-encountered known issues which are specific to
the Alpha release of the Linux client.
+* VOICE COMMUNICATION - this is not yet available in the Linux client.
+
+* STREAMING MOVIES - these are currently disabled while we work on some issues.
+
* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as
robust as their counterparts for other operating systems, so some advanced
Second Life graphical features have been DISABLED by default to aid
diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh
index d39fc3a8d1..2a57b66883 100755
--- a/indra/newview/linux_tools/wrapper.sh
+++ b/indra/newview/linux_tools/wrapper.sh
@@ -43,6 +43,9 @@ export LL_GL_BASICEXT=x
## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
export SDL_VIDEO_X11_DGAMOUSE=0
+## - Works around a problem with misconfigured 64-bit systems not finding GL
+export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri
+
## Nothing worth editing below this line.
##-------------------------------------------------------------------
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 7ed11c1154..e12904ef43 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -5592,7 +5592,7 @@ void LLAgent::teleportCancel()
sendReliableMessage();
}
gTeleportDisplay = FALSE;
- gAgent.setTeleportState( LLAgent::TELEPORT_CANCELLING );
+ gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 438239e717..8b6e1c33a4 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -509,8 +509,7 @@ public:
TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond
TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator
TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator
- TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches"
- TELEPORT_CANCELLING = 6 // used only if user clicks "cancel" button
+ TELEPORT_ARRIVING = 5 // Make the user wait while content "pre-caches"
};
ETeleportState getTeleportState() const { return mTeleportState; }
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 0fcf28ee6c..923a2b935a 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -75,8 +75,8 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
{
case 400:
args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
- args["[REASON]"] = "Error in upload request. Please contact "
- "support@lindenlab.com for help fixing this problem.";
+ args["[REASON]"] = "Error in upload request. Please visit "
+ "http://secondlife.com/support for help fixing this problem.";
gViewerWindow->alertXml("CannotUploadReason", args);
break;
case 500:
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index d31c7b4f53..11d55b5215 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -346,7 +346,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
// static
void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
LLScriptQueueData* data = (LLScriptQueueData*)user_data;
@@ -429,7 +429,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
// static
-void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
if (status)
@@ -442,7 +442,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use
}
// static
-void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
LLCompileQueueData* data = (LLCompileQueueData*)user_data;
diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h
index fc0a872907..11f3cfb8f2 100644
--- a/indra/newview/llcompilequeue.h
+++ b/indra/newview/llcompilequeue.h
@@ -113,12 +113,12 @@ protected:
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
- static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status);
+ static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
static void onSaveBytecodeComplete(const LLUUID& asset_id,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
// compile the file given and save it out.
void compile(const char* filename, const LLUUID& asset_id);
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 2626a8bd31..a2c39b807c 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -449,12 +449,14 @@ LLDrawPool* LLRenderPass::instancePool()
void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
- std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
- LLDrawInfo& params = **k;
- pushBatch(params, mask, texture);
+ LLDrawInfo *pparams = *k;
+ if (pparams) {
+ pushBatch(*pparams, mask, texture);
+ }
}
}
@@ -464,14 +466,15 @@ void LLRenderPass::renderInvisible(U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
- for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
- LLDrawInfo& params = **i;
+
+ LLDrawInfo *pparams = *i;
+ if (pparams && pparams->mVertexBuffer.notNull()) {
+ LLDrawInfo &params = *pparams;
- if (params.mVertexBuffer)
- {
params.mVertexBuffer->setBuffer(mask);
U32 *indices_pointer =
(U32 *) params.mVertexBuffer->getIndicesPointer();
@@ -489,22 +492,19 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
- for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
- LLDrawInfo& params = **i;
- pushBatch(params, mask, TRUE);
+ LLDrawInfo* pparams = *i;
+ if (pparams) {
+ pushBatch(*pparams, mask, TRUE);
+ }
}
}
void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
- if (params.mVertexBuffer.isNull())
- {
- return;
- }
-
if (texture)
{
if (params.mTexture.notNull())
@@ -522,12 +522,15 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
LLImageGL::unbindTexture(0);
}
}
-
- params.mVertexBuffer->setBuffer(mask);
- U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
- glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
- GL_UNSIGNED_INT, indices_pointer+params.mOffset);
- gPipeline.mTrianglesDrawn += params.mCount/3;
+
+ if (params.mVertexBuffer.notNull())
+ {
+ params.mVertexBuffer->setBuffer(mask);
+ U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
+ glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
+ GL_UNSIGNED_INT, indices_pointer+params.mOffset);
+ gPipeline.mTrianglesDrawn += params.mCount/3;
+ }
if (params.mTextureMatrix && texture && params.mTexture.notNull())
{
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index de82dff95d..56fb0bc1f9 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -199,9 +199,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask, std::vector<LLSpatialGroup*
last_part = part;
}
- std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
- for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
@@ -225,7 +225,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
{
BOOL light_enabled = TRUE;
- std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
U32 prim_type = GL_TRIANGLES;
@@ -252,7 +252,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
glPointSize(width/(view*view));
}*/
- for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if (texture && params.mTexture.notNull())
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 67f60ffdfa..cc605df099 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -330,9 +330,9 @@ void LLDrawPoolBump::renderActive(U32 type, U32 mask, BOOL texture)
void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE)
{
- std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if (LLPipeline::sDynamicReflections)
@@ -879,9 +879,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
- std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
- for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
+ for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
@@ -894,9 +894,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask)
{
- const std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
- for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index bc35c167ea..7597a7057a 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -72,8 +72,8 @@ LLDrawPool *LLDrawPoolWater::instancePool()
void LLDrawPoolWater::prerender()
{
- mVertexShaderLevel = gSavedSettings.getBOOL("RenderRippleWater") ?
- LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
+ mVertexShaderLevel = (gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) ?
+ LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
}
@@ -545,7 +545,7 @@ void LLDrawPoolWater::shade()
LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap();
gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB);
- skyMap->bind();
+ skyMap->bind();
//bind normal map
S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP);
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index f3821a8b7a..93ff7e430c 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -185,8 +185,6 @@ BOOL LLDynamicTexture::updateAllInstances()
return TRUE;
}
- BOOL started = FALSE;
-
BOOL result = FALSE;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
@@ -195,29 +193,22 @@ BOOL LLDynamicTexture::updateAllInstances()
dynamicTexture = LLDynamicTexture::sInstances[order].getNextData())
{
if (dynamicTexture->needsRender())
- {
- if (!started)
- {
- started = TRUE;
- LLVertexBuffer::startRender();
- }
-
- dynamicTexture->preRender();
+ {
+ dynamicTexture->preRender(); // Must be called outside of startRender()
+
+ LLVertexBuffer::startRender();
if (dynamicTexture->render())
{
result = TRUE;
sNumRenders++;
}
+ LLVertexBuffer::stopRender();
+
dynamicTexture->postRender(result);
}
}
}
- if (started)
- {
- LLVertexBuffer::stopRender();
- }
-
return result;
}
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 35849552b3..e1edb5059d 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -382,7 +382,7 @@ void LLFeatureManager::cleanupFeatureTables()
void LLFeatureManager::initCPUFeatureMasks()
{
- if (gSysMemory.getPhysicalMemory() <= 256*1024*1024)
+ if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
{
maskFeatures("RAM256MB");
}
@@ -474,7 +474,7 @@ extern LLOSInfo gSysOS;
void LLFeatureManager::applyRecommendedFeatures()
{
- // see featuretable.txt
+ // see featuretable.txt / featuretable_linux.txt / featuretable_mac.txt
llinfos << "Applying Recommended Features" << llendl;
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -524,6 +524,10 @@ void LLFeatureManager::applyRecommendedFeatures()
// RippleWater
BOOL ripple = getRecommendedLevel("RenderRippleWater");
gSavedSettings.setBOOL("RenderRippleWater", ripple);
+
+ // Occlusion Culling
+ BOOL occlusion = getRecommendedLevel("UseOcclusion");
+ gSavedSettings.setBOOL("UseOcclusion", occlusion);
// Vertex Shaders
S32 shaders = getRecommendedLevel("VertexShaderEnable");
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 2e9dba3af4..aff534974f 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -623,6 +623,15 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->updateRelativeXform();
doFlexibleUpdate();
+ // Object may have been rotated, which means it needs a rebuild. See SL-47220
+ BOOL rotated = FALSE;
+ LLQuaternion cur_rotation = getFrameRotation();
+ if ( cur_rotation != mLastFrameRotation )
+ {
+ mLastFrameRotation = cur_rotation;
+ rotated = TRUE;
+ }
+
if (volume->mLODChanged || volume->mFaceMappingChanged ||
volume->mVolumeChanged)
{
@@ -630,7 +639,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
}
- if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged)
+ if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged || rotated)
{
doFlexibleRebuild();
volume->genBBoxes(isVolumeGlobal());
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index c814f67b91..bc9fe958bf 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -97,7 +97,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
LLVector3 mAnchorPosition;
LLVector3 mParentPosition;
LLQuaternion mParentRotation;
- LLQuaternion mInitialAxisRotation;
+ LLQuaternion mLastFrameRotation;
LLQuaternion mLastSegmentRotation;
BOOL mInitialized;
BOOL mUpdated;
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 8a51c155de..9e6dbccf0f 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -99,9 +99,8 @@ LLFloaterAbout::LLFloaterAbout()
support.append( gSysCPU.getCPUString() );
support.append("\n");
- U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024;
- // For some reason, the reported amount of memory is always wrong by one meg
- memory++;
+ U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
+ // Moved hack adjustment to Windows memory size into llsys.cpp
LLString mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
@@ -147,8 +146,15 @@ LLFloaterAbout::LLFloaterAbout()
// Fix views
childDisable("credits_editor");
- childDisable("support_editor");
- childSetText("support_editor", support);
+
+ LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true);
+ if (support_widget)
+ {
+ support_widget->setEnabled( FALSE );
+ support_widget->setTakesFocus( TRUE );
+ support_widget->setText( support );
+ support_widget->setHandleEditKeysDirectly( TRUE );
+ }
center();
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index fe6f19e962..d55783aab9 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -82,7 +82,7 @@ public:
static void onSaveComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
protected:
void draw();
void resetMotion();
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index bc2c340999..dad66c6e9f 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -35,9 +35,9 @@
///----------------------------------------------------------------------------
void auction_j2c_upload_done(const LLUUID& asset_id,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void auction_tga_upload_done(const LLUUID& asset_id,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
///----------------------------------------------------------------------------
/// Class llfloaterauction
@@ -238,7 +238,7 @@ void LLFloaterAuction::onClickOK(void* data)
/// Local function definitions
///----------------------------------------------------------------------------
-void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
llinfos << "Upload of asset '" << *name << "' " << asset_id
@@ -259,7 +259,7 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status
}
}
-void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
llinfos << "Upload of asset '" << *name << "' " << asset_id
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 0ba0ab89b1..01296ddbae 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -177,29 +177,33 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
}
}
+// static callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
- if (!self)
+ if (self)
{
- return;
+ self->doSelectionChange( items, user_action, data );
}
+}
- self->mAvatarIDs.clear();
- self->mAvatarNames.clear();
-
- // if we have calling cards, disable select button until
- // the inventory picks a valid calling card
- if (!items.empty())
+// Callback for inventory picker (select from calling cards)
+void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
+{
+ if (!mListNames)
{
- self->childSetEnabled("Select", FALSE);
+ return;
}
- if (!self->mListNames)
- {
- return;
+ std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
+ if ( search_items.size() == 0 )
+ { // Nothing selected in the search results
+ mAvatarIDs.clear();
+ mAvatarNames.clear();
+ childSetEnabled("Select", FALSE);
}
-
+
+ BOOL first_calling_card = TRUE;
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
@@ -210,10 +214,18 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*
if (item)
{
- self->mAvatarIDs.push_back(item->getCreatorUUID());
- self->mAvatarNames.push_back(listenerp->getName());
- self->childSetEnabled("Select", TRUE);
- self->mListNames->deselectAllItems();
+ if ( first_calling_card )
+ { // Have a calling card selected, so clear anything from the search panel
+ first_calling_card = FALSE;
+ mAvatarIDs.clear();
+ mAvatarNames.clear();
+ mListNames->deselectAllItems();
+ }
+
+ // Add calling card info to the selected avatars
+ mAvatarIDs.push_back(item->getCreatorUUID());
+ mAvatarNames.push_back(listenerp->getName());
+ childSetEnabled("Select", TRUE);
}
}
}
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 694b760f96..ff294b006c 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -44,6 +44,8 @@ protected:
static void onBtnAdd(void* userdata);
static void onBtnClose(void* userdata);
static void onList(LLUICtrl* ctrl, void* userdata);
+
+ void doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
void find();
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 592cb4186c..b3f85ec198 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -73,12 +73,13 @@ LLPanelFriends::~LLPanelFriends()
delete mObserver;
}
-void LLPanelFriends::tick()
+BOOL LLPanelFriends::tick()
{
mEventTimer.stop();
mPeriod = 1000000;
mAllowRightsChange = TRUE;
updateFriends(LLFriendObserver::ADD);
+ return FALSE;
}
void LLPanelFriends::updateFriends(U32 changed_mask)
diff --git a/indra/newview/llfloaterfriends.h b/indra/newview/llfloaterfriends.h
index 6895e469e5..0738b9a036 100644
--- a/indra/newview/llfloaterfriends.h
+++ b/indra/newview/llfloaterfriends.h
@@ -37,7 +37,7 @@ public:
* current instantiation of this floater. There is only once since
* you can currently only look at your local friends.
*/
- virtual void tick();
+ virtual BOOL tick();
/**
* @brief This method is called in response to the LLAvatarTracker
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 6065fc92c9..d144e667ca 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -1399,7 +1399,7 @@ void LLPanelRequestTools::onClickRequest(void* data)
}
}
-void terrain_download_done(void** data, S32 status)
+void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
{
LLNotifyBox::showXml("TerrainDownloaded");
}
diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp
index 13ab90cdd3..a41b24c61c 100644
--- a/indra/newview/llfloatergroupinvite.cpp
+++ b/indra/newview/llfloatergroupinvite.cpp
@@ -87,7 +87,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
}
// static
-void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
+void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
{
// Make sure group_id isn't null
if (group_id.isNull())
@@ -111,6 +111,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
fgi->mImpl->mInvitePanelp->clear();
}
+
+ if (agent_ids != NULL)
+ {
+ fgi->mImpl->mInvitePanelp->addUsers(*agent_ids);
+ }
fgi->center();
fgi->open(); /*Flawfinder: ignore*/
diff --git a/indra/newview/llfloatergroupinvite.h b/indra/newview/llfloatergroupinvite.h
index fb47654476..7cf245d15d 100644
--- a/indra/newview/llfloatergroupinvite.h
+++ b/indra/newview/llfloatergroupinvite.h
@@ -19,7 +19,7 @@ class LLFloaterGroupInvite
public:
virtual ~LLFloaterGroupInvite();
- static void showForGroup(const LLUUID &group_id);
+ static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL);
protected:
LLFloaterGroupInvite(const std::string& name,
diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp
index 60cfa3b809..a9354eb5b8 100644
--- a/indra/newview/llfloatergroups.cpp
+++ b/indra/newview/llfloatergroups.cpp
@@ -18,6 +18,7 @@
#include "llfloatergroups.h"
#include "message.h"
+#include "roles_constants.h"
#include "llagent.h"
#include "llbutton.h"
@@ -36,7 +37,7 @@
std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
// helper functions
-void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id);
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
///----------------------------------------------------------------------------
/// Class LLFloaterGroupPicker
@@ -63,7 +64,8 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
mSelectCallback(NULL),
- mCallbackUserdata(NULL)
+ mCallbackUserdata(NULL),
+ mPowersMask(GP_ALL_POWERS)
{
mID = seed.asUUID();
sInstances.insert(std::make_pair(mID, this));
@@ -81,9 +83,16 @@ void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
mCallbackUserdata = userdata;
}
+void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
+{
+ mPowersMask = powers_mask;
+ postBuild();
+}
+
+
BOOL LLFloaterGroupPicker::postBuild()
{
- init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
+ init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID(), mPowersMask);
childSetAction("OK", onBtnOK, this);
@@ -394,7 +403,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
if(self) self->enableButtons();
}
-void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
+void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
{
S32 count = gAgent.mGroups.count();
LLUUID id;
@@ -407,20 +416,22 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
{
id = gAgent.mGroups.get(i).mID;
LLGroupData* group_datap = &gAgent.mGroups.get(i);
- LLString style = "NORMAL";
- if(highlight_id == id)
- {
- style = "BOLD";
+ if ((group_datap->mPowers & powers_mask) != 0) {
+ LLString style = "NORMAL";
+ if(highlight_id == id)
+ {
+ style = "BOLD";
+ }
+
+ LLSD element;
+ element["id"] = id;
+ element["columns"][0]["column"] = "name";
+ element["columns"][0]["value"] = group_datap->mName;
+ element["columns"][0]["font"] = "SANSSERIF";
+ element["columns"][0]["font-style"] = style;
+
+ group_list->addElement(element, ADD_SORTED);
}
-
- LLSD element;
- element["id"] = id;
- element["columns"][0]["column"] = "name";
- element["columns"][0]["value"] = group_datap->mName;
- element["columns"][0]["font"] = "SANSSERIF";
- element["columns"][0]["font-style"] = style;
-
- group_list->addElement(element, ADD_SORTED);
}
// add "none" to list at top
diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h
index 65bed95ea8..cb6ec25444 100644
--- a/indra/newview/llfloatergroups.h
+++ b/indra/newview/llfloatergroups.h
@@ -37,6 +37,7 @@ public:
~LLFloaterGroupPicker();
void setSelectCallback( void (*callback)(LLUUID, void*),
void* userdata);
+ void setPowersMask(U64 powers_mask);
BOOL postBuild();
protected:
@@ -49,6 +50,7 @@ protected:
protected:
LLUUID mID;
+ U64 mPowersMask;
void (*mSelectCallback)(LLUUID id, void* userdata);
void* mCallbackUserdata;
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 457a87adb2..16875a7e3b 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -30,6 +30,7 @@
#include "pipeline.h"
#include "viewer.h"
#include "llvieweruictrlfactory.h"
+#include "llviewerimagelist.h"
//static
S32 LLFloaterImagePreview::sUploadAmount = 10;
@@ -37,9 +38,10 @@ S32 LLFloaterImagePreview::sUploadAmount = 10;
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
-const S32 PREF_BUTTON_HEIGHT = 16;
+const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_TEXTURE_HEIGHT = 300;
+
//-----------------------------------------------------------------------------
// LLFloaterImagePreview()
//-----------------------------------------------------------------------------
@@ -86,6 +88,10 @@ BOOL LLFloaterImagePreview::postBuild()
mSculptedPreview = new LLImagePreviewSculpted(256, 256);
mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f);
+
+ if ((mRawImagep->getWidth() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF) &&
+ (mRawImagep->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF))
+ childEnable("lossless_check");
}
else
{
@@ -743,6 +749,7 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami
LLVolumeParams volume_params;
volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE);
+ volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_SPHERE);
mVolume = new LLVolume(volume_params, (F32) MAX_LOD);
/*
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 388e8d9cbd..730d934131 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -35,10 +35,10 @@ LLFloaterInspect::~LLFloaterInspect(void)
{
if(gToolMgr->getBaseTool() == gToolInspect)
{
- select_tool(gToolNull);
+ gToolMgr->clearTransientTool();
}
// Switch back to basic toolset
- gToolMgr->setCurrentToolset(gBasicToolset);
+ gToolMgr->setCurrentToolset(gBasicToolset);
}
else
{
@@ -65,7 +65,7 @@ void LLFloaterInspect::show(void* ignored)
}
sInstance->open();
- select_tool(gToolInspect);
+ gToolMgr->setTransientTool(gToolInspect);
gSelectMgr->setForceSelection(forcesel); // restore previouis value
sInstance->mObjectSelection = gSelectMgr->getSelection();
@@ -236,7 +236,7 @@ void LLFloaterInspect::refresh()
void LLFloaterInspect::onFocusReceived()
{
- select_tool(gToolInspect);
+ gToolMgr->setTransientTool(gToolInspect);
}
void LLFloaterInspect::dirty()
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index e44dfe7d85..fc391ee520 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -271,7 +271,7 @@ void LLFloaterPostcard::onClickPublishHelp(void* data)
}
// static
-void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result) // StoreAssetData callback (fixed)
+void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
index 7ca1278776..d029f86345 100644
--- a/indra/newview/llfloaterpostcard.h
+++ b/indra/newview/llfloaterpostcard.h
@@ -38,7 +38,7 @@ public:
static void uploadCallback(const LLUUID& asset_id,
void *user_data,
- S32 result);
+ S32 result, LLExtStat ext_status);
static void updateUserInfo(const char *email);
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index efbf8a7826..f61f43fd5e 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -1463,13 +1463,15 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
LLCtrlListInterface *list = self->childGetListInterface("estate_manager_name_list");
if (!list) return;
if (list->getItemCount() >= ESTATE_MAX_MANAGERS)
- {
+ { // Tell user they can't add more managers
LLString::format_map_t args;
args["[MAX_MANAGER]"] = llformat("%d",ESTATE_MAX_MANAGERS);
gViewerWindow->alertXml("MaxManagersOnRegion", args);
- return;
}
- accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
+ else
+ { // Go pick managers to add
+ accessAddCore(ESTATE_ACCESS_MANAGER_ADD, "EstateManagerAdd");
+ }
}
// static
@@ -1975,7 +1977,7 @@ BOOL LLPanelEstateInfo::postBuild()
if (manager_name_list)
{
manager_name_list->setCommitOnSelectionChange(TRUE);
- manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS);
+ manager_name_list->setMaxItemCount(ESTATE_MAX_MANAGERS * 4); // Allow extras for dupe issue
}
childSetAction("add_estate_manager_btn", onClickAddEstateManager, this);
@@ -2542,7 +2544,7 @@ void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp)
void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLPanelEstateCovenant::onLoadComplete()" << llendl;
LLPanelEstateCovenant* panelp = (LLPanelEstateCovenant*)user_data;
@@ -2953,9 +2955,13 @@ bool LLDispatchSetEstateAccess::operator()(
LLNameListCtrl* estate_manager_name_list =
LLViewerUICtrlFactory::getNameListByName(panel, "estate_manager_name_list");
if (estate_manager_name_list)
- {
- estate_manager_name_list->deleteAllItems();
- for (S32 i = 0; i < num_estate_managers && i < ESTATE_MAX_MANAGERS; i++)
+ {
+ estate_manager_name_list->deleteAllItems(); // Clear existing entries
+
+ // There should be only ESTATE_MAX_MANAGERS people in the list, but if the database gets more (SL-46107) don't
+ // truncate the list unless it's really big. Go ahead and show the extras so the user doesn't get confused,
+ // and they can still remove them.
+ for (S32 i = 0; i < num_estate_managers && i < (ESTATE_MAX_MANAGERS * 4); i++)
{
LLUUID id;
memcpy(id.mData, strings[index++].data(), UUID_BYTES); /* Flawfinder: ignore */
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 8ab479d619..12e70219d1 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -349,7 +349,7 @@ public:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
// Accessor functions
static void updateCovenantText(const std::string& string, const LLUUID& asset_id);
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index e1a9a38ccb..65509205c2 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -910,7 +910,7 @@ void LLFloaterReporter::uploadImage()
// static
-void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result) // StoreAssetData callback (fixed)
+void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUploadDialog::modalUploadFinished();
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index 30de56fb87..2fc10b8753 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -74,7 +74,7 @@ public:
static void onClickObjPicker (void *userdata);
static void onClickSelectAbuser (void *userdata);
static void closePickTool (void *userdata);
- static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result);
+ static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result, LLExtStat ext_status);
static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL);
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 5feb8b2f0d..57f4906b71 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -658,15 +658,17 @@ void LLSnapshotLivePreview::saveTexture()
LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
std::string pos_string;
gAgent.buildLocationString(pos_string);
+ std::string who_took_it;
+ gAgent.buildFullname(who_took_it);
upload_new_resource(tid, // tid
LLAssetType::AT_TEXTURE,
- "Snapshot",
- pos_string,
+ "Snapshot : " + pos_string,
+ "Taken by " + who_took_it + " at " + pos_string,
0,
LLAssetType::AT_SNAPSHOT_CATEGORY,
LLInventoryType::IT_SNAPSHOT,
PERM_ALL,
- "Snapshot");
+ "Snapshot : " + pos_string);
}
else
{
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 0da0958c9b..22e4004d1a 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -380,13 +380,18 @@ LLFloaterTools::LLFloaterTools()
mSmallHeight = mLargeHeight;
if (mTab) mSmallHeight -= mTab->getRect().getHeight();
- gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially
- showMore(FALSE);
+ // force a toggle initially. seems to be needed to correctly initialize
+ // both "more" and "less" cases. it also seems to be important to begin
+ // with the user's preference first so that it's initial position will
+ // be correct (SL-51192) -MG
+ BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
+ gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
+ showMore( !show_more ); // does the toggle
+ showMore( show_more ); // reset the real user's preference
}
LLFloaterTools::~LLFloaterTools()
{
- showMore(FALSE);
// children automatically deleted
}
@@ -757,23 +762,20 @@ void LLFloaterTools::showMore(BOOL show_more)
{
reshape( mRect.getWidth(), mLargeHeight, TRUE);
translate( 0, mSmallHeight - mLargeHeight );
- childSetVisible("button less", true);
- childSetVisible("button more", false);
}
else
{
reshape( mRect.getWidth(), mSmallHeight, TRUE);
translate( 0, mLargeHeight - mSmallHeight );
- childSetVisible("button less", false);
- childSetVisible("button more", true);
}
+ childSetVisible("button less", show_more);
+ childSetVisible("button more", !show_more);
}
void LLFloaterTools::showPanel(EInfoPanel panel)
{
llassert(panel >= 0 && panel < PANEL_COUNT);
mTab->selectTabByName(PANEL_NAMES[panel]);
- showMore(TRUE);
}
void click_show_more(void *userdata)
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index f7bf4de34f..160fd477b4 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -247,7 +247,17 @@ void LLFloaterTOS::onContinue( void* userdata )
{
gAcceptCriticalMessage = TRUE;
}
- gStartupState++;
+
+ // Testing TOS dialog
+ #if ! LL_RELEASE_FOR_DOWNLOAD
+ if ( LLStartUp::getStartupState() == STATE_LOGIN_WAIT )
+ {
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ }
+ else
+ #endif
+
+ LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT ); // Go back and finish authentication
self->close(); // destroys this object
}
@@ -257,7 +267,7 @@ void LLFloaterTOS::onCancel( void* userdata )
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User disagrees with TOS." << llendl;
gViewerWindow->alertXml("MustAgreeToLogIn", login_alert_done);
- gStartupState = STATE_LOGIN_SHOW;
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
self->mLoadCompleteCount = 0; // reset counter for next time we come to TOS
self->close(); // destroys this object
}
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 365926863e..996e90ed8e 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -1222,6 +1222,14 @@ void LLFloaterWorldMap::onLocationCommit( void* userdata )
LLString str = self->childGetValue("location").asString();
+ // Trim any leading and trailing spaces in the search target
+ LLString saved_str = str;
+ LLString::trim( str );
+ if ( str != saved_str )
+ { // Set the value in the UI if any spaces were removed
+ self->childSetValue("location", str);
+ }
+
LLString::toLower(str);
gFloaterWorldMap->mCompletingRegionName = str;
gWorldMap->mIsTrackingCommit = TRUE;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 34a062576f..20f00e297d 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -699,7 +699,15 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
{
- preview();
+ if (mListener->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ {
+ gFocusMgr.setKeyboardFocus(NULL, NULL); // release focus to main window so user can move with arrow keys
+ mListener->performAction(NULL, &gInventory, "teleport");
+ }
+ else
+ {
+ preview();
+ }
return TRUE;
}
@@ -2508,6 +2516,7 @@ LLFolderView::LLFolderView( const LLString& name, LLViewerImage* root_folder_ico
mShowSelectionContext(FALSE),
mShowSingleSelection(FALSE),
mArrangeGeneration(0),
+ mUserData(NULL),
mSelectCallback(NULL),
mSelectionChanged(FALSE),
mMinWidth(0),
@@ -4234,73 +4243,89 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
return NULL;
}
-//static
-void LLFolderView::idle(void* user_data)
+
+// Main idle routine
+void LLFolderView::doIdle()
{
LLFastTimer t2(LLFastTimer::FTM_INVENTORY);
- LLFolderView* self = (LLFolderView*)user_data;
BOOL debug_filters = gSavedSettings.getBOOL("DebugInventoryFilters");
- if (debug_filters != self->getDebugFilters())
+ if (debug_filters != getDebugFilters())
{
- self->mDebugFilters = debug_filters;
- self->arrangeAll();
+ mDebugFilters = debug_filters;
+ arrangeAll();
}
- self->mFilter.clearModified();
- BOOL filter_modified_and_active = self->mCompletedFilterGeneration < self->mFilter.getCurrentGeneration() &&
- self->mFilter.isNotDefault();
- self->mNeedsAutoSelect = filter_modified_and_active &&
- !(gFocusMgr.childHasKeyboardFocus(self) || gFocusMgr.getMouseCapture());
+ mFilter.clearModified();
+ BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter.getCurrentGeneration() &&
+ mFilter.isNotDefault();
+ mNeedsAutoSelect = filter_modified_and_active &&
+ !(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
// filter to determine visiblity before arranging
- self->filterFromRoot();
+ filterFromRoot();
// automatically show matching items, and select first one
// do this every frame until user puts keyboard focus into the inventory window
// signaling the end of the automatic update
// only do this when mNeedsFilter is set, meaning filtered items have
// potentially changed
- if (self->mNeedsAutoSelect)
+ if (mNeedsAutoSelect)
{
LLFastTimer t3(LLFastTimer::FTM_AUTO_SELECT);
// select new item only if a filtered item not currently selected
- LLFolderViewItem* selected_itemp = self->mSelectedItems.empty() ? NULL : self->mSelectedItems.back();
- if ((!selected_itemp || !selected_itemp->getFiltered()) && !self->mAutoSelectOverride)
+ LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
+ if ((!selected_itemp || !selected_itemp->getFiltered()) && !mAutoSelectOverride)
{
// select first filtered item
LLSelectFirstFilteredItem filter;
- self->applyFunctorRecursively(filter);
+ applyFunctorRecursively(filter);
}
- self->scrollToShowSelection();
+ scrollToShowSelection();
}
- self->sanitizeSelection();
+ BOOL is_visible = isInVisibleChain();
- if( self->needsArrange() && self->isInVisibleChain())
+ if ( is_visible )
{
- self->arrangeFromRoot();
+ sanitizeSelection();
+ if( needsArrange() )
+ {
+ arrangeFromRoot();
+ }
}
- if (self->mSelectedItems.size() && self->mNeedsScroll)
+ if (mSelectedItems.size() && mNeedsScroll)
{
- self->scrollToShowItem(self->mSelectedItems.back());
+ scrollToShowItem(mSelectedItems.back());
// continue scrolling until animated layout change is done
- if (self->getCompletedFilterGeneration() >= self->mFilter.getMinRequiredGeneration() &&
- (!self->needsArrange() || !self->isInVisibleChain()))
+ if (getCompletedFilterGeneration() >= mFilter.getMinRequiredGeneration() &&
+ (!needsArrange() || !is_visible))
{
- self->mNeedsScroll = FALSE;
+ mNeedsScroll = FALSE;
}
}
- if (self->mSelectionChanged && self->mSelectCallback)
+ if (mSelectionChanged && mSelectCallback)
{
//RN: we use keyboard focus as a proxy for user-explicit actions
- self->mSelectCallback(self->mSelectedItems, gFocusMgr.childHasKeyboardFocus(self), self->mUserData);
+ mSelectCallback(mSelectedItems, gFocusMgr.childHasKeyboardFocus(this), mUserData);
}
- self->mSelectionChanged = FALSE;
+ mSelectionChanged = FALSE;
}
+
+//static
+void LLFolderView::idle(void* user_data)
+{
+ LLFolderView* self = (LLFolderView*)user_data;
+ if ( self )
+ { // Do the real idle
+ self->doIdle();
+ }
+}
+
+
void LLFolderView::dumpSelectionInformation()
{
llinfos << "LLFolderView::dumpSelectionInformation()" << llendl;
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 97071862de..79a3b74248 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -839,7 +839,8 @@ public:
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
- static void idle(void* user_data);
+ void doIdle(); // Real idle routine
+ static void idle(void* user_data); // static glue to doIdle()
BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
BOOL needsAutoRename() { return mNeedsAutoRename; }
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 3c51d7dcf1..af35a7211d 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -877,7 +877,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
void LLGestureManager::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLLoadInfo* info = (LLLoadInfo*)user_data;
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index c68ca4f265..33d453fc30 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -112,7 +112,7 @@ protected:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
public:
BOOL mValid;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 8a08bd2a4b..073d6cc088 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -68,10 +68,14 @@
void inc_busy_count()
{
// gViewerWindow->getWindow()->incBusyCount();
+// check balance of these calls if this code is changed to ever actually
+// *do* something!
}
void dec_busy_count()
{
// gViewerWindow->getWindow()->decBusyCount();
+// check balance of these calls if this code is changed to ever actually
+// *do* something!
}
// Function declarations
@@ -886,7 +890,7 @@ BOOL LLItemBridge::removeItem()
return FALSE;
}
// move it to the trash
- LLPreview::hide(mUUID);
+ LLPreview::hide(mUUID, TRUE);
LLInventoryModel* model = mInventoryPanel->getModel();
if(!model) return FALSE;
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -1345,6 +1349,17 @@ protected:
void LLRightClickInventoryFetchDescendentsObserver::done()
{
+ // Avoid passing a NULL-ref as mCompleteFolders.front() down to
+ // gInventory.collectDescendents()
+ if( mCompleteFolders.empty() )
+ {
+ llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl;
+ dec_busy_count();
+ gInventory.removeObserver(this);
+ delete this;
+ return;
+ }
+
// What we do here is get the complete information on the items in
// the library, and set up an observer that will wait for that to
// happen.
@@ -1355,7 +1370,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
item_array,
LLInventoryModel::EXCLUDE_TRASH);
S32 count = item_array.count();
-#if 0
+#if 0 // HACK/TODO: Why?
// This early causes a giant menu to get produced, and doesn't seem to be needed.
if(!count)
{
@@ -2899,7 +2914,6 @@ void LLGestureBridge::openItem()
BOOL LLGestureBridge::removeItem()
{
// Force close the preview window, if it exists
- LLPreview::hide(mUUID);
gGestureManager.deactivateGesture(mUUID);
return LLItemBridge::removeItem();
}
@@ -3438,13 +3452,27 @@ public:
{
/*
* Do nothing. We only care about the destructor
+ *
+ * The reason for this is that this callback is used in a hack where the
+ * same callback is given to dozens of items, and the destructor is called
+ * after the last item has fired the event and dereferenced it -- if all
+ * the events actually fire!
*/
}
protected:
~LLWearInventoryCategoryCallback()
{
- wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
+ // Is the destructor called by ordinary dereference, or because the app's shutting down?
+ // If the inventory callback manager goes away, we're shutting down, no longer want the callback.
+ if( LLInventoryCallbackManager::is_instantiated() )
+ {
+ wear_inventory_category_on_avatar(gInventory.getCategory(mCatID), mAppend);
+ }
+ else
+ {
+ llwarns << "Dropping unhandled LLWearInventoryCategoryCallback" << llendl;
+ }
}
private:
@@ -4194,8 +4222,16 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back("Restore Item");
}
else
- {
+ { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM);
+
+ // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976
+ LLViewerInventoryItem* item = getItem();
+ if( !no_open && item )
+ {
+ no_open = (item->getType() == LLAssetType::AT_CLOTHING);
+ }
+
if (!no_open)
{
items.push_back("Open");
@@ -4222,7 +4258,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
LLWearableBridge::canEditOnAvatar,
(void*)this));*/
- LLViewerInventoryItem* item = getItem();
if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
{
items.push_back("Take Off");
diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp
index 57684fbc18..c8446e718f 100644
--- a/indra/newview/lllandmarklist.cpp
+++ b/indra/newview/lllandmarklist.cpp
@@ -57,7 +57,8 @@ void LLLandmarkList::processGetAssetReply(
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
- S32 status)
+ S32 status,
+ LLExtStat ext_status )
{
if( status == 0 )
{
diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h
index 15e900b601..2c58fd09b2 100644
--- a/indra/newview/lllandmarklist.h
+++ b/indra/newview/lllandmarklist.h
@@ -35,7 +35,8 @@ public:
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
- S32 status);
+ S32 status,
+ LLExtStat ext_status );
protected:
typedef std::map<LLUUID, LLLandmark*> landmark_list_t;
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index bdb6380368..c01ca4d0fa 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -329,7 +329,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (!selected_object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no selected object" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -347,9 +347,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
{
LLCoordGL mouse_pos;
- gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos);
-
- if (gSavedSettings.getBOOL("SnapToMouseCursor"))
+ if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos))
+ {
+ // mouse_pos may be nonsense
+ llwarns << "Failed to project object center to screen" << llendl;
+ }
+ else if (gSavedSettings.getBOOL("SnapToMouseCursor"))
{
LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
x = mouse_pos.mX;
@@ -460,7 +463,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!selectNode)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no selectNode" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
@@ -469,7 +472,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
if (!object)
{
// somehow we lost the object!
- llwarns << "Translate manip lost the object" << llendl;
+ llwarns << "Translate manip lost the object, no object in selectNode" << llendl;
gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
return TRUE;
}
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 62c7d40a90..eb0b7e620a 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -172,7 +172,7 @@ BOOL LLMuteList::isLinden(const LLString& name) const
BOOL LLMuteList::add(const LLMute& mute, U32 flags)
{
// Can't mute text from Lindens
- if ((mute.mType == LLMute::AGENT || mute.mType == LLMute::BY_NAME)
+ if ((mute.mType == LLMute::AGENT)
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
{
gViewerWindow->alertXml("MuteLinden");
@@ -593,7 +593,7 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
gMuteListp->loadFromFile(filename);
}
-void LLMuteList::onFileMuteList(void** user_data, S32 error_code)
+void LLMuteList::onFileMuteList(void** user_data, S32 error_code, LLExtStat ext_status)
{
llinfos << "LLMuteList::processMuteListFile()" << llendl;
if (!gMuteListp) return;
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index f035e4c2b1..a7ac7e3321 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -103,7 +103,7 @@ private:
static void processMuteListUpdate(LLMessageSystem* msg, void**);
static void processUseCachedMuteList(LLMessageSystem* msg, void**);
- static void onFileMuteList(void** user_data, S32 code);
+ static void onFileMuteList(void** user_data, S32 code, LLExtStat ext_status);
private:
struct compare_by_name
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index afba55f4aa..4779470039 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -249,7 +249,7 @@ void LLPanelClassified::apply()
{
// Apply is used for automatically saving results, so only
// do that if there is a difference, and this is a save not create.
- if (mDirty && mPaidFor)
+ if (checkDirty() && mPaidFor)
{
sendClassifiedInfoUpdate();
}
@@ -293,7 +293,8 @@ void LLPanelClassified::saveCallback(S32 option, void* data)
BOOL LLPanelClassified::canClose()
{
- if (mForceClose || !mDirty) return TRUE;
+ if (mForceClose || !checkDirty())
+ return TRUE;
LLString::format_map_t args;
args["[NAME]"] = mNameEditor->getText();
@@ -656,7 +657,7 @@ void LLPanelClassified::refresh()
mSetBtn->setVisible(is_self);
mSetBtn->setEnabled(is_self);
- mUpdateBtn->setEnabled(is_self && mDirty);
+ mUpdateBtn->setEnabled(is_self && checkDirty());
mUpdateBtn->setVisible(is_self);
}
}
@@ -716,29 +717,44 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, LLString text, vo
}
-// static
-void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
-{
- LLPanelClassified* self = (LLPanelClassified*)data;
+// invoked from callbackConfirmPublish
+void LLPanelClassified::confirmPublish(S32 option)
+{
// Option 0 = publish
if (option != 0) return;
- self->sendClassifiedInfoUpdate();
+ sendClassifiedInfoUpdate();
// Big hack - assume that top picks are always in a browser,
// and non-finder-classifieds are always in a tab container.
- if (self->mInFinder)
+ if (mInFinder)
{
// TODO: enable this
- //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)self->getParent();
- //panel->renameClassified(self->mClassifiedID, self->mNameEditor->getText().c_str());
+ //LLPanelDirClassifieds* panel = (LLPanelDirClassifieds*)getParent();
+ //panel->renameClassified(mClassifiedID, mNameEditor->getText().c_str());
}
else
{
- LLTabContainerVertical* tab = (LLTabContainerVertical*)self->getParent();
- tab->setCurrentTabName(self->mNameEditor->getText());
+ LLTabContainerVertical* tab = (LLTabContainerVertical*)getParent();
+ tab->setCurrentTabName(mNameEditor->getText());
}
+
+ // Tell all the widgets to reset their dirty state since the ad was just saved
+ mSnapshotCtrl->resetDirty();
+ mNameEditor->resetDirty();
+ mDescEditor->resetDirty();
+ mLocationEditor->resetDirty();
+ mCategoryCombo->resetDirty();
+ mMatureCheck->resetDirty();
+ mAutoRenewCheck->resetDirty();
+}
+
+// static
+void LLPanelClassified::callbackConfirmPublish(S32 option, void* data)
+{
+ LLPanelClassified* self = (LLPanelClassified*)data;
+ self->confirmPublish(option);
}
// static
@@ -811,13 +827,27 @@ void LLPanelClassified::onClickSet(void* data)
}
+BOOL LLPanelClassified::checkDirty()
+{
+ mDirty = FALSE;
+ if ( mSnapshotCtrl ) mDirty |= mSnapshotCtrl->isDirty();
+ if ( mNameEditor ) mDirty |= mNameEditor->isDirty();
+ if ( mDescEditor ) mDirty |= mDescEditor->isDirty();
+ if ( mLocationEditor ) mDirty |= mLocationEditor->isDirty();
+ if ( mCategoryCombo ) mDirty |= mCategoryCombo->isDirty();
+ if ( mMatureCheck ) mDirty |= mMatureCheck->isDirty();
+ if ( mAutoRenewCheck ) mDirty |= mAutoRenewCheck->isDirty();
+
+ return mDirty;
+}
+
// static
void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelClassified* self = (LLPanelClassified*)data;
if (self)
{
- self->mDirty = true;
+ self->checkDirty();
}
}
@@ -825,7 +855,6 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
void LLPanelClassified::onFocusReceived(LLUICtrl* ctrl, void* data)
{
// allow the data to be saved
- // Dave/Simon TODO: replace this with better isDirty() functionality
onCommitAny(ctrl, data);
}
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 21f6f9263c..284016f149 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -71,6 +71,7 @@ public:
void sendClassifiedInfoRequest();
void sendClassifiedInfoUpdate();
+ void confirmPublish(S32 option);
static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
@@ -90,10 +91,11 @@ protected:
static void onCommitAny(LLUICtrl* ctrl, void* data);
void sendClassifiedClickMessage(const char* type);
+ BOOL checkDirty(); // Update and return mDirty
protected:
BOOL mInFinder;
- bool mDirty;
+ BOOL mDirty;
bool mForceClose;
LLUUID mClassifiedID;
LLUUID mRequestedID;
@@ -114,7 +116,6 @@ protected:
// Values the user may change
LLTextureCtrl* mSnapshotCtrl;
LLLineEditor* mNameEditor;
- LLLineEditor* mDateEditor;
LLTextEditor* mDescEditor;
LLLineEditor* mLocationEditor;
LLComboBox* mCategoryCombo;
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 9967a70111..ce51c59413 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -50,7 +50,6 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name,
mFounderName(NULL),
mInsignia(NULL),
mEditCharter(NULL),
- mEditName(NULL),
mBtnJoinGroup(NULL),
mListVisibleMembers(NULL),
mCtrlShowInGroupList(NULL),
@@ -236,7 +235,7 @@ BOOL LLPanelGroupGeneral::postBuild()
void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data)
{
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
- self->mChanged = TRUE;
+ self->updateChanged();
self->notifyObservers();
}
@@ -791,3 +790,22 @@ void LLPanelGroupGeneral::updateMembers()
mListVisibleMembers->setEnabled(FALSE);
}
}
+
+
+void LLPanelGroupGeneral::updateChanged()
+{
+ mChanged = FALSE;
+ if ( mGroupNameEditor )
+ mChanged = mGroupNameEditor->isDirty();
+ if ( mGroupName )
+ mChanged |= mGroupName->isDirty();
+ if ( mFounderName )
+ mChanged |= mFounderName->isDirty();
+ if ( mInsignia )
+ mChanged |= mInsignia->isDirty();
+ if ( mEditCharter )
+ mChanged |= mEditCharter->isDirty();
+// if ( mCtrlReceiveNotices ) // "Receive group notices" is different, see onReceiveNotices()
+// mChanged |= mCtrlReceiveNotices->isDirty();
+}
+
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index d62cab0133..76a4d791e1 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -54,6 +54,7 @@ private:
static void joinDlgCB(S32 which, void *userdata);
void updateMembers();
+ void updateChanged();
BOOL mPendingMemberUpdate;
BOOL mChanged;
@@ -68,7 +69,6 @@ private:
LLNameBox *mFounderName;
LLTextureCtrl *mInsignia;
LLTextEditor *mEditCharter;
- LLLineEditor *mEditName;
LLButton *mBtnJoinGroup;
LLButton *mBtnInfo;
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 12ac66e9fb..538269280e 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -16,6 +16,9 @@
#include "llgroupmgr.h"
#include "llnamelistctrl.h"
#include "llspinctrl.h"
+#include "lltextbox.h"
+#include "llviewerobject.h"
+#include "llviewerobjectlist.h"
#include "llvieweruictrlfactory.h"
class LLPanelGroupInvite::impl
@@ -45,7 +48,9 @@ public:
LLNameListCtrl *mInvitees;
LLComboBox *mRoleNames;
- LLButton *mRemoveButton;
+ LLButton *mOKButton;
+ LLButton *mRemoveButton;
+ LLTextBox *mGroupName;
void (*mCloseCallback)(void* data);
@@ -288,6 +293,8 @@ LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name,
: LLPanel(name)
{
mImplementation = new impl(group_id);
+ mPendingUpdate = FALSE;
+ mStoreSelected = LLUUID::null;
std::string panel_def_file;
@@ -309,29 +316,132 @@ void LLPanelGroupInvite::setCloseCallback(void (*close_callback)(void*),
void LLPanelGroupInvite::clear()
{
+ mStoreSelected = LLUUID::null;
mImplementation->mInvitees->deleteAllItems();
mImplementation->mRoleNames->clear();
mImplementation->mRoleNames->removeall();
+ mImplementation->mOKButton->setEnabled(FALSE);
}
+void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
+{
+ std::vector<std::string> names;
+ for (S32 i = 0; i < (S32)agent_ids.size(); i++)
+ {
+ LLUUID agent_id = agent_ids[i];
+ LLViewerObject* dest = gObjectList.findObject(agent_id);
+ if(dest && dest->isAvatar())
+ {
+ LLString fullname;
+ LLString::format_map_t args;
+ LLNameValue* nvfirst = dest->getNVPair("FirstName");
+ LLNameValue* nvlast = dest->getNVPair("LastName");
+ if(nvfirst && nvlast)
+ {
+ args["[FIRST]"] = nvfirst->getString();
+ args["[LAST]"] = nvlast->getString();
+ fullname = nvfirst->getString();
+ fullname += " ";
+ fullname += nvlast->getString();
+ }
+ if (!fullname.empty())
+ {
+ names.push_back(fullname);
+ }
+ else
+ {
+ llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl;
+ names.push_back("(Unknown)");
+ }
+ }
+ }
+ mImplementation->addUsers(names, agent_ids);
+}
+
+void LLPanelGroupInvite::draw()
+{
+ LLPanel::draw();
+ if (mPendingUpdate)
+ {
+ updateLists();
+ }
+}
+
void LLPanelGroupInvite::update()
{
+ mPendingUpdate = FALSE;
+ if (mImplementation->mGroupName)
+ {
+ mImplementation->mGroupName->setText("(loading...)");
+ }
+ if ( mImplementation->mRoleNames )
+ {
+ mStoreSelected = mImplementation->mRoleNames->getCurrentID();
+ mImplementation->mRoleNames->clear();
+ mImplementation->mRoleNames->removeall();
+ mImplementation->mRoleNames->add("(loading...)", LLUUID::null, ADD_BOTTOM);
+ mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
+ }
+
+ updateLists();
+}
+
+void LLPanelGroupInvite::updateLists()
+{
LLGroupMgrGroupData* gdatap = gGroupMgr->getGroupData(mImplementation->mGroupID);
+ BOOL waiting = FALSE;
- if (!gdatap || !gdatap->isRoleDataComplete())
+ if (gdatap)
+ {
+ if (gdatap->isGroupPropertiesDataComplete())
+ {
+ if (mImplementation->mGroupName)
+ {
+ mImplementation->mGroupName->setText(gdatap->mName);
+ }
+ }
+ else
+ {
+ waiting = TRUE;
+ }
+ if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete())
+ {
+ if ( mImplementation->mRoleNames )
+ {
+ mImplementation->mRoleNames->clear();
+ mImplementation->mRoleNames->removeall();
+
+ //add the role names and select the everybody role by default
+ mImplementation->addRoleNames(gdatap);
+ mImplementation->mRoleNames->setCurrentByID(mStoreSelected);
+ }
+ }
+ else
+ {
+ waiting = TRUE;
+ }
+ }
+ else
{
- gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ waiting = TRUE;
}
+
+ if (waiting)
+ {
+ if (!mPendingUpdate)
+ {
+ gGroupMgr->sendGroupPropertiesRequest(mImplementation->mGroupID);
+ gGroupMgr->sendGroupMembersRequest(mImplementation->mGroupID);
+ gGroupMgr->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ }
+ mPendingUpdate = TRUE;
+ }
else
{
- if ( mImplementation->mRoleNames )
+ mPendingUpdate = FALSE;
+ if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount())
{
- mImplementation->mRoleNames->clear();
- mImplementation->mRoleNames->removeall();
-
- //add the role names and select the everybody role by default
- mImplementation->addRoleNames(gdatap);
- mImplementation->mRoleNames->setCurrentByID(LLUUID::null);
+ mImplementation->mOKButton->setEnabled(TRUE);
}
}
}
@@ -342,6 +452,7 @@ BOOL LLPanelGroupInvite::postBuild()
mImplementation->mRoleNames = (LLComboBox*) getChildByName("role_name",
recurse);
+ mImplementation->mGroupName = (LLTextBox*) getChildByName("group_name_text", recurse);
mImplementation->mInvitees =
(LLNameListCtrl*) getChildByName("invitee_list", recurse);
if ( mImplementation->mInvitees )
@@ -370,12 +481,15 @@ BOOL LLPanelGroupInvite::postBuild()
mImplementation->mRemoveButton->setEnabled(FALSE);
}
- button = (LLButton*) getChildByName("ok_button", recurse);
- if ( button )
- {
- button->setClickedCallback(impl::callbackClickOK);
- button->setCallbackUserData(mImplementation);
- }
+ mImplementation->mOKButton =
+ (LLButton*) getChildByName("ok_button", recurse);
+ if ( mImplementation->mOKButton )
+ {
+ mImplementation->mOKButton->
+ setClickedCallback(impl::callbackClickOK);
+ mImplementation->mOKButton->setCallbackUserData(mImplementation);
+ mImplementation->mOKButton->setEnabled(FALSE);
+ }
button = (LLButton*) getChildByName("cancel_button", recurse);
if ( button )
diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h
index bab39a1a66..d3ef6af838 100644
--- a/indra/newview/llpanelgroupinvite.h
+++ b/indra/newview/llpanelgroupinvite.h
@@ -17,16 +17,22 @@ class LLPanelGroupInvite
public:
LLPanelGroupInvite(const std::string& name, const LLUUID& group_id);
~LLPanelGroupInvite();
-
+
+ void addUsers(std::vector<LLUUID>& agent_ids);
void clear();
void update();
void setCloseCallback(void (*close_callback)(void*), void* data);
+ virtual void draw();
virtual BOOL postBuild();
protected:
class impl;
impl* mImplementation;
+
+ BOOL mPendingUpdate;
+ LLUUID mStoreSelected;
+ void updateLists();
};
#endif
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 6e1a1b9f09..7a05f2bdbf 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -119,6 +119,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
{
llwarns << "Duplicate instance of login view deleted" << llendl;
delete LLPanelLogin::sInstance;
+
+ // Don't leave bad pointer in gFocusMgr
+ gFocusMgr.setDefaultKeyboardFocus(NULL);
}
LLPanelLogin::sInstance = this;
@@ -505,9 +508,10 @@ void LLPanelLogin::show(const LLRect &rect,
{
// Grab focus and move cursor to first enabled control
sInstance->setFocus(TRUE);
- // make sure that focus always goes here
- gFocusMgr.setDefaultKeyboardFocus(sInstance);
}
+
+ // Make sure that focus always goes here (and use the latest sInstance that was just created)
+ gFocusMgr.setDefaultKeyboardFocus(sInstance);
}
// static
@@ -588,35 +592,40 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString &
}
-// static
-void LLPanelLogin::getServer(LLString &server, S32 &domain_name)
+// static. Return TRUE if user made a choice from the popup
+BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name)
{
+ BOOL user_picked = FALSE;
if (!sInstance)
{
llwarns << "Attempted getServer with no login view shown" << llendl;
- return;
}
-
- LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
- if (combo)
+ else
{
- LLSD combo_val = combo->getValue();
- if (LLSD::TypeInteger == combo_val.type())
+ LLComboBox* combo = LLUICtrlFactory::getComboBoxByName(sInstance, "server_combo");
+ if (combo)
{
- domain_name = combo->getValue().asInteger();
+ LLSD combo_val = combo->getValue();
+ if (LLSD::TypeInteger == combo_val.type())
+ {
+ domain_name = combo->getValue().asInteger();
- if ((S32)USERSERVER_OTHER == domain_name)
+ if ((S32)USERSERVER_OTHER == domain_name)
+ {
+ server = gUserServerName;
+ }
+ }
+ else
{
- server = gUserServerName;
+ // no valid selection, return other
+ domain_name = (S32)USERSERVER_OTHER;
+ server = combo_val.asString();
}
- }
- else
- {
- // no valid selection, return other
- domain_name = (S32)USERSERVER_OTHER;
- server = combo_val.asString();
+ user_picked = combo->isDirty();
}
}
+
+ return user_picked;
}
// static
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index d9d933400f..2c3acfb00c 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -49,7 +49,7 @@ public:
static void getFields(LLString &firstname, LLString &lastname,
LLString &password, BOOL &remember);
- static void getServer(LLString &server, S32& domain_name);
+ static BOOL getServer(LLString &server, S32& domain_name);
static void getLocation(LLString &location);
static void close();
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index f699027835..a267c50fde 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -266,6 +266,10 @@ BOOL LLPanelObject::postBuild()
}
}
+ mLabelSculptType = gUICtrlFactory->getTextBoxByName(this, "label sculpt type");
+ mCtrlSculptType = gUICtrlFactory->getComboBoxByName(this, "sculpt type control");
+ childSetCommitCallback("sculpt type control", onCommitSculptType, this);
+
// Start with everyone disabled
clearCtrls();
@@ -1015,7 +1019,10 @@ void LLPanelObject::getState( )
mLabelRevolutions->setVisible( revolutions_visible );
mSpinRevolutions ->setVisible( revolutions_visible );
- mCtrlSculptTexture->setVisible( sculpt_texture_visible );
+ bool sculpt_type_visible = FALSE; // currently not visible - for LSL setting only
+ mCtrlSculptTexture->setVisible(sculpt_texture_visible);
+ mLabelSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
+ mCtrlSculptType->setVisible(sculpt_texture_visible && sculpt_type_visible);
// sculpt texture
@@ -1025,21 +1032,39 @@ void LLPanelObject::getState( )
LLUUID id;
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
- LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control");
- if((mTextureCtrl) && (sculpt_params))
+
+ if (sculpt_params) // if we have a legal sculpt param block for this object:
{
- mTextureCtrl->setTentative(FALSE);
- mTextureCtrl->setEnabled(editable);
- if (editable)
- mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
- else
- mTextureCtrl->setImageAssetID(LLUUID::null);
-
-
if (mObject != objectp) // we've just selected a new object, so save for undo
+ {
mSculptTextureRevert = sculpt_params->getSculptTexture();
- }
+ mSculptTypeRevert = sculpt_params->getSculptType();
+ }
+
+ LLTextureCtrl* mTextureCtrl = LLViewerUICtrlFactory::getTexturePickerByName(this,"sculpt texture control");
+ if(mTextureCtrl)
+ {
+ mTextureCtrl->setTentative(FALSE);
+ mTextureCtrl->setEnabled(editable);
+ if (editable)
+ mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture());
+ else
+ mTextureCtrl->setImageAssetID(LLUUID::null);
+ }
+
+ if (mCtrlSculptType)
+ {
+ mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType());
+ mCtrlSculptType->setEnabled(editable);
+ }
+ if (mLabelSculptType)
+ {
+ mLabelSculptType->setEnabled(TRUE);
+ }
+
+
+ }
}
@@ -1174,7 +1199,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata )
self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE);
LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
if (sculpt_params)
- volume_params.setSculptID(sculpt_params->getSculptTexture(), 0);
+ volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType());
}
else
{
@@ -1628,13 +1653,16 @@ void LLPanelObject::sendPosition()
void LLPanelObject::sendSculpt()
{
- LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(this,"sculpt texture control");
- if(!mTextureCtrl)
+ if (mObject.isNull())
return;
-
+
LLSculptParams sculpt_params;
- sculpt_params.setSculptTexture(mTextureCtrl->getImageAssetID());
- sculpt_params.setSculptType(LL_SCULPT_TYPE_SPHERE);
+
+ if (mCtrlSculptTexture)
+ sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
+
+ if (mCtrlSculptType)
+ sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex());
mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
}
@@ -1843,7 +1871,9 @@ void LLPanelObject::onSelectSculpt(LLUICtrl* ctrl, void* userdata)
LLTextureCtrl* mTextureCtrl = gUICtrlFactory->getTexturePickerByName(self, "sculpt texture control");
if (mTextureCtrl)
+ {
self->mSculptTextureRevert = mTextureCtrl->getImageAssetID();
+ }
self->sendSculpt();
}
@@ -1870,7 +1900,6 @@ BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdat
mTextureCtrl->setImageAssetID(asset);
self->mSculptTextureRevert = asset;
}
-
return TRUE;
}
@@ -1889,3 +1918,11 @@ void LLPanelObject::onCancelSculpt(LLUICtrl* ctrl, void* userdata)
self->sendSculpt();
}
+
+// static
+void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata)
+{
+ LLPanelObject* self = (LLPanelObject*) userdata;
+
+ self->sendSculpt();
+}
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index 8c1bea0108..0aab79515b 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -57,7 +57,9 @@ public:
static void onCommitSculpt( LLUICtrl* ctrl, void* userdata);
static void onCancelSculpt( LLUICtrl* ctrl, void* userdata);
static void onSelectSculpt( LLUICtrl* ctrl, void* userdata);
- static BOOL onDropSculpt(LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+ static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
+ static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
+
protected:
void getState();
@@ -143,6 +145,8 @@ protected:
LLCheckBoxCtrl *mCheckCastShadows;
LLTextureCtrl *mCtrlSculptTexture;
+ LLTextBox *mLabelSculptType;
+ LLComboBox *mCtrlSculptType;
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
BOOL mIsPhysical; // to avoid sending "physical" when not changed
@@ -152,6 +156,7 @@ protected:
S32 mSelectedType; // So we know what selected type we last were
LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel
+ U8 mSculptTypeRevert; // so we can revert the sculpt type on cancel
LLPointer<LLViewerObject> mObject;
LLPointer<LLViewerObject> mRootObject;
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index c1885ad898..e52710ca75 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -280,12 +280,18 @@ bool LLPreview::save( const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemp
}
// static
-void LLPreview::hide(const LLUUID& item_uuid)
+void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ )
{
preview_map_t::iterator found_it = LLPreview::sInstances.find(item_uuid);
if(found_it != LLPreview::sInstances.end())
{
LLPreview* instance = found_it->second;
+
+ if ( no_saving )
+ {
+ instance->mForceClose = TRUE;
+ }
+
instance->close();
}
}
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 589e1fde21..449093ee91 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -61,7 +61,7 @@ public:
static LLPreview* find(const LLUUID& item_uuid);
static LLPreview* show(const LLUUID& item_uuid, BOOL take_focus = TRUE );
- static void hide(const LLUUID& item_uuid);
+ static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
static void rename(const LLUUID& item_uuid, const std::string& new_name);
static bool save(const LLUUID& item_uuid, LLPointer<LLInventoryItem>* itemptr);
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index c556e3f450..0e0ade17a2 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -246,7 +246,8 @@ BOOL LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
// virtual
BOOL LLPreviewGesture::canClose()
{
- if(!mDirty)
+
+ if(!mDirty || mForceClose)
{
return TRUE;
}
@@ -864,7 +865,7 @@ void LLPreviewGesture::loadAsset()
void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* item_idp = (LLUUID*)user_data;
LLPreview* preview = LLPreview::find(*item_idp);
@@ -1160,7 +1161,7 @@ void LLPreviewGesture::saveIfNeeded()
// TODO: This is very similar to LLPreviewNotecard::onSaveComplete.
// Could merge code.
// static
-void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLSaveInfo* info = (LLSaveInfo*)user_data;
if (info && (status == 0))
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index 77d7477d91..2a122c202c 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -67,7 +67,7 @@ protected:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void loadUIFromGesture(LLMultiGesture* gesture);
@@ -75,7 +75,7 @@ protected:
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
static void handleSaveChangesDialog(S32 option, void* userdata);
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 8650bcf459..c7d1addf42 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -329,7 +329,7 @@ void LLPreviewNotecard::loadAsset()
void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLPreviewNotecard::onLoadComplete()" << llendl;
LLUUID* item_id = (LLUUID*)user_data;
@@ -517,7 +517,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
}
// static
-void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data;
if(info && (0 == status))
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 88ce8b36ce..b92dd93550 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -69,13 +69,13 @@ protected:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
static void onClickSave(void* data);
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
- S32 status);
+ S32 status, LLExtStat ext_status);
static void handleSaveChangesDialog(S32 option, void* userdata);
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 0c11226710..57a6069aff 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -271,6 +271,7 @@ LLScriptEdCore::LLScriptEdCore(
const LLViewHandle& floater_handle,
void (*load_callback)(void*),
void (*save_callback)(void*, BOOL),
+ void (*search_replace_callback) (void* userdata),
void* userdata,
S32 bottom_pad)
:
@@ -280,6 +281,7 @@ LLScriptEdCore::LLScriptEdCore(
mEditor( NULL ),
mLoadCallback( load_callback ),
mSaveCallback( save_callback ),
+ mSearchReplaceCallback( search_replace_callback ),
mUserdata( userdata ),
mForceClose( FALSE ),
mLastHelpToken(NULL),
@@ -1008,7 +1010,9 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
{
if(getVisible() && getEnabled())
{
- if(('S' == key) && (MASK_CONTROL == (mask & MASK_CONTROL)))
+ bool just_control = MASK_CONTROL == (mask & MASK_MODIFIERS);
+
+ if(('S' == key) && just_control)
{
if(mSaveCallback)
{
@@ -1018,6 +1022,16 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
return TRUE;
}
+
+ if(('F' == key) && just_control)
+ {
+ if(mSearchReplaceCallback)
+ {
+ mSearchReplaceCallback(mUserdata);
+ }
+
+ return TRUE;
+ }
}
return FALSE;
}
@@ -1051,6 +1065,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
self->mViewHandle,
LLPreviewLSL::onLoad,
LLPreviewLSL::onSave,
+ LLPreviewLSL::onSearchReplace,
self,
0);
@@ -1200,6 +1215,13 @@ void LLPreviewLSL::open() /*Flawfinder: ignore*/
LLFloater::open(); /*Flawfinder: ignore*/
}
+void LLPreviewLSL::onSearchReplace(void* userdata)
+{
+ LLPreviewLSL* self = (LLPreviewLSL*)userdata;
+ LLScriptEdCore* sec = self->mScriptEd;
+ LLFloaterScriptSearch::show(sec);
+}
+
// static
void LLPreviewLSL::onLoad(void* userdata)
{
@@ -1366,7 +1388,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename,
// static
-void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLScriptSaveInfo* info = reinterpret_cast<LLScriptSaveInfo*>(user_data);
if(0 == status)
@@ -1415,7 +1437,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
}
// static
-void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLUUID* instance_uuid = (LLUUID*)user_data;
LLPreviewLSL* self = NULL;
@@ -1454,7 +1476,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
// static
void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
lldebugs << "LLPreviewLSL::onLoadComplete: got uuid " << asset_uuid
<< llendl;
@@ -1559,6 +1581,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
self->mViewHandle,
&LLLiveLSLEditor::onLoad,
&LLLiveLSLEditor::onSave,
+ &LLLiveLSLEditor::onSearchReplace,
self,
0);
@@ -1773,7 +1796,7 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
// static
void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
lldebugs << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id
<< llendl;
@@ -1956,6 +1979,15 @@ void LLLiveLSLEditor::draw()
}
}
+
+void LLLiveLSLEditor::onSearchReplace(void* userdata)
+{
+ LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
+
+ LLScriptEdCore* sec = self->mScriptEd;
+ LLFloaterScriptSearch::show(sec);
+}
+
struct LLLiveLSLSaveData
{
LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active);
@@ -2169,7 +2201,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename,
runningCheckbox->setEnabled(TRUE);
}
-void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
@@ -2199,7 +2231,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
}
-void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status) // StoreAssetData callback (fixed)
+void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data;
if(!data)
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 54b27316f7..444bb629e6 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -47,6 +47,7 @@ public:
const LLViewHandle& floater_handle,
void (*load_callback)(void* userdata),
void (*save_callback)(void* userdata, BOOL close_after_save),
+ void (*search_replace_callback)(void* userdata),
void* userdata,
S32 bottom_pad = 0); // pad below bottom row of buttons
~LLScriptEdCore();
@@ -110,6 +111,7 @@ private:
LLTextEditor* mEditor;
void (*mLoadCallback)(void* userdata);
void (*mSaveCallback)(void* userdata, BOOL close_after_save);
+ void (*mSearchReplaceCallback) (void* userdata);
void* mUserdata;
LLComboBox *mFunctions;
BOOL mForceClose;
@@ -149,14 +151,15 @@ protected:
const LLUUID& item_id,
const LLTransactionID& tid);
+ static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
static void onSave(void* userdata, BOOL close_after_save);
static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
- static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status);
- static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
static LLPreviewLSL* getInstance(const LLUUID& uuid);
static void* createScriptEdPanel(void* userdata);
@@ -209,14 +212,15 @@ protected:
const LLTransactionID& tid,
BOOL is_running);
+ static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
static void onSave(void* userdata, BOOL close_after_save);
static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
- static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
- static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
+ static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
static void onRunningCheckboxClicked(LLUICtrl*, void* userdata);
static void onReset(void* userdata);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 039124c6fd..42eed7316b 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -51,7 +51,7 @@ void sg_assert(BOOL expr)
#endif
}
-#if !LL_RELEASE_FOR_DOWNLOAD
+#if LL_DEBUG
void validate_drawable(LLDrawable* drawablep)
{
F64 rad = drawablep->getBinRadius();
@@ -133,10 +133,6 @@ LLSpatialGroup::~LLSpatialGroup()
void LLSpatialGroup::clearDrawMap()
{
- for (LLSpatialGroup::draw_map_t::iterator i = mDrawMap.begin(); i != mDrawMap.end(); ++i)
- {
- std::for_each(i->second.begin(), i->second.end(), DeletePointer());
- }
mDrawMap.clear();
}
@@ -2303,7 +2299,7 @@ void pushVerts(LLSpatialGroup* group, U32 mask)
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j)
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
params = *j;
pushVerts(params, mask);
@@ -2331,7 +2327,7 @@ void pushVertsColorCoded(LLSpatialGroup* group, U32 mask)
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j)
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
params = *j;
glColor4f(colors[col].mV[0], colors[col].mV[1], colors[col].mV[2], 0.5f);
@@ -2682,8 +2678,8 @@ public:
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- std::vector<LLDrawInfo*>& draw_vec = i->second;
- for (std::vector<LLDrawInfo*>::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
+ LLSpatialGroup::drawmap_elem_t& draw_vec = i->second;
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = draw_vec.begin(); j != draw_vec.end(); ++j)
{
LLDrawInfo* draw_info = *j;
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_ANIM))
@@ -2869,6 +2865,11 @@ LLDrawInfo::LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
{
}
+LLDrawInfo::~LLDrawInfo()
+{
+
+}
+
LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage)
{
return new LLVertexBuffer(type_mask, usage);
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index a2f24005df..9561dca0bb 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -26,13 +26,17 @@
class LLSpatialPartition;
class LLSpatialBridge;
-class LLDrawInfo
+class LLDrawInfo : public LLRefCount
{
+protected:
+ ~LLDrawInfo();
+
public:
LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
LLViewerImage* image, LLVertexBuffer* buffer,
BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0);
+
LLPointer<LLVertexBuffer> mVertexBuffer;
LLPointer<LLViewerImage> mTexture;
LLPointer<LLCubeMap> mReflectionMap;
@@ -58,18 +62,21 @@ public:
struct CompareTexturePtr
{
- bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs)
+ bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs)
{
-
- return lhs == NULL || rhs == NULL || lhs->mTexture > rhs->mTexture;
+ // sort by pointer, sort NULL down to the end
+ return lhs.get() != rhs.get()
+ && (lhs.isNull() || (rhs.notNull() && lhs->mTexture.get() > rhs->mTexture.get()));
}
};
struct CompareBump
{
- bool operator()(const LLDrawInfo* const& lhs, const LLDrawInfo* const& rhs)
+ bool operator()(const LLPointer<LLDrawInfo>& lhs, const LLPointer<LLDrawInfo>& rhs)
{
- return lhs == NULL || rhs == NULL || lhs->mBump > rhs->mBump;
+ // sort by mBump value, sort NULL down to the end
+ return lhs.get() != rhs.get()
+ && (lhs.isNull() || (rhs.notNull() && lhs->mBump > rhs->mBump));
}
};
};
@@ -82,7 +89,8 @@ public:
typedef std::vector<LLPointer<LLSpatialGroup> > sg_vector_t;
typedef std::set<LLPointer<LLSpatialGroup> > sg_set_t;
typedef std::vector<LLPointer<LLSpatialBridge> > bridge_list_t;
- typedef std::map<U32, std::vector<LLDrawInfo*> > draw_map_t;
+ typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t;
+ typedef std::map<U32, drawmap_elem_t > draw_map_t;
typedef std::map<LLPointer<LLViewerImage>, LLPointer<LLVertexBuffer> > buffer_map_t;
typedef LLOctreeListener<LLDrawable> BaseType;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 74d8aa8e9a..8aa442818e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -196,6 +196,9 @@ LLString gInitialOutfitGender; // "male" or "female"
static bool gUseCircuitCallbackCalled = false;
+S32 LLStartUp::gStartupState = STATE_FIRST;
+
+
//
// local function declaration
//
@@ -336,7 +339,7 @@ BOOL idle_startup()
gImageList.updateImages(0.01f);
}
- if (STATE_FIRST == gStartupState)
+ if ( STATE_FIRST == LLStartUp::getStartupState() )
{
gViewerWindow->showCursor();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT);
@@ -585,67 +588,49 @@ BOOL idle_startup()
llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl;
}
- // Get ready to show the login dialog
- if (!gConnectToSomething)
+ //
+ // Log on to system
+ //
+ if( !gCmdLineFirstName.empty()
+ && !gCmdLineLastName.empty()
+ && !gCmdLinePassword.empty())
{
- // Don't use a session token, and generate a random user id
- gAgentID.generate();
- gAgentSessionID = LLUUID::null;
+ firstname = gCmdLineFirstName;
+ lastname = gCmdLineLastName;
- gStartupState = STATE_WORLD_INIT;
- return do_normal_idle;
+ LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
+ char md5pass[33]; /* Flawfinder: ignore */
+ pass.hex_digest(md5pass);
+ password = md5pass;
+
+ remember_password = gSavedSettings.getBOOL("RememberPassword");
+ show_connect_box = FALSE;
}
- else if (!gRunLocal)
+ else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
{
- //
- // Log on to userserver
- //
- if( !gCmdLineFirstName.empty()
- && !gCmdLineLastName.empty()
- && !gCmdLinePassword.empty())
- {
- firstname = gCmdLineFirstName;
- lastname = gCmdLineLastName;
-
- LLMD5 pass((unsigned char*)gCmdLinePassword.c_str());
- char md5pass[33]; /* Flawfinder: ignore */
- pass.hex_digest(md5pass);
- password = md5pass;
-
- remember_password = gSavedSettings.getBOOL("RememberPassword");
- show_connect_box = FALSE;
- }
- else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin"))
- {
- firstname = gSavedSettings.getString("FirstName");
- lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
- remember_password = TRUE;
- show_connect_box = FALSE;
- }
- else
- {
- // if not automatically logging in, display login dialog
- // until a valid userserver is selected
- firstname = gSavedSettings.getString("FirstName");
- lastname = gSavedSettings.getString("LastName");
- password = load_password_from_disk();
- remember_password = gSavedSettings.getBOOL("RememberPassword");
- show_connect_box = TRUE;
- }
-
- // Go to the next startup state
- gStartupState++;
- return do_normal_idle;
+ firstname = gSavedSettings.getString("FirstName");
+ lastname = gSavedSettings.getString("LastName");
+ password = load_password_from_disk();
+ remember_password = TRUE;
+ show_connect_box = FALSE;
}
else
{
- gStartupState++;
- return do_normal_idle;
+ // if not automatically logging in, display login dialog
+ // until a valid userserver is selected
+ firstname = gSavedSettings.getString("FirstName");
+ lastname = gSavedSettings.getString("LastName");
+ password = load_password_from_disk();
+ remember_password = gSavedSettings.getBOOL("RememberPassword");
+ show_connect_box = TRUE;
}
+
+ // Go to the next startup state
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
+ return do_normal_idle;
}
- if (STATE_LOGIN_SHOW == gStartupState)
+ if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
llinfos << "Initializing Window" << llendl;
@@ -655,45 +640,37 @@ BOOL idle_startup()
timeout_count = 0;
- if (gConnectToSomething && !gRunLocal)
+ if (show_connect_box)
{
- if (show_connect_box)
+ if (gNoRender)
{
- if (gNoRender)
- {
- llerrs << "Need to autologin or use command line with norender!" << llendl;
- }
- // Make sure the process dialog doesn't hide things
- gViewerWindow->setShowProgress(FALSE);
+ llerrs << "Need to autologin or use command line with norender!" << llendl;
+ }
+ // Make sure the process dialog doesn't hide things
+ gViewerWindow->setShowProgress(FALSE);
- // Show the login dialog
- login_show();
+ // Show the login dialog
+ login_show();
- // connect dialog is already shown, so fill in the names
- LLPanelLogin::setFields( firstname, lastname, password, remember_password );
- LLPanelLogin::giveFocus();
+ // connect dialog is already shown, so fill in the names
+ LLPanelLogin::setFields( firstname, lastname, password, remember_password );
+ LLPanelLogin::giveFocus();
- gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
+ gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
- gStartupState++;
- }
- else
- {
- // skip directly to message template verification
- gStartupState = STATE_LOGIN_CLEANUP;
- }
+ LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
}
else
{
- gMessageSystem->setCircuitProtection(FALSE);
- gStartupState = STATE_LOGIN_CLEANUP;
+ // skip directly to message template verification
+ LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
timeout.reset();
return do_normal_idle;
}
- if (STATE_LOGIN_WAIT == gStartupState)
+ if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
{
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
@@ -703,7 +680,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_LOGIN_CLEANUP == gStartupState)
+ if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
{
if (show_connect_box)
{
@@ -771,7 +748,7 @@ BOOL idle_startup()
{
LLString server_label;
S32 domain_name_index;
- LLPanelLogin::getServer( server_label, domain_name_index );
+ BOOL user_picked_server = LLPanelLogin::getServer( server_label, domain_name_index );
gUserServerChoice = (EUserServerDomain) domain_name_index;
gSavedSettings.setS32("ServerChoice", gUserServerChoice);
if (gUserServerChoice == USERSERVER_OTHER)
@@ -779,14 +756,11 @@ BOOL idle_startup()
snprintf(gUserServerName, MAX_STRING, "%s", server_label.c_str()); /* Flawfinder: ignore */
}
- // Dave S temp reversion of SL-49082 fix - this code breaks command line urls. I'll fix this with
- // the control isDirty() functionality tomorrow.
-
- //if ( userPickedServer )
- //{ // User picked a grid from the popup, so clear the stored urls so they will be re-generated from gUserServerChoice
- // auth_uris.clear();
- // resetURIs();
- //}
+ if ( user_picked_server )
+ { // User picked a grid from the popup, so clear the stored urls and they will be re-generated from gUserServerChoice
+ auth_uris.clear();
+ resetURIs();
+ }
LLString location;
LLPanelLogin::getLocation( location );
@@ -849,18 +823,18 @@ BOOL idle_startup()
init_colors();
// skipping over STATE_UPDATE_CHECK because that just waits for input
- gStartupState = STATE_LOGIN_AUTH_INIT;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTH_INIT );
return do_normal_idle;
}
- if (STATE_UPDATE_CHECK == gStartupState)
+ if (STATE_UPDATE_CHECK == LLStartUp::getStartupState())
{
// wait for user to give input via dialog box
return do_normal_idle;
}
- if(STATE_LOGIN_AUTH_INIT == gStartupState)
+ if(STATE_LOGIN_AUTH_INIT == LLStartUp::getStartupState())
{
//#define LL_MINIMIAL_REQUESTED_OPTIONS
lldebugs << "STATE_LOGIN_AUTH_INIT" << llendl;
@@ -907,10 +881,10 @@ BOOL idle_startup()
auth_desc = "Logging in. ";
auth_desc += gSecondLife;
auth_desc += " may appear frozen. Please wait.";
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
}
- if (STATE_LOGIN_AUTHENTICATE == gStartupState)
+ if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl;
set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
@@ -962,11 +936,11 @@ BOOL idle_startup()
// reset globals
gAcceptTOS = FALSE;
gAcceptCriticalMessage = FALSE;
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_NO_DATA_YET );
return do_normal_idle;
}
- if(STATE_LOGIN_NO_DATA_YET == gStartupState)
+ if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
{
//lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl;
if (!gUserAuthp)
@@ -985,13 +959,13 @@ BOOL idle_startup()
//llinfos << "waiting..." << llendl;
return do_normal_idle;
}
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
progress += 0.01f;
set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
return do_normal_idle;
}
- if(STATE_LOGIN_DOWNLOADING == gStartupState)
+ if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl;
if (!gUserAuthp)
@@ -1010,13 +984,13 @@ BOOL idle_startup()
//llinfos << "downloading..." << llendl;
return do_normal_idle;
}
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
progress += 0.01f;
set_startup_status(progress, "Processing Response...", auth_message.c_str());
return do_normal_idle;
}
- if(STATE_LOGIN_PROCESS_RESPONSE == gStartupState)
+ if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
{
lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl;
std::ostringstream emsg;
@@ -1055,7 +1029,7 @@ BOOL idle_startup()
}
// ignoring the duration & options array for now.
// Go back to authenticate.
- gStartupState = STATE_LOGIN_AUTHENTICATE;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
return do_normal_idle;
}
else
@@ -1078,7 +1052,7 @@ BOOL idle_startup()
if (show_connect_box)
{
llinfos << "Need tos agreement" << llendl;
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
message_response);
tos_dialog->startModal();
@@ -1095,7 +1069,7 @@ BOOL idle_startup()
if (show_connect_box)
{
llinfos << "Need critical message" << llendl;
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
message_response);
tos_dialog->startModal();
@@ -1119,7 +1093,7 @@ BOOL idle_startup()
if (show_connect_box)
{
update_app(TRUE, auth_message);
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
return FALSE;
}
else
@@ -1134,7 +1108,7 @@ BOOL idle_startup()
if (show_connect_box)
{
update_app(FALSE, auth_message);
- gStartupState = STATE_UPDATE_CHECK;
+ LLStartUp::setStartupState( STATE_UPDATE_CHECK );
gSkipOptionalUpdate = TRUE;
return FALSE;
}
@@ -1157,7 +1131,7 @@ BOOL idle_startup()
s << "Previous login attempt failed. Logging in, attempt "
<< (auth_uri_num + 1) << ". ";
auth_desc = s.str();
- gStartupState = STATE_LOGIN_AUTHENTICATE;
+ LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE );
auth_uri_num++;
return do_normal_idle;
}
@@ -1387,7 +1361,7 @@ BOOL idle_startup()
&& first_sim.isOk()
&& gAgent.mInventoryRootID.notNull())
{
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
}
else
{
@@ -1431,7 +1405,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// World Init
//---------------------------------------------------------------------
- if (STATE_WORLD_INIT == gStartupState)
+ if (STATE_WORLD_INIT == LLStartUp::getStartupState())
{
set_startup_status(0.40f, "Initializing World...", gAgent.mMOTD.c_str());
display_startup();
@@ -1474,38 +1448,26 @@ BOOL idle_startup()
// User might have overridden far clip
gWorldp->setLandFarClip( gAgent.mDrawDistance );
- if (!gRunLocal)
- {
- // Before we create the first region, we need to set the agent's mOriginGlobal
- // This is necessary because creating objects before this is set will result in a
- // bad mPositionAgent cache.
+ // Before we create the first region, we need to set the agent's mOriginGlobal
+ // This is necessary because creating objects before this is set will result in a
+ // bad mPositionAgent cache.
- gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
+ gAgent.initOriginGlobal(from_region_handle(first_sim_handle));
- gWorldp->addRegion(first_sim_handle, first_sim);
+ gWorldp->addRegion(first_sim_handle, first_sim);
- LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
- llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
-
- gStartupState = STATE_SEED_GRANTED_WAIT;
- regionp->setSeedCapability(first_sim_seed_cap);
-
- // Set agent's initial region to be the one we just created.
- gAgent.setRegion(regionp);
+ LLViewerRegion *regionp = gWorldp->getRegionFromHandle(first_sim_handle);
+ llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
+
+ LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
+ regionp->setSeedCapability(first_sim_seed_cap);
+
+ // Set agent's initial region to be the one we just created.
+ gAgent.setRegion(regionp);
- // Set agent's initial position, which will be read by LLVOAvatar when the avatar
- // object is created. I think this must be done after setting the region. JC
- gAgent.setPositionAgent(agent_start_position_region);
- }
- else
- {
- // With one simulator, assume region is at 0,0, hence has regionHandle 0
- // VEFFECT: Login
- gWorldp->addRegion(0, gAgentSimHost);
- gAgent.setRegion(gWorldp->getRegionFromHandle(0));
-
- gStartupState = STATE_SEED_CAP_GRANTED;
- }
+ // Set agent's initial position, which will be read by LLVOAvatar when the avatar
+ // object is created. I think this must be done after setting the region. JC
+ gAgent.setPositionAgent(agent_start_position_region);
display_startup();
return do_normal_idle;
@@ -1515,7 +1477,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Wait for Seed Cap Grant
//---------------------------------------------------------------------
- if(STATE_SEED_GRANTED_WAIT == gStartupState)
+ if(STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
llinfos << "Waiting for seed grant ...." << llendl;
return do_normal_idle;
@@ -1526,7 +1488,7 @@ BOOL idle_startup()
// Seed Capability Granted
// no newMessage calls should happen before this point
//---------------------------------------------------------------------
- if (STATE_SEED_CAP_GRANTED == gStartupState)
+ if (STATE_SEED_CAP_GRANTED == LLStartUp::getStartupState())
{
update_texture_fetch();
@@ -1659,42 +1621,35 @@ BOOL idle_startup()
// For all images pre-loaded into viewer cache, decode them.
// Need to do this AFTER we init the sky
gImageList.decodeAllImages(2.f);
- gStartupState++;
+ LLStartUp::setStartupState( STATE_QUICKTIME_INIT );
// JC - Do this as late as possible to increase likelihood Purify
// will run.
- if (!gRunLocal)
+ LLMessageSystem* msg = gMessageSystem;
+ if (!msg->mOurCircuitCode)
{
- LLMessageSystem* msg = gMessageSystem;
- if (!msg->mOurCircuitCode)
- {
- llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
- }
-
- gUseCircuitCallbackCalled = FALSE;
-
- msg->enableCircuit(first_sim, TRUE);
- // now, use the circuit info to tell simulator about us!
- llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
- msg->newMessageFast(_PREHASH_UseCircuitCode);
- msg->nextBlockFast(_PREHASH_CircuitCode);
- msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
- msg->sendReliable(
- first_sim,
- MAX_TIMEOUT_COUNT,
- FALSE,
- TIMEOUT_SECONDS,
- use_circuit_callback,
- NULL);
+ llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
}
+ gUseCircuitCallbackCalled = FALSE;
+
+ msg->enableCircuit(first_sim, TRUE);
+ // now, use the circuit info to tell simulator about us!
+ llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
+ msg->newMessageFast(_PREHASH_UseCircuitCode);
+ msg->nextBlockFast(_PREHASH_CircuitCode);
+ msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addUUIDFast(_PREHASH_ID, gAgent.getID());
+ msg->sendReliable(
+ first_sim,
+ MAX_TIMEOUT_COUNT,
+ FALSE,
+ TIMEOUT_SECONDS,
+ use_circuit_callback,
+ NULL);
+
timeout.reset();
- if (!gConnectToSomething)
- {
- gStartupState = STATE_MISC;
- }
return do_normal_idle;
}
@@ -1702,7 +1657,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// LLMediaEngine Init
//---------------------------------------------------------------------
- if (STATE_QUICKTIME_INIT == gStartupState)
+ if (STATE_QUICKTIME_INIT == LLStartUp::getStartupState())
{
if (gViewerWindow)
{
@@ -1737,20 +1692,20 @@ BOOL idle_startup()
}
#endif
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_WAIT );
return do_normal_idle;
}
//---------------------------------------------------------------------
// Agent Send
//---------------------------------------------------------------------
- if(STATE_WORLD_WAIT == gStartupState)
+ if(STATE_WORLD_WAIT == LLStartUp::getStartupState())
{
//llinfos << "Waiting for simulator ack...." << llendl;
set_startup_status(0.49f, "Waiting for region handshake...", gAgent.mMOTD.c_str());
if(gGotUseCircuitCodeAck)
{
- ++gStartupState;
+ LLStartUp::setStartupState( STATE_AGENT_SEND );
}
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
@@ -1763,7 +1718,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Agent Send
//---------------------------------------------------------------------
- if (STATE_AGENT_SEND == gStartupState)
+ if (STATE_AGENT_SEND == LLStartUp::getStartupState())
{
llinfos << "Connecting to region..." << llendl;
set_startup_status(0.50f, "Connecting to region...", gAgent.mMOTD.c_str());
@@ -1774,7 +1729,7 @@ BOOL idle_startup()
_PREHASH_AgentMovementComplete,
process_agent_movement_complete);
LLViewerRegion* regionp = gAgent.getRegion();
- if(!gRunLocal && regionp)
+ if(regionp)
{
send_complete_agent_movement(regionp->getHost());
gAssetStorage->setUpstream(regionp->getHost());
@@ -1782,10 +1737,6 @@ BOOL idle_startup()
msg->newMessageFast(_PREHASH_EconomyDataRequest);
gAgent.sendReliableMessage();
}
- else
- {
- gStartupState++;
- }
// Create login effect
// But not on first login, because you can't see your avatar then
@@ -1797,7 +1748,7 @@ BOOL idle_startup()
gHUDManager->sendEffects();
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT
timeout.reset();
return do_normal_idle;
@@ -1806,14 +1757,13 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Agent Wait
//---------------------------------------------------------------------
- if (STATE_AGENT_WAIT == gStartupState)
+ if (STATE_AGENT_WAIT == LLStartUp::getStartupState())
{
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
{
if (gAgentMovementCompleted)
{
- gStartupState++;
// Sometimes we have more than one message in the
// queue. break out of this loop and continue
// processing. If we don't, then this could skip one
@@ -1827,183 +1777,187 @@ BOOL idle_startup()
}
}
msg->processAcks();
+
+ if (gAgentMovementCompleted)
+ {
+ LLStartUp::setStartupState( STATE_INVENTORY_SEND );
+ }
+
return do_normal_idle;
}
//---------------------------------------------------------------------
// Inventory Send
//---------------------------------------------------------------------
- if (STATE_INVENTORY_SEND == gStartupState)
+ if (STATE_INVENTORY_SEND == LLStartUp::getStartupState())
{
if (!gUserAuthp)
{
llerrs << "No userauth in STATE_INVENTORY_SEND!" << llendl;
}
- if (gConnectToSomething && !gRunLocal)
+ // unpack thin inventory
+ LLUserAuth::options_t options;
+ options.clear();
+ //bool dump_buffer = false;
+
+ if(gUserAuthp->getOptions("inventory-lib-root", options)
+ && !options.empty())
{
- // unpack thin inventory
- LLUserAuth::options_t options;
- options.clear();
- //bool dump_buffer = false;
-
- if(gUserAuthp->getOptions("inventory-lib-root", options)
- && !options.empty())
+ // should only be one
+ LLUserAuth::response_t::iterator it;
+ it = options[0].find("folder_id");
+ if(it != options[0].end())
{
- // should only be one
- LLUserAuth::response_t::iterator it;
- it = options[0].find("folder_id");
- if(it != options[0].end())
- {
- gInventoryLibraryRoot.set((*it).second.c_str());
- }
+ gInventoryLibraryRoot.set((*it).second.c_str());
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-lib-owner", options)
- && !options.empty())
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-lib-owner", options)
+ && !options.empty())
+ {
+ // should only be one
+ LLUserAuth::response_t::iterator it;
+ it = options[0].find("agent_id");
+ if(it != options[0].end())
{
- // should only be one
- LLUserAuth::response_t::iterator it;
- it = options[0].find("agent_id");
- if(it != options[0].end())
- {
- gInventoryLibraryOwner.set((*it).second.c_str());
- }
+ gInventoryLibraryOwner.set((*it).second.c_str());
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-skel-lib", options)
- && gInventoryLibraryOwner.notNull())
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-skel-lib", options)
+ && gInventoryLibraryOwner.notNull())
+ {
+ if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
{
- if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
- {
- llwarns << "Problem loading inventory-skel-lib" << llendl;
- }
+ llwarns << "Problem loading inventory-skel-lib" << llendl;
}
- options.clear();
- if(gUserAuthp->getOptions("inventory-skeleton", options))
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("inventory-skeleton", options))
+ {
+ if(!gInventory.loadSkeleton(options, gAgent.getID()))
{
- if(!gInventory.loadSkeleton(options, gAgent.getID()))
- {
- llwarns << "Problem loading inventory-skel-targets"
- << llendl;
- }
+ llwarns << "Problem loading inventory-skel-targets"
+ << llendl;
}
-
- options.clear();
- if(gUserAuthp->getOptions("buddy-list", options))
- {
- LLUserAuth::options_t::iterator it = options.begin();
- LLUserAuth::options_t::iterator end = options.end();
- LLAvatarTracker::buddy_map_t list;
- LLUUID agent_id;
- S32 has_rights = 0, given_rights = 0;
- for (; it != end; ++it)
+ }
+
+ options.clear();
+ if(gUserAuthp->getOptions("buddy-list", options))
+ {
+ LLUserAuth::options_t::iterator it = options.begin();
+ LLUserAuth::options_t::iterator end = options.end();
+ LLAvatarTracker::buddy_map_t list;
+ LLUUID agent_id;
+ S32 has_rights = 0, given_rights = 0;
+ for (; it != end; ++it)
+ {
+ LLUserAuth::response_t::const_iterator option_it;
+ option_it = (*it).find("buddy_id");
+ if(option_it != (*it).end())
{
- LLUserAuth::response_t::const_iterator option_it;
- option_it = (*it).find("buddy_id");
- if(option_it != (*it).end())
- {
- agent_id.set((*option_it).second.c_str());
- }
- option_it = (*it).find("buddy_rights_has");
- if(option_it != (*it).end())
- {
- has_rights = atoi((*option_it).second.c_str());
- }
- option_it = (*it).find("buddy_rights_given");
- if(option_it != (*it).end())
- {
- given_rights = atoi((*option_it).second.c_str());
- }
- list[agent_id] = new LLRelationship(given_rights, has_rights, false);
+ agent_id.set((*option_it).second.c_str());
}
- LLAvatarTracker::instance().addBuddyList(list);
- }
-
- options.clear();
- if(gUserAuthp->getOptions("ui-config", options))
- {
- LLUserAuth::options_t::iterator it = options.begin();
- LLUserAuth::options_t::iterator end = options.end();
- for (; it != end; ++it)
+ option_it = (*it).find("buddy_rights_has");
+ if(option_it != (*it).end())
{
- LLUserAuth::response_t::const_iterator option_it;
- option_it = (*it).find("allow_first_life");
- if(option_it != (*it).end())
- {
- if (option_it->second == "Y")
- {
- LLPanelAvatar::sAllowFirstLife = TRUE;
- }
- }
+ has_rights = atoi((*option_it).second.c_str());
}
- }
-
- options.clear();
- if(gUserAuthp->getOptions("event_categories", options))
- {
- LLEventInfo::loadCategories(options);
- }
- if(gUserAuthp->getOptions("event_notifications", options))
- {
- gEventNotifier.load(options);
+ option_it = (*it).find("buddy_rights_given");
+ if(option_it != (*it).end())
+ {
+ given_rights = atoi((*option_it).second.c_str());
+ }
+ list[agent_id] = new LLRelationship(given_rights, has_rights, false);
}
- options.clear();
- if(gUserAuthp->getOptions("classified_categories", options))
+ LLAvatarTracker::instance().addBuddyList(list);
+ }
+
+ options.clear();
+ if(gUserAuthp->getOptions("ui-config", options))
+ {
+ LLUserAuth::options_t::iterator it = options.begin();
+ LLUserAuth::options_t::iterator end = options.end();
+ for (; it != end; ++it)
{
- LLClassifiedInfo::loadCategories(options);
+ LLUserAuth::response_t::const_iterator option_it;
+ option_it = (*it).find("allow_first_life");
+ if(option_it != (*it).end())
+ {
+ if (option_it->second == "Y")
+ {
+ LLPanelAvatar::sAllowFirstLife = TRUE;
+ }
+ }
}
- gInventory.buildParentChildMap();
- gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
- gInventory.notifyObservers();
+ }
- // set up callbacks
- LLMessageSystem* msg = gMessageSystem;
- LLInventoryModel::registerCallbacks(msg);
- LLAvatarTracker::instance().registerCallbacks(msg);
- LLLandmark::registerCallbacks(msg);
-
- // request mute list
- gMuteListp->requestFromServer(gAgent.getID());
-
- // Get L$ and ownership credit information
- msg->newMessageFast(_PREHASH_MoneyBalanceRequest);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_MoneyData);
- msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
- gAgent.sendReliableMessage();
+ options.clear();
+ if(gUserAuthp->getOptions("event_categories", options))
+ {
+ LLEventInfo::loadCategories(options);
+ }
+ if(gUserAuthp->getOptions("event_notifications", options))
+ {
+ gEventNotifier.load(options);
+ }
+ options.clear();
+ if(gUserAuthp->getOptions("classified_categories", options))
+ {
+ LLClassifiedInfo::loadCategories(options);
+ }
+ gInventory.buildParentChildMap();
+ gInventory.addChangedMask(LLInventoryObserver::ALL, LLUUID::null);
+ gInventory.notifyObservers();
- // request all group information
- // *FIX: This will not do the right thing if the message
- // gets there before the requestuserserverconnection
- // circuit is completed.
- gAgent.sendAgentDataUpdateRequest();
+ // set up callbacks
+ LLMessageSystem* msg = gMessageSystem;
+ LLInventoryModel::registerCallbacks(msg);
+ LLAvatarTracker::instance().registerCallbacks(msg);
+ LLLandmark::registerCallbacks(msg);
+ // request mute list
+ gMuteListp->requestFromServer(gAgent.getID());
- // NOTE: removed as part of user-privacy
- // enhancements. this information should be available from
- // login. 2006-10-16 Phoenix.
- // get the users that have been granted modify powers
- //msg->newMessageFast(_PREHASH_RequestGrantedProxies);
- //msg->nextBlockFast(_PREHASH_AgentData);
- //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- //gAgent.sendReliableMessage();
+ // Get L$ and ownership credit information
+ msg->newMessageFast(_PREHASH_MoneyBalanceRequest);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_MoneyData);
+ msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null );
+ gAgent.sendReliableMessage();
- BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
+ // request all group information
+ // *FIX: This will not do the right thing if the message
+ // gets there before the requestuserserverconnection
+ // circuit is completed.
+ gAgent.sendAgentDataUpdateRequest();
- // Create the inventory views
- LLInventoryView::showAgentInventory();
- // Hide the inventory if it wasn't shown at exit
- if(!shown_at_exit)
- {
- LLInventoryView::toggleVisibility(NULL);
- }
+ // NOTE: removed as part of user-privacy
+ // enhancements. this information should be available from
+ // login. 2006-10-16 Phoenix.
+ // get the users that have been granted modify powers
+ //msg->newMessageFast(_PREHASH_RequestGrantedProxies);
+ //msg->nextBlockFast(_PREHASH_AgentData);
+ //msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ //msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ //gAgent.sendReliableMessage();
+
+ BOOL shown_at_exit = gSavedSettings.getBOOL("ShowInventory");
+
+ // Create the inventory views
+ LLInventoryView::showAgentInventory();
+
+ // Hide the inventory if it wasn't shown at exit
+ if(!shown_at_exit)
+ {
+ LLInventoryView::toggleVisibility(NULL);
}
- gStartupState++;
+
+ LLStartUp::setStartupState( STATE_MISC );
return do_normal_idle;
}
@@ -2011,14 +1965,8 @@ BOOL idle_startup()
//---------------------------------------------------------------------
// Misc
//---------------------------------------------------------------------
- if (STATE_MISC == gStartupState)
+ if (STATE_MISC == LLStartUp::getStartupState())
{
- // Create a few objects if we don't actually have a world
- if (!gConnectToSomething)
- {
- // could add them here
- }
-
// We have a region, and just did a big inventory download.
// We can estimate the user's connection speed, and set their
// max bandwidth accordingly. JC
@@ -2037,7 +1985,7 @@ BOOL idle_startup()
{
llinfos << "Fast network connection, increasing max bandwidth to "
<< FASTER_RATE_BPS/1024.f
- << " Kbps" << llendl;
+ << " kbps" << llendl;
gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f);
}
else if (rate_bps > FAST_RATE_BPS
@@ -2045,7 +1993,7 @@ BOOL idle_startup()
{
llinfos << "Fast network connection, increasing max bandwidth to "
<< FAST_RATE_BPS/1024.f
- << " Kbps" << llendl;
+ << " kbps" << llendl;
gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
}
}
@@ -2197,12 +2145,12 @@ BOOL idle_startup()
}
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_PRECACHE );
timeout.reset();
return do_normal_idle;
}
- if (STATE_PRECACHE == gStartupState)
+ if (STATE_PRECACHE == LLStartUp::getStartupState())
{
do_normal_idle = TRUE;
@@ -2211,7 +2159,7 @@ BOOL idle_startup()
if(((timeout_frac > 1.f) && gAgent.getAvatarObject())
|| (timeout_frac > 3.f))
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WEARABLES_WAIT );
}
else
{
@@ -2223,7 +2171,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_WEARABLES_WAIT == gStartupState)
+ if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState())
{
do_normal_idle = TRUE;
@@ -2234,13 +2182,13 @@ BOOL idle_startup()
if(gAgent.getWearablesLoaded() || !gAgent.isGenderChosen())
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_CLEANUP );
}
else if (wearables_time > MAX_WEARABLES_TIME)
{
gViewerWindow->alertXml("ClothingLoading");
gViewerStats->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
- gStartupState++;
+ LLStartUp::setStartupState( STATE_CLEANUP );
}
else
{
@@ -2252,7 +2200,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- if (STATE_CLEANUP == gStartupState)
+ if (STATE_CLEANUP == LLStartUp::getStartupState())
{
set_startup_status(1.0, "", NULL);
@@ -2324,7 +2272,7 @@ BOOL idle_startup()
gUserAuthp = NULL;
}
- gStartupState++;
+ LLStartUp::setStartupState( STATE_STARTED );
// Unmute audio if desired and setup volumes
audio_update_volume();
@@ -2338,7 +2286,7 @@ BOOL idle_startup()
return do_normal_idle;
}
- llwarns << "Reached end of idle_startup for state " << gStartupState << llendl;
+ llwarns << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << llendl;
return do_normal_idle;
}
@@ -2398,7 +2346,7 @@ void login_callback(S32 option, void *userdata)
if (CONNECT_OPTION == option)
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
return;
}
else if (QUIT_OPTION == option)
@@ -2665,7 +2613,7 @@ void update_dialog_callback(S32 option, void *userdata)
#if !LL_RELEASE_FOR_DOWNLOAD
if (option == 2)
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
return;
}
#endif
@@ -2681,7 +2629,7 @@ void update_dialog_callback(S32 option, void *userdata)
}
else
{
- gStartupState++;
+ LLStartUp::setStartupState( STATE_WORLD_INIT );
}
return;
}
@@ -3066,7 +3014,7 @@ void init_stat_view()
stat_barp->mDisplayHistory = FALSE;
stat_barp = stat_viewp->addStat("Packet Loss", &(gViewerStats->mPacketsLostPercentStat));
- stat_barp->setUnitLabel(" %%");
+ stat_barp->setUnitLabel(" %");
stat_barp->mMinBar = 0.f;
stat_barp->mMaxBar = 5.f;
stat_barp->mTickSpacing = 1.f;
@@ -3086,16 +3034,6 @@ void init_stat_view()
stat_barp->mPerSec = FALSE;
stat_barp->mDisplayMean = FALSE;
- stat_barp = stat_viewp->addStat("Ping User", &(gViewerStats->mUserserverPingStat));
- stat_barp->setUnitLabel(" msec");
- stat_barp->mMinBar = 0.f;
- stat_barp->mMaxBar = 1000.f;
- stat_barp->mTickSpacing = 100.f;
- stat_barp->mLabelSpacing = 200.f;
- stat_barp->mDisplayBar = FALSE;
- stat_barp->mPerSec = FALSE;
- stat_barp->mDisplayMean = FALSE;
-
stat_viewp = new LLStatView("advanced stat view", "Advanced", "OpenDebugStatAdvanced", rect);
gDebugView->mStatViewp->addChildAtEnd(stat_viewp);
@@ -3717,17 +3655,31 @@ void release_start_screen()
gStartImageGL = NULL;
}
+// static
bool LLStartUp::canGoFullscreen()
{
- return gStartupState >= STATE_WORLD_INIT;
+ return LLStartUp::getStartupState() >= STATE_WORLD_INIT;
}
+
+// static
+void LLStartUp::setStartupState( S32 state )
+{
+ llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl;
+ gStartupState = state;
+}
+
+
void reset_login()
{
- gStartupState = STATE_LOGIN_SHOW;
+ LLStartUp::setStartupState( STATE_LOGIN_SHOW );
if ( gViewerWindow )
{ // Hide menus and normal buttons
gViewerWindow->setNormalControlsVisible( FALSE );
}
+
+ // Hide any other stuff
+ if ( gFloaterMap )
+ gFloaterMap->setVisible( FALSE );
}
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 4137c62a92..9e1ff3c151 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -22,38 +22,32 @@ extern const char* SCREEN_HOME_FILENAME;
extern const char* SCREEN_LAST_FILENAME;
enum EStartupState{
- STATE_FIRST,
- STATE_LOGIN_SHOW,
- STATE_LOGIN_WAIT,
- STATE_LOGIN_CLEANUP,
- STATE_UPDATE_CHECK,
- STATE_LOGIN_AUTH_INIT,
- STATE_LOGIN_AUTHENTICATE,
- STATE_LOGIN_NO_DATA_YET,
- STATE_LOGIN_DOWNLOADING,
- STATE_LOGIN_PROCESS_RESPONSE,
- STATE_WORLD_INIT,
- STATE_SEED_GRANTED_WAIT,
- STATE_SEED_CAP_GRANTED,
- STATE_QUICKTIME_INIT,
- STATE_WORLD_WAIT,
- STATE_AGENT_SEND,
- STATE_AGENT_WAIT,
- STATE_INVENTORY_SEND,
- STATE_MISC,
- STATE_PRECACHE,
- STATE_WEARABLES_WAIT,
- //STATE_INVENTORY_WAIT,
- //STATE_TOS_AGREEMENT_START,
- //STATE_TOS_AGREEMENT_WAIT,
- //STATE_CRITICAL_MESSAGE_START,
- //STATE_CRITICAL_MESSAGE_WAIT,
- STATE_CLEANUP,
- STATE_STARTED
+ STATE_FIRST, // Initial startup
+ STATE_LOGIN_SHOW, // Show login screen
+ STATE_LOGIN_WAIT, // Wait for user input at login screen
+ STATE_LOGIN_CLEANUP, // Get rid of login screen and start login
+ STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc)
+ STATE_LOGIN_AUTH_INIT, // Start login to SL servers
+ STATE_LOGIN_AUTHENTICATE, // Do authentication voodoo
+ STATE_LOGIN_NO_DATA_YET, // Waiting for authentication replies to start
+ STATE_LOGIN_DOWNLOADING, // Waiting for authentication replies to download
+ STATE_LOGIN_PROCESS_RESPONSE, // Check authentication reply
+ STATE_WORLD_INIT, // Start building the world
+ STATE_SEED_GRANTED_WAIT, // Wait for seed cap grant
+ STATE_SEED_CAP_GRANTED, // Have seed cap grant
+ STATE_QUICKTIME_INIT, // Initialzie QT
+ STATE_WORLD_WAIT, // Waiting for simulator
+ STATE_AGENT_SEND, // Connect to a region
+ STATE_AGENT_WAIT, // Wait for region
+ STATE_INVENTORY_SEND, // Do inventory transfer
+ STATE_MISC, // Do more things (set bandwidth, start audio, save location, etc)
+ STATE_PRECACHE, // Wait a bit for textures to download
+ STATE_WEARABLES_WAIT, // Wait for clothing to download
+ STATE_CLEANUP, // Final cleanup
+ STATE_STARTED // Up and running in-world
};
-// exorted symbol
-extern S32 gStartupState;
+// exported symbols
extern BOOL gAgentMovementCompleted;
extern bool gUseQuickTime;
extern bool gQuickTimeInitialized;
@@ -65,6 +59,13 @@ public:
static bool canGoFullscreen();
// returns true if we are far enough along in startup to allow
// going full screen
+
+ // Always use this to set gStartupState so changes are logged
+ static void setStartupState( S32 state );
+ static S32 getStartupState() { return gStartupState; };
+
+protected:
+ static S32 gStartupState; // Do not set directly, use LLStartup::setStartupState
};
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 3df559dee5..635f74d94f 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -137,7 +137,7 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
LLString text = childGetText("bandwidth_tooltip") + " ";
LLUIString bandwidth_tooltip = text; // get the text from XML until this widget is XML driven
mSGBandwidth->setLabel(bandwidth_tooltip.getString().c_str());
- mSGBandwidth->setUnits("Kbps");
+ mSGBandwidth->setUnits("kbps");
mSGBandwidth->setPrecision(0);
addChild(mSGBandwidth);
x -= SIM_STAT_WIDTH + 2;
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 178c83f61e..a0fd9f7d8e 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -462,7 +462,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
// static
-void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed)
+void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result, LLExtStat ext_status) // StoreAssetData callback (not fixed)
{
LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata;
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index d60d4eab6c..e4387b2f18 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -201,7 +201,7 @@ public:
void readBackAndUpload(U8* baked_bump_data);
static void onTextureUploadComplete( const LLUUID& uuid,
void* userdata,
- S32 result);
+ S32 result, LLExtStat ext_status);
static void dumpTotalByteCount();
private:
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 4ac08f2a81..e912a72093 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -109,7 +109,7 @@ public:
void setCanApplyImmediately(BOOL b);
void setDirty( BOOL b ) { mIsDirty = b; }
- BOOL isDirty() { return mIsDirty; }
+ BOOL isDirty() const { return mIsDirty; }
void setActive( BOOL active );
LLTextureCtrl* getOwner() const { return mOwner; }
@@ -888,7 +888,8 @@ LLTextureCtrl::LLTextureCtrl(
mNonImmediateFilterPermMask( PERM_NONE ),
mCanApplyImmediately( FALSE ),
mNeedsRawImageData( FALSE ),
- mValid( TRUE )
+ mValid( TRUE ),
+ mDirty( FALSE )
{
mCaption = new LLTextBox( label,
LLRect( 0, BTN_HEIGHT_SMALL, mRect.getWidth(), 0 ),
@@ -1050,6 +1051,18 @@ void LLTextureCtrl::setValid(BOOL valid )
}
}
+// virtual
+BOOL LLTextureCtrl::isDirty() const
+{
+ return mDirty;
+}
+
+// virtual
+void LLTextureCtrl::resetDirty()
+{
+ mDirty = FALSE;
+}
+
// virtual
void LLTextureCtrl::clear()
@@ -1166,6 +1179,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
if( floaterp && mEnabled)
{
+ mDirty = (op != TEXTURE_CANCEL);
if( floaterp->isDirty() )
{
setTentative( FALSE );
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index fa4e71d266..6b562e0492 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -67,6 +67,9 @@ public:
virtual void setVisible( BOOL visible );
virtual void setEnabled( BOOL enabled );
+ virtual BOOL isDirty() const;
+ virtual void resetDirty();
+
void setValid(BOOL valid);
// LLUICtrl interface
@@ -149,6 +152,7 @@ private:
BOOL mNeedsRawImageData;
LLViewBorder* mBorder;
BOOL mValid;
+ BOOL mDirty;
};
// XUI HACK: When floaters converted, switch this file to lltexturepicker.h/cpp
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 6a65942785..05355a707a 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -783,9 +783,10 @@ void LLToolGrab::onMouseCaptureLost()
LLVector3 grab_point_agent = mGrabObject->getRenderPosition();
LLCoordGL gl_point;
- gCamera->projectPosAgentToScreen(grab_point_agent, gl_point);
-
- LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY);
+ if (gCamera->projectPosAgentToScreen(grab_point_agent, gl_point))
+ {
+ LLUI::setCursorPositionScreen(gl_point.mX, gl_point.mY);
+ }
}
else
{
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index 49f21909a5..41679a0369 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -133,6 +133,8 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
avatarp->updateComposites();
avatarp->updateVisualParams();
avatarp->updateGeometry(avatarp->mDrawable);
+ avatarp->updateLOD();
+
LLDynamicTexture::preRender(clear_depth);
}
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 42ef25ac4e..4166cc16fe 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -87,15 +87,6 @@ void LLTracker::stopTracking(void* userdata)
// static virtual
void LLTracker::drawHUDArrow()
{
- /* tracking autopilot destination has been disabled
- -- 2004.01.09, Leviathan
- // Draw dot for autopilot target
- if (gAgent.getAutoPilot())
- {
- instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor );
- return;
- }
- */
switch (getTrackingStatus())
{
case TRACKING_AVATAR:
@@ -459,7 +450,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
if (dist > 0.99f * gCamera->getFar())
{
color_frac = 0.4f;
- // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(gCamera->getFar()/dist)*to_vec;
}
else
{
@@ -484,7 +474,6 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
- //glScalef(1.f, 1.f, 1000.f);
glColor4fv(fogged_color.mV);
const U32 BEACON_VERTS = 256;
const F32 step = 1024.0f/BEACON_VERTS;
@@ -534,24 +523,30 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
glEnd();
}
- //gCylinder.render(1000);
glPopMatrix();
- char text[1024]; /* Flawfinder: ignore */
- snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */
+ if (!gCamera || to_vec.magVec() > gCamera->getFar())
+ {
+ hud_textp->clearString();
+ }
+ else
+ {
+ char text[1024]; /* Flawfinder: ignore */
+ snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */
- LLWString wstr;
- wstr += utf8str_to_wstring(label);
- wstr += '\n';
- wstr += utf8str_to_wstring(text);
+ LLWString wstr;
+ wstr += utf8str_to_wstring(label);
+ wstr += '\n';
+ wstr += utf8str_to_wstring(text);
- hud_textp->setFont(LLFontGL::sSansSerif);
- hud_textp->setZCompare(FALSE);
- hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
+ hud_textp->setFont(LLFontGL::sSansSerif);
+ hud_textp->setZCompare(FALSE);
+ hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST))));
- hud_textp->setString(wstr);
- hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER);
- hud_textp->setPositionAgent(pos_agent);
+ hud_textp->setString(wstr);
+ hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER);
+ hud_textp->setPositionAgent(pos_agent);
+ }
}
@@ -623,6 +618,14 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color)
return;
}
+ LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal();
+ to_vec.mdV[2] = 0;
+
+ if (to_vec.magVec() > gCamera->getFar())
+ { //only draw arrow if lateral distance to object is less than view distance.
+ return;
+ }
+
// get position
LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global);
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 8ef77fa496..55918f4b61 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -68,7 +68,7 @@ void LLViewerAssetStorage::storeAssetData(
delete req;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_VFS_CORRUPT);
}
return;
}
@@ -97,7 +97,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "Probable corruption in VFS file, aborting store asset data" << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_VFS_CORRUPT);
}
return;
}
@@ -122,7 +122,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "AssetStorage: attempt to upload non-existent vfile " << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE);
+ callback(asset_id, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE);
}
}
}
@@ -131,7 +131,7 @@ void LLViewerAssetStorage::storeAssetData(
llwarns << "Attempt to move asset store request upstream w/o valid upstream provider" << llendl;
if (callback)
{
- callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE);
+ callback(asset_id, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@@ -200,7 +200,7 @@ void LLViewerAssetStorage::storeAssetData(
{
if (callback)
{
- callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE);
+ callback(asset_id, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE);
}
}
}
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index 7817e6450f..64c0a96795 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -17,8 +17,6 @@ class LLVFile;
class LLViewerAssetStorage : public LLAssetStorage
{
public:
- typedef void (*LLStoreAssetCallback)(const LLUUID &transaction_id, void *user_data, S32 status);
-
LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, const LLHost &upstream_host);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index fa2a12b34a..5bae78367e 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -15,6 +15,7 @@
#include "lldir.h"
#include "lldynamictexture.h"
#include "lldrawpoolalpha.h"
+#include "llfeaturemanager.h"
#include "llframestats.h"
#include "llgl.h"
#include "llglheaders.h"
@@ -197,7 +198,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
// Bail out if we're in the startup state and don't want to try to
// render the world.
//
- if (gStartupState < STATE_STARTED)
+ if (LLStartUp::getStartupState() < STATE_STARTED)
{
display_startup();
return;
@@ -295,12 +296,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
}
break;
- case LLAgent::TELEPORT_CANCELLING:
- gViewerWindow->setProgressCancelButtonVisible(FALSE, "Cancel");
- gViewerWindow->setProgressPercent( 100.f );
- gViewerWindow->setProgressString("Canceling...");
- break;
-
case LLAgent::TELEPORT_NONE:
// No teleport in progress
gViewerWindow->setShowProgress(FALSE);
@@ -410,7 +405,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
}
else
{
- LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery;
+ LLPipeline::sUseOcclusion = gSavedSettings.getBOOL("UseOcclusion") && gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion");
}
stop_glerror();
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index ad977a4c46..a9b2e57494 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -23,6 +23,9 @@
#include "llinventoryview.h"
+#include "llviewerregion.h"
+#include "llviewerobjectlist.h"
+
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
@@ -531,13 +534,27 @@ void inventory_reliable_callback(void**, S32 status)
}
}
*/
+LLInventoryCallbackManager *LLInventoryCallbackManager::sInstance = NULL;
+
LLInventoryCallbackManager::LLInventoryCallbackManager() :
mLastCallback(0)
{
+ if( sInstance != NULL )
+ {
+ llwarns << "LLInventoryCallbackManager::LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ return;
+ }
+ sInstance = this;
}
LLInventoryCallbackManager::~LLInventoryCallbackManager()
{
+ if( sInstance != this )
+ {
+ llwarns << "LLInventoryCallbackManager::~LLInventoryCallbackManager: unexpected multiple instances" << llendl;
+ return;
+ }
+ sInstance = NULL;
}
U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb)
@@ -681,29 +698,56 @@ void move_inventory_item(
gAgent.sendReliableMessage();
}
-void _copy_inventory_from_notecard_hdr(const LLUUID& object_id, const LLUUID& notecard_inv_id)
+class LLCopyInventoryFromNotecardResponder : public LLHTTPClient::Responder
{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_CopyInventoryFromNotecard);
- msg->nextBlock(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlock(_PREHASH_NotecardData);
- msg->addUUIDFast(_PREHASH_NotecardItemID, notecard_inv_id);
- msg->addUUIDFast(_PREHASH_ObjectID, object_id);
-}
+public:
+ //If we get back a normal response, handle it here
+ virtual void result(const LLSD& content)
+ {
+ // What do we do here?
+ llinfos << "CopyInventoryFromNotecard request successful." << llendl;
+ }
+
+ //If we get back an error (not found, etc...), handle it here
+ virtual void error(U32 status, const std::string& reason)
+ {
+ llinfos << "LLCopyInventoryFromNotecardResponder::error "
+ << status << ": " << reason << llendl;
+ }
+};
-void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src)
+void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
{
- LLMessageSystem* msg = gMessageSystem;
- /*
- * I was going to handle multiple inventory items here, but then I realized that
- * we are only handling one at a time. Perhaps you can only select one at a
- * time from the notecard?
- */
- _copy_inventory_from_notecard_hdr(object_id, notecard_inv_id);
- msg->nextBlockFast(_PREHASH_InventoryData);
- msg->addUUIDFast(_PREHASH_ItemID, src->getUUID());
- msg->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(src->getType()));
- gAgent.sendReliableMessage();
+ LLSD body;
+ LLViewerRegion* viewer_region = NULL;
+ if(object_id.notNull())
+ {
+ LLViewerObject* vo = gObjectList.findObject(object_id);
+ if(vo)
+ {
+ viewer_region = vo->getRegion();
+ }
+ }
+
+ // Fallback to the agents region if for some reason the
+ // object isn't found in the viewer.
+ if(!viewer_region)
+ {
+ viewer_region = gAgent.getRegion();
+ }
+
+ if(viewer_region)
+ {
+ std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
+ if (!url.empty())
+ {
+ body["notecard-id"] = notecard_inv_id;
+ body["object-id"] = object_id;
+ body["item-id"] = src->getUUID();
+ body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
+ body["callback-id"] = (LLSD::Integer)callback_id;
+
+ LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder());
+ }
+ }
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 84cdadaf9b..1a78008457 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -214,6 +214,9 @@ public:
private:
std::map<U32, LLPointer<LLInventoryCallback> > mMap;
U32 mLastCallback;
+ static LLInventoryCallbackManager *sInstance;
+public:
+ static bool is_instantiated() { return sInstance != NULL; }
};
extern LLInventoryCallbackManager gInventoryCallbacks;
@@ -249,7 +252,8 @@ void move_inventory_item(
void copy_inventory_from_notecard(const LLUUID& object_id,
const LLUUID& notecard_inv_id,
- const LLInventoryItem *src);
+ const LLInventoryItem *src,
+ U32 callback_id = 0);
#endif // LL_LLVIEWERINVENTORY_H
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index abcdb8cdbd..0fea0ffb30 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -20,6 +20,7 @@
#include "indra_constants.h"
#include "llassetstorage.h"
#include "llchat.h"
+#include "llfeaturemanager.h"
#include "llfocusmgr.h"
#include "llfontgl.h"
#include "llinstantmessage.h"
@@ -78,6 +79,7 @@
#include "llfloatergesture.h"
#include "llfloatergodtools.h"
#include "llfloatergroupinfo.h"
+#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterhtml.h"
#include "llfloaterhtmlhelp.h"
@@ -391,7 +393,7 @@ void toggle_debug_menus(void*);
void toggle_map( void* user_data );
void export_info_callback(LLAssetInfo *info, void **user_data, S32 result);
void export_data_callback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void **user_data, S32 result);
-void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result);
+void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status);
BOOL menu_check_build_tool( void* user_data );
void handle_reload_settings(void*);
void focus_here(void*);
@@ -1206,7 +1208,7 @@ void init_debug_rendering_menu(LLMenuGL* menu)
LLMenuItemCheckGL* item;
item = new LLMenuItemCheckGL("Object-Object Occlusion", menu_toggle_control, NULL, menu_check_control, (void*)"UseOcclusion", 'O', MASK_CONTROL|MASK_SHIFT);
- item->setEnabled(gGLManager.mHasOcclusionQuery);
+ item->setEnabled(gGLManager.mHasOcclusionQuery && gFeatureManagerp->isFeatureAvailable("UseOcclusion"));
menu->append(item);
@@ -5080,6 +5082,43 @@ class LLToolsLookAtSelection : public view_listener_t
}
};
+void callback_invite_to_group(LLUUID group_id, void *user_data)
+{
+ std::vector<LLUUID> agent_ids;
+ agent_ids.push_back(*(LLUUID *)user_data);
+
+ LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
+}
+
+void invite_to_group(const LLUUID& dest_id)
+{
+ LLViewerObject* dest = gObjectList.findObject(dest_id);
+ if(dest && dest->isAvatar())
+ {
+ LLFloaterGroupPicker* widget;
+ widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID()));
+ if (widget)
+ {
+ widget->center();
+ widget->setPowersMask(GP_MEMBER_INVITE);
+ widget->setSelectCallback(callback_invite_to_group, (void *)&dest_id);
+ }
+ }
+}
+
+class LLAvatarInviteToGroup : public view_listener_t
+{
+ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( gViewerWindow->lastObjectHit() );
+ if(avatar)
+ {
+ invite_to_group(avatar->getID());
+ }
+ return true;
+ }
+};
+
class LLAvatarAddFriend : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -7414,7 +7453,7 @@ class LLViewToggleRenderType : public view_listener_t
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLString type = userdata.asString();
- if (type == "particles")
+ if (type == "hideparticles")
{
LLPipeline::toggleRenderType(LLPipeline::RENDER_TYPE_PARTICLES);
}
@@ -7428,7 +7467,7 @@ class LLViewCheckRenderType : public view_listener_t
{
LLString type = userdata["data"].asString();
bool new_value = false;
- if (type == "particles")
+ if (type == "hideparticles")
{
new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES);
}
@@ -7730,6 +7769,7 @@ void initialize_menus()
addMenu(new LLAvatarDebug(), "Avatar.Debug");
addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug");
+ addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
addMenu(new LLAvatarEject(), "Avatar.Eject");
addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 7215f7948f..9d8a4b0026 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -776,7 +776,7 @@ void upload_new_resource(const LLString& src_filename, std::string name,
}
}
-void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result) // StoreAssetData callback (fixed)
+void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLResourceData* data = (LLResourceData*)user_data;
//LLAssetType::EType pref_loc = data->mPreferredLocation;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index cbaa1e2f2e..a9eff5d5f5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -73,6 +73,7 @@
#include "llimpanel.h"
#include "llinventorymodel.h"
#include "llinventoryview.h"
+#include "llkeyframemotion.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llnetmap.h"
@@ -554,6 +555,15 @@ void join_group_callback(S32 option, void* user_data)
LLJoinGroupData* data = (LLJoinGroupData*)user_data;
BOOL delete_context_data = TRUE;
bool accept_invite = false;
+
+ if (option == 2 && data && !data->mGroupID.isNull())
+ {
+ LLFloaterGroupInfo::showFromUUID(data->mGroupID);
+ LLString::format_map_t args;
+ args["[MESSAGE]"] = data->mMessage;
+ LLNotifyBox::showXml("JoinGroup", args, &join_group_callback, data);
+ return;
+ }
if(option == 0 && data && !data->mGroupID.isNull())
{
// check for promotion or demotion.
@@ -744,7 +754,7 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
//llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl;
// When downloading the initial inventory we get a lot of new items
// coming in and can't tell that from spam. JC
- if (gStartupState >= STATE_STARTED
+ if (LLStartUp::getStartupState() >= STATE_STARTED
&& throttle_count >= OFFER_THROTTLE_MAX_COUNT)
{
if (!throttle_logged)
@@ -2143,7 +2153,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
is_muted = gMuteListp->isMuted(from_id, from_name, LLMute::flagTextChat)
|| gMuteListp->isMuted(owner_id);
- is_linden = gMuteListp->isLinden(from_name);
+ is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && gMuteListp->isLinden(from_name);
}
BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible);
@@ -2300,16 +2310,16 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
}
// truth table:
- // LINDEN BUSY MUTED OWNED_BY_YOU DISPLAY STORE IN HISTORY
- // F F F F Yes Yes
- // F F F T Yes Yes
- // F F T F No No
- // F F T T No No
- // F T F F No Yes
- // F T F T Yes Yes
- // F T T F No No
- // F T T T No No
- // T * * * Yes Yes
+ // LINDEN BUSY MUTED OWNED_BY_YOU TASK DISPLAY STORE IN HISTORY
+ // F F F F * Yes Yes
+ // F F F T * Yes Yes
+ // F F T F * No No
+ // F F T T * No No
+ // F T F F * No Yes
+ // F T F T * Yes Yes
+ // F T T F * No No
+ // F T T T * No No
+ // T * * * F Yes Yes
chat.mMuted = is_muted && !is_linden;
@@ -2408,47 +2418,103 @@ public:
{
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
LLIsType is_card(LLAssetType::AT_CALLINGCARD);
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
+
+ LLInventoryModel::cat_array_t card_cats;
+ LLInventoryModel::item_array_t card_items;
+ LLInventoryModel::cat_array_t land_cats;
+ LLInventoryModel::item_array_t land_items;
+
folder_ref_t::iterator it = mCompleteFolders.begin();
folder_ref_t::iterator end = mCompleteFolders.end();
for(; it != end; ++it)
{
gInventory.collectDescendentsIf(
(*it),
- cats,
- items,
+ land_cats,
+ land_items,
LLInventoryModel::EXCLUDE_TRASH,
is_landmark);
gInventory.collectDescendentsIf(
(*it),
- cats,
- items,
+ card_cats,
+ card_items,
LLInventoryModel::EXCLUDE_TRASH,
is_card);
}
- S32 count = items.count();
- for(S32 i = 0; i < count; ++i)
- {
- LLString::format_map_t args;
- args["[NAME]"] = items[i]->getName();
- switch(items[i]->getType())
- {
- case LLAssetType::AT_LANDMARK:
- LLNotifyBox::showXml("TeleportToLandmark",args);
- break;
- case LLAssetType::AT_CALLINGCARD:
- LLNotifyBox::showXml("TeleportToPerson",args);
- break;
- default:
- break;
- }
+ LLString::format_map_t args;
+ if ( land_items.count() > 0 )
+ { // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory
+ S32 random_land = ll_rand( land_items.count() - 1 );
+ args["[NAME]"] = land_items[random_land]->getName();
+ LLNotifyBox::showXml("TeleportToLandmark",args);
+ }
+ if ( card_items.count() > 0 )
+ { // Show notification that they can now contact people. Use a random calling card from the inventory
+ S32 random_card = ll_rand( card_items.count() - 1 );
+ args["[NAME]"] = card_items[random_card]->getName();
+ LLNotifyBox::showXml("TeleportToPerson",args);
}
+
gInventory.removeObserver(this);
delete this;
}
};
+
+
+class LLPostTeleportNotifiers : public LLEventTimer
+{
+public:
+ LLPostTeleportNotifiers();
+ virtual ~LLPostTeleportNotifiers();
+
+ //function to be called at the supplied frequency
+ virtual BOOL tick();
+};
+
+LLPostTeleportNotifiers::LLPostTeleportNotifiers() : LLEventTimer( 2.0 )
+{
+};
+
+LLPostTeleportNotifiers::~LLPostTeleportNotifiers()
+{
+}
+
+BOOL LLPostTeleportNotifiers::tick()
+{
+ BOOL all_done = FALSE;
+ if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE )
+ {
+ // get callingcards and landmarks available to the user arriving.
+ LLInventoryFetchDescendentsObserver::folder_ref_t folders;
+ LLUUID folder_id;
+ folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
+ if(folder_id.notNull())
+ folders.push_back(folder_id);
+ folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+ if(folder_id.notNull())
+ folders.push_back(folder_id);
+ if(!folders.empty())
+ {
+ LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
+ fetcher->fetchDescendents(folders);
+ if(fetcher->isEverythingComplete())
+ {
+ fetcher->done();
+ }
+ else
+ {
+ gInventory.addObserver(fetcher);
+ }
+ }
+ all_done = TRUE;
+ }
+
+ return all_done;
+}
+
+
+
// Teleport notification from the simulator
// We're going to pretend to be a new agent
void process_teleport_finish(LLMessageSystem* msg, void**)
@@ -2494,26 +2560,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
{
gAgent.setHomePosRegion(region_handle, pos);
- // get callingcards and landmarks available to the user arriving.
- LLInventoryFetchDescendentsObserver::folder_ref_t folders;
- LLUUID folder_id;
- folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
- if(folder_id.notNull()) folders.push_back(folder_id);
- folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
- if(folder_id.notNull()) folders.push_back(folder_id);
- if(!folders.empty())
- {
- LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
- fetcher->fetchDescendents(folders);
- if(fetcher->isEverythingComplete())
- {
- fetcher->done();
- }
- else
- {
- gInventory.addObserver(fetcher);
- }
- }
+ // Create a timer that will send notices when teleporting is all finished. Since this is
+ // based on the LLEventTimer class, it will be managed by that class and not orphaned or leaked.
+ new LLPostTeleportNotifiers();
}
LLHost sim_host(sim_ip, sim_port);
@@ -2646,6 +2695,8 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
llinfos << "Changing home region to " << x << ":" << y << llendl;
+ LLKeyframeDataCache::clear();
+
// set our upstream host the new simulator and shuffle things as
// appropriate.
LLVector3 shift_vector = regionp->getPosRegionFromGlobal(
@@ -4007,12 +4058,10 @@ void process_alert_core(const char* buffer, BOOL modal)
else if( !strcmp( buffer, "Home position set." ) )
{
// save the home location image to disk
- char temp_str[LL_MAX_PATH]; /* Flawfinder: ignore */
- strncpy(temp_str, gDirUtilp->getLindenUserDir().c_str(), LL_MAX_PATH -1); /* Flawfinder: ignore */
- temp_str[LL_MAX_PATH -1] = '\0';
- strcat(temp_str, "/"); /* Flawfinder: ignore */
- strcat(temp_str,SCREEN_HOME_FILENAME); /* Flawfinder: ignore */
- gViewerWindow->saveSnapshot(temp_str, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
+ LLString snap_filename = gDirUtilp->getLindenUserDir();
+ snap_filename += gDirUtilp->getDirDelimiter();
+ snap_filename += SCREEN_HOME_FILENAME;
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidth(), gViewerWindow->getWindowHeight(), FALSE, FALSE);
}
// Translate system messages here.
@@ -4563,7 +4612,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, STD_STRING_BUF_SIZE, reason);
LLStringBase<char>::format_map_t args;
- args["[REASON]"] = LLAgent::sTeleportErrorMessages[reason];
+ LLString big_reason = LLAgent::sTeleportErrorMessages[reason];
+ if ( big_reason.size() > 0 )
+ { // Substitute verbose reason from the local map
+ args["[REASON]"] = big_reason;
+ }
+ else
+ { // Nothing found in the map - use what the server returned
+ args["[REASON]"] = reason;
+ }
+
gViewerWindow->alertXml("CouldNotTeleportReason", args);
if( gAgent.getTeleportState() != LLAgent::TELEPORT_NONE )
@@ -5028,7 +5086,7 @@ void process_load_url(LLMessageSystem* msg, void**)
}
-void callback_download_complete(void** data, S32 result)
+void callback_download_complete(void** data, S32 result, LLExtStat ext_status)
{
LLString* filepath = (LLString*)data;
LLString::format_map_t args;
@@ -5165,7 +5223,7 @@ void callbackCacheEstateOwnerName(
void onCovenantLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status)
+ void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "onCovenantLoadComplete()" << llendl;
std::string covenant_text;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index ccfd1f7277..93519f7736 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -160,7 +160,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**);
void onCovenantLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
- void* user_data, S32 status);
+ void* user_data, S32 status, LLExtStat ext_status);
void callbackCacheEstateOwnerName(
const LLUUID& id,
const char* first,
@@ -199,3 +199,4 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**);
#endif
+
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index bbb69594da..2d39bec6a7 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2418,7 +2418,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
LLXferManager::HIGH_PRIORITY);
}
-void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code)
+void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status)
{
LLFilenameAndTask* ft = (LLFilenameAndTask*)user_data;
LLViewerObject* object = NULL;
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index f52466cc2d..a7cc4c818c 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -519,7 +519,7 @@ protected:
// inventory functionality
//
- static void processTaskInvFile(void** user_data, S32 error_code);
+ static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
void loadTaskInvFile(const char* filename);
void doInventoryCallback();
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 2ac131ac91..b029e60422 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -634,13 +634,33 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
std::vector<LLViewerObject*> kill_list;
S32 num_active_objects = 0;
+ LLViewerObject *objectp = NULL;
+ // Make a copy of the list in case something in idleUpdate() messes with it
+ std::vector<LLViewerObject*> idle_list;
+ idle_list.reserve( mActiveObjects.size() );
+
+ for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
+ active_iter != mActiveObjects.end(); active_iter++)
+ {
+ objectp = *active_iter;
+ if (objectp)
+ {
+ idle_list.push_back( objectp );
+ }
+ else
+ { // There shouldn't be any NULL pointers in the list, but they have caused
+ // crashes before. This may be idleUpdate() messing with the list.
+ llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl;
+ }
+ }
+
if (gSavedSettings.getBOOL("FreezeTime"))
{
- for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin();
- iter != mActiveObjects.end(); iter++)
+ for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
+ iter != idle_list.end(); iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *iter;
if (objectp->getPCode() == LLViewerObject::LL_VO_CLOUDS ||
objectp->isAvatar())
{
@@ -650,10 +670,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
}
else
{
- for (std::set<LLPointer<LLViewerObject> >::iterator iter = mActiveObjects.begin();
- iter != mActiveObjects.end(); iter++)
+ for (std::vector<LLViewerObject*>::iterator idle_iter = idle_list.begin();
+ idle_iter != idle_list.end(); idle_iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *idle_iter;
if (!objectp->idleUpdate(agent, world, frame_time))
{
// If Idle Update returns false, kill object!
@@ -664,10 +684,10 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
num_active_objects++;
}
}
- for (std::vector<LLViewerObject*>::iterator iter = kill_list.begin();
- iter != kill_list.end(); iter++)
+ for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin();
+ kill_iter != kill_list.end(); kill_iter++)
{
- LLViewerObject *objectp = *iter;
+ objectp = *kill_iter;
killObject(objectp);
}
}
@@ -1079,6 +1099,8 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce
iter != pick_drawables.end(); iter++)
{
LLDrawable* drawablep = *iter;
+ if( !drawablep )
+ continue;
LLViewerObject* last_objectp = NULL;
for (S32 face_num = 0; face_num < drawablep->getNumFaces(); face_num++)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index c3841cdd98..81af21069e 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1187,9 +1187,9 @@ public:
llinfos << "BaseCapabilitiesComplete::error "
<< statusNum << ": " << reason << llendl;
- if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
- gStartupState = STATE_SEED_CAP_GRANTED;
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
}
}
@@ -1203,9 +1203,9 @@ public:
<< iter->first << llendl;
}
- if (STATE_SEED_GRANTED_WAIT == gStartupState)
+ if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
- gStartupState = STATE_SEED_CAP_GRANTED;
+ LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED );
}
}
@@ -1256,6 +1256,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ChatSessionRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
capabilityNames.append("ServerReleaseNotes");
+ capabilityNames.append("CopyInventoryFromNotecard");
llinfos << "posting to seed " << url << llendl;
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 2fff820602..96117ce502 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -35,6 +35,68 @@
extern BOOL gPacificDaylightTime;
+///----------------------------------------------------------------------------
+/// Class LLEmbeddedNotecardOpener
+///----------------------------------------------------------------------------
+class LLEmbeddedNotecardOpener : public LLInventoryCallback
+{
+ LLViewerTextEditor* mTextEditor;
+
+public:
+ LLEmbeddedNotecardOpener()
+ : mTextEditor(NULL)
+ {
+ }
+
+ void setEditor(LLViewerTextEditor* e) {mTextEditor = e;}
+
+ // override
+ void fire(const LLUUID& inv_item)
+ {
+ if(!mTextEditor)
+ {
+ // The parent text editor may have vanished by now.
+ // In that case just quit.
+ return;
+ }
+
+ LLInventoryItem* item = gInventory.getItem(inv_item);
+ if(!item)
+ {
+ llwarns << "Item add reported, but not found in inventory!: " << inv_item << llendl;
+ }
+ else
+ {
+ // See if we can bring an existing preview to the front
+ if(!LLPreview::show(item->getUUID(), true))
+ {
+ if(!gSavedSettings.getBOOL("ShowNewInventory"))
+ {
+ // There isn't one, so make a new preview
+ S32 left, top;
+ gFloaterView->getNewFloaterPosition(&left, &top);
+ LLRect rect = gSavedSettings.getRect("NotecardEditorRect");
+ rect.translate(left - rect.mLeft, top - rect.mTop);
+ LLPreviewNotecard* preview;
+ preview = new LLPreviewNotecard("preview notecard",
+ rect,
+ LLString("Embedded Note: ") + item->getName(),
+ item->getUUID(),
+ LLUUID::null,
+ item->getAssetUUID(),
+ true,
+ (LLViewerInventoryItem*)item);
+ preview->setSourceID(LLUUID::null);
+ preview->setFocus(TRUE);
+
+ // Force to be entirely onscreen.
+ gFloaterView->adjustToFitScreen(preview, FALSE);
+ }
+ }
+ }
+ }
+};
+
////////////////////////////////////////////////////////////
// LLEmbeddedItems
//
@@ -477,14 +539,21 @@ LLViewerTextEditor::LLViewerTextEditor(const LLString& name,
const LLFontGL* font,
BOOL allow_embedded_items)
: LLTextEditor(name, rect, max_length, default_text, font, allow_embedded_items),
- mDragItemSaved(FALSE)
+ mDragItemSaved(FALSE),
+ mInventoryCallback(new LLEmbeddedNotecardOpener)
{
mEmbeddedItemList = new LLEmbeddedItems(this);
+ mInventoryCallback->setEditor(this);
}
LLViewerTextEditor::~LLViewerTextEditor()
{
delete mEmbeddedItemList;
+
+
+ // The inventory callback may still be in use by gInventoryCallbackManager...
+ // so set its reference to this to null.
+ mInventoryCallback->setEditor(NULL);
}
///////////////////////////////////////////////////////////////////
@@ -1259,22 +1328,14 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item )
open_landmark((LLViewerInventoryItem*)item, " preview landmark", FALSE, item->getUUID(), TRUE);
}
-
void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, BOOL saved )
{
if (saved)
{
- // Pop-up the notecard floater.
- // Note: Previously would copy to inventory and rely on autodisplay to view.
- // Now that autodisplay can be turned off, we need to make this case display always.
- // besides, there's no point adding to inventory -MG
- open_notecard(
- (LLViewerInventoryItem*)item,
- LLString("Embedded Note: ") + item->getName(), // title
- mObjectID,
- FALSE, // show_keep_discard
- LLUUID::null, // source_id
- TRUE); // take_focus
+ // An LLInventoryItem needs to be in an inventory to be opened.
+ // This will give the item to the viewer's agent.
+ // The callback will attempt to open it if its not already opened.
+ copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
}
else
{
@@ -1349,11 +1410,11 @@ bool LLViewerTextEditor::importStream(std::istream& str)
return success;
}
-void LLViewerTextEditor::copyInventory(LLInventoryItem* item)
+void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback_id)
{
copy_inventory_from_notecard(mObjectID,
mNotecardInventoryID,
- item);
+ item, callback_id);
}
bool LLViewerTextEditor::hasEmbeddedInventory()
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index a57b3fec7e..58ca74156a 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -13,7 +13,7 @@
class LLInventoryItem;
class LLEmbeddedItems;
-
+class LLEmbeddedNotecardOpener;
//
// Classes
@@ -66,7 +66,7 @@ public:
// Appends Second Life time, small font, grey
// If this starts a line, you need to prepend a newline.
- void copyInventory(LLInventoryItem* item);
+ void copyInventory(const LLInventoryItem* item, U32 callback_id = 0);
// returns true if there is embedded inventory.
// *HACK: This is only useful because the notecard verifier may
@@ -103,6 +103,8 @@ protected:
LLUUID mObjectID;
LLUUID mNotecardInventoryID;
+
+ LLPointer<LLEmbeddedNotecardOpener> mInventoryCallback;
};
#endif // LL_VIEWERTEXTEDITOR_H
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index dbce01246f..b19b676fd6 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1285,7 +1285,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
{
if (!gQuit)
{
- if (gStartupState >= STATE_STARTED)
+ if (LLStartUp::getStartupState() >= STATE_STARTED)
{
// if we're in world, show a progress bar to hide reloading of textures
llinfos << "Restoring GL during activate" << llendl;
@@ -2726,27 +2726,11 @@ BOOL LLViewerWindow::handlePerFrameHover()
gPipeline.sRenderProcessBeacons = FALSE;
KEY key = gKeyboard->currentKey();
- if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || (gFloaterTools && gFloaterTools->getVisible()) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
+ if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
gPipeline.sRenderProcessBeacons = TRUE;
}
-/*
- // Show joints while in edit mode and hold down alt key.
- if (gHUDManager)
- {
- BOOL menuOption = gSavedSettings.getBOOL("AltShowsPhysical");
- if (menuOption
- || (gFloaterTools && gFloaterTools->getVisible()))
- {
- gHUDManager->toggleShowPhysical( mask & MASK_ALT );
- }
- else
- {
- gHUDManager->toggleShowPhysical( FALSE );
- }
- }
-*/
BOOL handled = FALSE;
BOOL handled_by_top_ctrl = FALSE;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 60cce34b72..2724763023 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1352,6 +1352,7 @@ void LLVOAvatar::initClass()
if (!skeleton_node)
{
llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl;
+ return;
}
LLString skeleton_file_name;
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 31c2a282d1..95a5b140f6 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -1319,7 +1319,7 @@ void LLVoiceClient::stateMachine()
CloseHandle(pinfo.hThread); // stops leaks - nothing else
}
- delete args2;
+ delete[] args2;
#else // LL_WINDOWS
// This should be the same for mac and linux
{
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 4c0855be29..e4315ca951 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -458,7 +458,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
buffer->getTexCoordStrider(texcoordsp);
buffer->getIndexStrider(indicesp);
- std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[mRenderPass];
+ LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass];
for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
{
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index b8a06f4816..49af54d5aa 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -11,6 +11,7 @@
#include "llvosky.h"
#include "imageids.h"
+#include "llfeaturemanager.h"
#include "llviewercontrol.h"
#include "llframetimer.h"
#include "timing.h"
@@ -577,7 +578,7 @@ void LLVOSky::initCubeMap()
{
mCubeMap->init(images);
}
- else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap)
+ else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
{
mCubeMap = new LLCubeMap();
mCubeMap->init(images);
@@ -614,7 +615,8 @@ void LLVOSky::restoreGL()
calcBrightnessScaleAndColors();
- if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap)
+ if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap
+ && gFeatureManagerp->isFeatureAvailable("RenderCubeMap"))
{
LLCubeMap* cube_map = getCubeMap();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 57b046c082..afe1ae6f5e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -2066,7 +2066,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
}
//add face to drawmap
- std::vector<LLDrawInfo*>& draw_vec = group->mDrawMap[type];
+ LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[type];
S32 idx = draw_vec.size()-1;
@@ -2091,7 +2091,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 end = start + facep->getGeomCount()-1;
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
- LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex,
+ LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex,
facep->mVertexBuffer, fullbright, bump);
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
@@ -2131,7 +2131,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U32 end = start + facep->getGeomCount()-1;
U32 offset = facep->getIndicesStart();
U32 count = facep->getIndicesCount();
- LLDrawInfo* draw_info = new LLDrawInfo(start,end,count,offset,tex,
+ LLPointer<LLDrawInfo> draw_info = new LLDrawInfo(start,end,count,offset,tex,
facep->mVertexBuffer, fullbright, bump);
draw_info->mVSize = facep->getVirtualSize();
draw_vec.push_back(draw_info);
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 9e85e293d4..11f471b246 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -914,7 +914,7 @@ void LLWearable::saveNewAsset()
}
// static
-void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status) // StoreAssetData callback (fixed)
+void LLWearable::onSaveNewAssetComplete(const LLUUID& new_asset_id, void* userdata, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLWearableSaveData* data = (LLWearableSaveData*)userdata;
const char* type_name = LLWearable::typeToTypeName(data->mType);
@@ -983,3 +983,4 @@ void LLWearable::dump()
}
}
+
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 22572981a3..1c8270e2a2 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -88,7 +88,7 @@ public:
static LLAssetType::EType typeToAssetType( EWearableType wearable_type );
void saveNewAsset();
- static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status );
+ static void onSaveNewAssetComplete( const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status );
BOOL isMatchedToInventoryItem( LLViewerInventoryItem* item );
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index b00decac9a..0d95442d69 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -73,7 +73,7 @@ void LLWearableList::getAsset( const LLAssetID& assetID, const LLString& wearabl
}
// static
-void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status )
+void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status )
{
BOOL success = FALSE;
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h
index 587ea9e507..cd5a479d11 100644
--- a/indra/newview/llwearablelist.h
+++ b/indra/newview/llwearablelist.h
@@ -39,7 +39,7 @@ public:
LLWearable* createNewWearable( EWearableType type );
// Pseudo-private
- static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status);
+ static void processGetAssetReply(const char* filename, const LLAssetID& assetID, void* user_data, S32 status, LLExtStat ext_status);
protected:
LLPtrSkipMap< const LLUUID, LLWearable* > mList;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2858854a9a..f4c442b0ad 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -478,7 +478,7 @@ public:
{
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
- for (std::vector<LLDrawInfo*>::iterator j = i->second.begin(); j != i->second.end(); ++j)
+ for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
LLDrawInfo* params = *j;
if (mTextures.find(params->mTexture) != mTextures.end())
@@ -1631,10 +1631,10 @@ void LLPipeline::postSort(LLCamera& camera)
}
for (LLSpatialGroup::draw_map_t::iterator j = group->mDrawMap.begin(); j != group->mDrawMap.end(); ++j)
{
- std::vector<LLDrawInfo*>& src_vec = j->second;
- std::vector<LLDrawInfo*>& dest_vec = mRenderMap[j->first];
+ LLSpatialGroup::drawmap_elem_t& src_vec = j->second;
+ LLSpatialGroup::drawmap_elem_t& dest_vec = mRenderMap[j->first];
- for (std::vector<LLDrawInfo*>::iterator k = src_vec.begin(); k != src_vec.end(); ++k)
+ for (LLSpatialGroup::drawmap_elem_t::iterator k = src_vec.begin(); k != src_vec.end(); ++k)
{
dest_vec.push_back(*k);
}
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 9a7336186c..161a55ea52 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -373,7 +373,7 @@ public:
LLVector3 mSunDir;
LLSpatialGroup::sg_vector_t mActiveGroups;
- std::vector<LLDrawInfo*> mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
+ LLSpatialGroup::drawmap_elem_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
std::vector<LLSpatialGroup* > mAlphaGroups;
std::vector<LLSpatialGroup* > mAlphaGroupsPostWater;
LLSpatialGroup::sg_vector_t mVisibleGroups;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 041dfd1b81..a20ebece11 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -487,7 +487,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libuuid.so", "libuuid.so.1")
self.path("libSDL-1.2.so.0")
self.path("libELFIO.so")
- #self.path("libresolv.so") - don't bundle
+ self.path("libresolv.so", "libresolv.so.2")
#self.path("libtcmalloc.so.0") - bugged
#self.path("libstacktrace.so.0") - probably bugged
self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason