summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
committerMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
commitec9260701feaa9ae1453c57f0f70449bb9b60af2 (patch)
tree9a6e74ee503c956dc8f13851f3ff0da712861b08 /indra
parente56145176875a09dc9e1524a47bcc1259582c896 (diff)
parent49ad7fd4b57cec635c557070be02556094e90ff6 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/GooglePerfTools.cmake2
-rw-r--r--indra/llcommon/llapp.cpp3
-rw-r--r--indra/llcommon/llmemory.cpp31
-rw-r--r--indra/llcommon/llmemory.h35
-rw-r--r--indra/llcommon/llqueuedthread.cpp4
-rw-r--r--indra/llcommon/llthread.cpp35
-rw-r--r--indra/llcommon/llthread.h31
-rw-r--r--indra/llimage/llimage.cpp6
-rw-r--r--indra/llimage/llimage.h2
-rw-r--r--indra/llmath/llvolume.cpp19
-rw-r--r--indra/llmath/tests/alignment_test.cpp37
-rw-r--r--indra/llmessage/llcurl.cpp80
-rw-r--r--indra/llmessage/llcurl.h15
-rw-r--r--indra/llmessage/tests/llcurl_stub.cpp17
-rw-r--r--indra/llmessage/tests/llhttpclient_test.cpp5
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp2
-rw-r--r--indra/llrender/llvertexbuffer.cpp5
-rw-r--r--indra/llui/llchatentry.cpp29
-rw-r--r--indra/llui/llchatentry.h5
-rw-r--r--indra/llui/llfolderview.cpp11
-rw-r--r--indra/llui/llmenugl.cpp129
-rw-r--r--indra/llui/llmenugl.h35
-rw-r--r--indra/llui/lltextbase.cpp20
-rw-r--r--indra/llui/lltextbase.h4
-rw-r--r--indra/llui/lltoggleablemenu.cpp5
-rw-r--r--indra/llui/lltoggleablemenu.h2
-rwxr-xr-x[-rw-r--r--]indra/newview/CMakeLists.txt1
-rw-r--r--indra/newview/llappviewer.cpp15
-rw-r--r--indra/newview/llappviewerwin32.cpp5
-rw-r--r--indra/newview/llassetuploadresponders.cpp8
-rw-r--r--indra/newview/llchiclet.h1
-rw-r--r--indra/newview/llchicletbar.h1
-rw-r--r--indra/newview/llconversationlog.h1
-rw-r--r--indra/newview/llconversationmodel.cpp19
-rwxr-xr-xindra/newview/llconversationview.cpp50
-rwxr-xr-xindra/newview/llconversationview.h1
-rw-r--r--indra/newview/lldrawable.cpp34
-rw-r--r--indra/newview/lldrawpoolalpha.cpp6
-rw-r--r--indra/newview/lldriverparam.h10
-rw-r--r--indra/newview/lleventpoll.cpp2
-rwxr-xr-x[-rw-r--r--]indra/newview/llface.cpp3
-rw-r--r--indra/newview/llfloaterbuycontents.cpp4
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp56
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h7
-rw-r--r--indra/newview/llfloatertos.cpp6
-rw-r--r--indra/newview/llimconversation.cpp34
-rw-r--r--indra/newview/llimconversation.h5
-rw-r--r--indra/newview/llimfloater.cpp31
-rw-r--r--indra/newview/llimfloater.h1
-rw-r--r--indra/newview/llimfloatercontainer.cpp399
-rw-r--r--indra/newview/llimfloatercontainer.h21
-rw-r--r--indra/newview/llimview.cpp22
-rw-r--r--indra/newview/llimview.h3
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llnearbychat.cpp23
-rw-r--r--indra/newview/llnearbychat.h2
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp8
-rw-r--r--indra/newview/llparticipantlist.cpp361
-rw-r--r--indra/newview/llparticipantlist.h75
-rw-r--r--indra/newview/llpolymesh.cpp3
-rw-r--r--indra/newview/llpolymesh.h10
-rw-r--r--indra/newview/llpolymorph.cpp60
-rw-r--r--indra/newview/llpolymorph.h13
-rw-r--r--indra/newview/llspatialpartition.cpp4
-rw-r--r--indra/newview/llspatialpartition.h2
-rw-r--r--indra/newview/llsyswellwindow.h1
-rw-r--r--indra/newview/lltexlayer.cpp8
-rw-r--r--indra/newview/lltexlayerparams.h20
-rwxr-xr-xindra/newview/lltexturefetch.cpp2
-rwxr-xr-xindra/newview/lltranslate.h4
-rw-r--r--indra/newview/llviewermenu.cpp12
-rwxr-xr-xindra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp71
-rw-r--r--indra/newview/llviewerobject.h3
-rw-r--r--indra/newview/llviewerregion.cpp5
-rwxr-xr-xindra/newview/llviewerwindow.cpp11
-rw-r--r--indra/newview/llvovolume.cpp12
-rw-r--r--indra/newview/llvovolume.h1
-rw-r--r--indra/newview/pipeline.cpp21
-rw-r--r--indra/newview/skins/default/xui/de/menu_viewer.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml46
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml1088
-rw-r--r--indra/newview/tests/lltranslate_test.cpp7
-rw-r--r--indra/newview/viewer_manifest.py10
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp39
-rw-r--r--indra/viewer_components/updater/llupdatechecker.h34
90 files changed, 1767 insertions, 1540 deletions
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
index 09501e0406..73b3642ae6 100644
--- a/indra/cmake/GooglePerfTools.cmake
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -3,7 +3,7 @@ include(Prebuilt)
# If you want to enable or disable TCMALLOC in viewer builds, this is the place.
# set ON or OFF as desired.
-set (USE_TCMALLOC ON)
+set (USE_TCMALLOC OFF)
if (STANDALONE)
include(FindGooglePerfTools)
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index ed192a9975..ca258900c7 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -289,6 +289,7 @@ void LLApp::setupErrorHandling()
// occasionally checks to see if the app is in an error state, and sees if it needs to be run.
#if LL_WINDOWS
+#if LL_SEND_CRASH_REPORTS
// This sets a callback to handle w32 signals to the console window.
// The viewer shouldn't be affected, sicne its a windowed app.
SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE);
@@ -300,7 +301,7 @@ void LLApp::setupErrorHandling()
mExceptionHandler = new google_breakpad::ExceptionHandler(
L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL);
}
-
+#endif
#else
//
// Start up signal handling.
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index afaf366668..70ad10ad55 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -252,21 +252,6 @@ U32 LLMemory::getAllocatedMemKB()
return sAllocatedMemInKB ;
}
-void* ll_allocate (size_t size)
-{
- if (size == 0)
- {
- llwarns << "Null allocation" << llendl;
- }
- void *p = malloc(size);
- if (p == NULL)
- {
- LLMemory::freeReserve();
- llerrs << "Out of memory Error" << llendl;
- }
- return p;
-}
-
//----------------------------------------------------------------------------
#if defined(LL_WINDOWS)
@@ -1365,7 +1350,7 @@ char* LLPrivateMemoryPool::allocate(U32 size)
//if the asked size larger than MAX_BLOCK_SIZE, fetch from heap directly, the pool does not manage it
if(size >= CHUNK_SIZE)
{
- return (char*)malloc(size) ;
+ return (char*)ll_aligned_malloc_16(size) ;
}
char* p = NULL ;
@@ -1422,7 +1407,7 @@ char* LLPrivateMemoryPool::allocate(U32 size)
to_log = false ;
}
- return (char*)malloc(size) ;
+ return (char*)ll_aligned_malloc_16(size) ;
}
return p ;
@@ -1441,7 +1426,7 @@ void LLPrivateMemoryPool::freeMem(void* addr)
if(!chunk)
{
- free(addr) ; //release from heap
+ ll_aligned_free_16(addr) ; //release from heap
}
else
{
@@ -1565,7 +1550,7 @@ LLPrivateMemoryPool::LLMemoryChunk* LLPrivateMemoryPool::addChunk(S32 chunk_inde
mReservedPoolSize += preferred_size + overhead ;
- char* buffer = (char*)malloc(preferred_size + overhead) ;
+ char* buffer = (char*)ll_aligned_malloc_16(preferred_size + overhead) ;
if(!buffer)
{
return NULL ;
@@ -1633,7 +1618,7 @@ void LLPrivateMemoryPool::removeChunk(LLMemoryChunk* chunk)
mReservedPoolSize -= chunk->getBufferSize() ;
//release memory
- free(chunk->getBuffer()) ;
+ ll_aligned_free_16(chunk->getBuffer()) ;
}
U16 LLPrivateMemoryPool::findHashKey(const char* addr)
@@ -1977,7 +1962,7 @@ char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size,
if(!poolp)
{
- p = (char*)malloc(size) ;
+ p = (char*)ll_aligned_malloc_16(size) ;
}
else
{
@@ -2006,7 +1991,7 @@ char* LLPrivateMemoryPoolManager::allocate(LLPrivateMemoryPool* poolp, U32 size)
}
else
{
- return (char*)malloc(size) ;
+ return (char*)ll_aligned_malloc_16(size) ;
}
}
#endif
@@ -2031,7 +2016,7 @@ void LLPrivateMemoryPoolManager::freeMem(LLPrivateMemoryPool* poolp, void* addr
{
if(!sPrivatePoolEnabled)
{
- free(addr) ; //private pool is disabled.
+ ll_aligned_free_16(addr) ; //private pool is disabled.
}
else if(!sInstance) //the private memory manager is destroyed, try the dangling list
{
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 08e2a2caa6..40cde485cf 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -27,6 +27,13 @@
#define LLMEMORY_H
#include "llmemtype.h"
+
+#if LL_WINDOWS && LL_DEBUG
+#define LL_CHECK_MEMORY llassert(_CrtCheckMemory());
+#else
+#define LL_CHECK_MEMORY
+#endif
+
inline void* ll_aligned_malloc( size_t size, int align )
{
void* mem = malloc( size + (align - 1) + sizeof(void*) );
@@ -58,33 +65,39 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi
#endif
}
-inline void* ll_aligned_realloc_16(void* ptr, size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
+inline void ll_aligned_free_16(void *p)
{
#if defined(LL_WINDOWS)
- return _aligned_realloc(ptr, size, 16);
+ _aligned_free(p);
#elif defined(LL_DARWIN)
- return realloc(ptr,size); // default osx malloc is 16 byte aligned.
+ return free(p);
#else
- // The realloc alignment test is skipped on Linux because the ll_aligned_realloc_16()
- // function is not implemented to ensure alignment (see alignment_test.cpp)
- return realloc(ptr,size); // FIXME not guaranteed to be aligned.
+ free(p); // posix_memalign() is compatible with heap deallocator
#endif
}
-inline void ll_aligned_free_16(void *p)
+inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16().
{
#if defined(LL_WINDOWS)
- _aligned_free(p);
+ return _aligned_realloc(ptr, size, 16);
#elif defined(LL_DARWIN)
- return free(p);
+ return realloc(ptr,size); // default osx malloc is 16 byte aligned.
#else
- free(p); // posix_memalign() is compatible with heap deallocator
+ //FIXME: memcpy is SLOW
+ void* ret = ll_aligned_malloc_16(size);
+ if (ptr)
+ {
+ memcpy(ret, ptr, old_size);
+ ll_aligned_free_16(ptr);
+ }
+ return ret;
#endif
}
+
#else // USE_TCMALLOC
// ll_aligned_foo_16 are not needed with tcmalloc
#define ll_aligned_malloc_16 malloc
-#define ll_aligned_realloc_16 realloc
+#define ll_aligned_realloc_16(a,b,c) realloc(a,b)
#define ll_aligned_free_16 free
#endif // USE_TCMALLOC
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index 1738c16dea..abf47a0f57 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -134,8 +134,8 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
pending = getPending();
if(pending > 0)
{
- unpause();
- }
+ unpause();
+ }
}
else
{
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index a6ad6b125c..c2fbb544a8 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -114,7 +114,7 @@ LLThread::LLThread(const std::string& name, apr_pool_t *poolp) :
apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread
}
mRunCondition = new LLCondition(mAPRPoolp);
-
+ mDataLock = new LLMutex(mAPRPoolp);
mLocalAPRFilePoolp = NULL ;
}
@@ -173,7 +173,10 @@ void LLThread::shutdown()
}
delete mRunCondition;
- mRunCondition = 0;
+ mRunCondition = NULL;
+
+ delete mDataLock;
+ mDataLock = NULL;
if (mIsLocalPool && mAPRPoolp)
{
@@ -242,28 +245,30 @@ bool LLThread::runCondition(void)
// Stop thread execution if requested until unpaused.
void LLThread::checkPause()
{
- mRunCondition->lock();
+ mDataLock->lock();
// This is in a while loop because the pthread API allows for spurious wakeups.
while(shouldSleep())
{
+ mDataLock->unlock();
mRunCondition->wait(); // unlocks mRunCondition
+ mDataLock->lock();
// mRunCondition is locked when the thread wakes up
}
- mRunCondition->unlock();
+ mDataLock->unlock();
}
//============================================================================
void LLThread::setQuitting()
{
- mRunCondition->lock();
+ mDataLock->lock();
if (mStatus == RUNNING)
{
mStatus = QUITTING;
}
- mRunCondition->unlock();
+ mDataLock->unlock();
wake();
}
@@ -285,12 +290,12 @@ void LLThread::yield()
void LLThread::wake()
{
- mRunCondition->lock();
+ mDataLock->lock();
if(!shouldSleep())
{
mRunCondition->signal();
}
- mRunCondition->unlock();
+ mDataLock->unlock();
}
void LLThread::wakeLocked()
@@ -481,6 +486,19 @@ LLThreadSafeRefCount::LLThreadSafeRefCount() :
{
}
+LLThreadSafeRefCount::LLThreadSafeRefCount(const LLThreadSafeRefCount& src)
+{
+ if (sMutex)
+ {
+ sMutex->lock();
+ }
+ mRef = 0;
+ if (sMutex)
+ {
+ sMutex->unlock();
+ }
+}
+
LLThreadSafeRefCount::~LLThreadSafeRefCount()
{
if (mRef != 0)
@@ -489,6 +507,7 @@ LLThreadSafeRefCount::~LLThreadSafeRefCount()
}
}
+
//============================================================================
LLResponder::~LLResponder()
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index cf39696b4f..c7984d6dbc 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -98,6 +98,7 @@ private:
protected:
std::string mName;
LLCondition* mRunCondition;
+ LLMutex* mDataLock;
apr_thread_t *mAPRThreadp;
apr_pool_t *mAPRPoolp;
@@ -123,15 +124,15 @@ protected:
inline void unlockData();
// This is the predicate that decides whether the thread should sleep.
- // It should only be called with mRunCondition locked, since the virtual runCondition() function may need to access
+ // It should only be called with mDataLock locked, since the virtual runCondition() function may need to access
// data structures that are thread-unsafe.
bool shouldSleep(void) { return (mStatus == RUNNING) && (isPaused() || (!runCondition())); }
// To avoid spurious signals (and the associated context switches) when the condition may or may not have changed, you can do the following:
- // mRunCondition->lock();
+ // mDataLock->lock();
// if(!shouldSleep())
// mRunCondition->signal();
- // mRunCondition->unlock();
+ // mDataLock->unlock();
};
//============================================================================
@@ -206,12 +207,12 @@ private:
void LLThread::lockData()
{
- mRunCondition->lock();
+ mDataLock->lock();
}
void LLThread::unlockData()
{
- mRunCondition->unlock();
+ mDataLock->unlock();
}
@@ -228,15 +229,27 @@ public:
private:
static LLMutex* sMutex;
-private:
- LLThreadSafeRefCount(const LLThreadSafeRefCount&); // not implemented
- LLThreadSafeRefCount&operator=(const LLThreadSafeRefCount&); // not implemented
-
protected:
virtual ~LLThreadSafeRefCount(); // use unref()
public:
LLThreadSafeRefCount();
+ LLThreadSafeRefCount(const LLThreadSafeRefCount&);
+ LLThreadSafeRefCount& operator=(const LLThreadSafeRefCount& ref)
+ {
+ if (sMutex)
+ {
+ sMutex->lock();
+ }
+ mRef = 0;
+ if (sMutex)
+ {
+ sMutex->unlock();
+ }
+ return *this;
+ }
+
+
void ref()
{
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 6775b005f4..825878c5ef 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -1660,6 +1660,12 @@ static void avg4_colors2(const U8* a, const U8* b, const U8* c, const U8* d, U8*
dst[1] = (U8)(((U32)(a[1]) + b[1] + c[1] + d[1])>>2);
}
+void LLImageBase::setDataAndSize(U8 *data, S32 size)
+{
+ ll_assert_aligned(data, 16);
+ mData = data; mDataSize = size;
+}
+
//static
void LLImageBase::generateMip(const U8* indata, U8* mipdata, S32 width, S32 height, S32 nchannels)
{
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 46e6d1a901..9ce77a0d01 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -148,7 +148,7 @@ public:
protected:
// special accessor to allow direct setting of mData and mDataSize by LLImageFormatted
- void setDataAndSize(U8 *data, S32 size) { mData = data; mDataSize = size; }
+ void setDataAndSize(U8 *data, S32 size);
public:
static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels);
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 53d56e96da..85ea14f9bc 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -6979,19 +6979,20 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con
{
S32 new_verts = mNumVertices+1;
S32 new_size = new_verts*16;
-// S32 old_size = mNumVertices*16;
+ S32 old_size = mNumVertices*16;
//positions
- mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size);
+ mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_size, old_size);
ll_assert_aligned(mPositions,16);
//normals
- mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size);
+ mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_size, old_size);
ll_assert_aligned(mNormals,16);
//tex coords
new_size = ((new_verts*8)+0xF) & ~0xF;
- mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size);
+ old_size = ((mNumVertices*8)+0xF) & ~0xF;
+ mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, new_size, old_size);
ll_assert_aligned(mTexCoords,16);
@@ -7045,7 +7046,7 @@ void LLVolumeFace::pushIndex(const U16& idx)
S32 old_size = ((mNumIndices*2)+0xF) & ~0xF;
if (new_size != old_size)
{
- mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size);
+ mIndices = (U16*) ll_aligned_realloc_16(mIndices, new_size, old_size);
ll_assert_aligned(mIndices,16);
}
@@ -7087,11 +7088,11 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
}
//allocate new buffer space
- mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a));
+ mPositions = (LLVector4a*) ll_aligned_realloc_16(mPositions, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a));
ll_assert_aligned(mPositions, 16);
- mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a));
+ mNormals = (LLVector4a*) ll_aligned_realloc_16(mNormals, new_count*sizeof(LLVector4a), mNumVertices*sizeof(LLVector4a));
ll_assert_aligned(mNormals, 16);
- mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF);
+ mTexCoords = (LLVector2*) ll_aligned_realloc_16(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF, (mNumVertices*sizeof(LLVector2)+0xF) & ~0xF);
ll_assert_aligned(mTexCoords, 16);
mNumVertices = new_count;
@@ -7138,7 +7139,7 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
new_count = mNumIndices + face.mNumIndices;
//allocate new index buffer
- mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF);
+ mIndices = (U16*) ll_aligned_realloc_16(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF, (mNumIndices*sizeof(U16)+0xF) & ~0xF);
//get destination address into new index buffer
U16* dst_idx = mIndices+mNumIndices;
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index 49c668d737..9105b1c1fd 100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
@@ -34,16 +34,6 @@
#include "../llsimdmath.h"
#include "../llvector4a.h"
-void* operator new(size_t size)
-{
- return ll_aligned_malloc_16(size);
-}
-
-void operator delete(void *p)
-{
- ll_aligned_free_16(p);
-}
-
namespace tut
{
@@ -59,6 +49,27 @@ tut::alignment_test_t tut_alignment_test("LLAlignment");
LL_ALIGN_PREFIX(16)
class MyVector4a
{
+public:
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
+ void* operator new[](size_t count)
+ { // try to allocate count bytes for an array
+ return ll_aligned_malloc_16(count);
+ }
+
+ void operator delete[](void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
LLQuad mQ;
} LL_ALIGN_POSTFIX(16);
@@ -78,12 +89,8 @@ void alignment_test_object_t::test<1>()
align_ptr = ll_aligned_malloc_16(sizeof(MyVector4a));
ensure("ll_aligned_malloc_16 failed", is_aligned(align_ptr,16));
-#if !LL_LINUX
- // Skipping realloc alignment test on Linux because the ll_aligned_realloc_16()
- // function is not implemented to ensure alignment on Linux (see llmemory.h)
- align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a));
+ align_ptr = ll_aligned_realloc_16(align_ptr,2*sizeof(MyVector4a), sizeof(MyVector4a));
ensure("ll_aligned_realloc_16 failed", is_aligned(align_ptr,16));
-#endif // LL_LINUX
ll_aligned_free_16(align_ptr);
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 5ea9b58300..10c83e6572 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -133,12 +133,12 @@ std::string LLCurl::getVersionString()
//////////////////////////////////////////////////////////////////////////////
LLCurl::Responder::Responder()
- : mReferenceCount(0)
{
}
LLCurl::Responder::~Responder()
{
+ LL_CHECK_MEMORY
}
// virtual
@@ -202,23 +202,6 @@ void LLCurl::Responder::completedHeader(U32 status, const std::string& reason, c
}
-namespace boost
-{
- void intrusive_ptr_add_ref(LLCurl::Responder* p)
- {
- ++p->mReferenceCount;
- }
-
- void intrusive_ptr_release(LLCurl::Responder* p)
- {
- if (p && 0 == --p->mReferenceCount)
- {
- delete p;
- }
- }
-};
-
-
//////////////////////////////////////////////////////////////////////////////
std::set<CURL*> LLCurl::Easy::sFreeHandles;
@@ -267,15 +250,18 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle)
LLMutexLock lock(sHandleMutexp) ;
if (sActiveHandles.find(handle) != sActiveHandles.end())
{
+ LL_CHECK_MEMORY
sActiveHandles.erase(handle);
-
+ LL_CHECK_MEMORY
if(sFreeHandles.size() < MAX_NUM_FREE_HANDLES)
{
- sFreeHandles.insert(handle);
- }
- else
- {
+ sFreeHandles.insert(handle);
+ LL_CHECK_MEMORY
+ }
+ else
+ {
LLCurl::deleteEasyHandle(handle) ;
+ LL_CHECK_MEMORY
}
}
else
@@ -318,13 +304,15 @@ LLCurl::Easy::~Easy()
releaseEasyHandle(mCurlEasyHandle);
--gCurlEasyCount;
curl_slist_free_all(mHeaders);
+ LL_CHECK_MEMORY
for_each(mStrings.begin(), mStrings.end(), DeletePointerArray());
-
+ LL_CHECK_MEMORY
if (mResponder && LLCurl::sNotQuitting) //aborted
{
std::string reason("Request timeout, aborted.") ;
mResponder->completedRaw(408, //HTTP_REQUEST_TIME_OUT, timeout, abort
reason, mChannels, mOutput);
+ LL_CHECK_MEMORY
}
mResponder = NULL;
}
@@ -599,35 +587,50 @@ void LLCurl::Multi::cleanup(bool deleted)
llassert_always(deleted || !mValid) ;
LLMutexLock lock(mDeletionMutexp);
-
+
+
// Clean up active
for(easy_active_list_t::iterator iter = mEasyActiveList.begin();
iter != mEasyActiveList.end(); ++iter)
{
Easy* easy = *iter;
+ LL_CHECK_MEMORY
check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
-
+ LL_CHECK_MEMORY
if(deleted)
{
easy->mResponder = NULL ; //avoid triggering mResponder.
+ LL_CHECK_MEMORY
}
delete easy;
+ LL_CHECK_MEMORY
}
mEasyActiveList.clear();
mEasyActiveMap.clear();
- // Clean up freed
+ LL_CHECK_MEMORY
+
+ // Clean up freed
for_each(mEasyFreeList.begin(), mEasyFreeList.end(), DeletePointer());
mEasyFreeList.clear();
-
+
+ LL_CHECK_MEMORY
+
check_curl_multi_code(LLCurl::deleteMultiHandle(mCurlMultiHandle));
mCurlMultiHandle = NULL ;
+
+ LL_CHECK_MEMORY
delete mMutexp ;
mMutexp = NULL ;
+
+ LL_CHECK_MEMORY
+
delete mEasyMutexp ;
mEasyMutexp = NULL ;
+ LL_CHECK_MEMORY
+
mQueued = 0 ;
mState = STATE_COMPLETED;
@@ -1101,6 +1104,7 @@ bool LLCurlRequest::getByteRange(const std::string& url,
S32 offset, S32 length,
LLCurl::ResponderPtr responder)
{
+ llassert(LLCurl::sNotQuitting);
LLCurl::Easy* easy = allocEasy();
if (!easy)
{
@@ -1123,6 +1127,7 @@ bool LLCurlRequest::post(const std::string& url,
const LLSD& data,
LLCurl::ResponderPtr responder, S32 time_out)
{
+ llassert(LLCurl::sNotQuitting);
LLCurl::Easy* easy = allocEasy();
if (!easy)
{
@@ -1150,6 +1155,7 @@ bool LLCurlRequest::post(const std::string& url,
const std::string& data,
LLCurl::ResponderPtr responder, S32 time_out)
{
+ llassert(LLCurl::sNotQuitting);
LLCurl::Easy* easy = allocEasy();
if (!easy)
{
@@ -1504,29 +1510,42 @@ void LLCurl::cleanupClass()
break ;
}
}
+ LL_CHECK_MEMORY
sCurlThread->shutdown() ;
+ LL_CHECK_MEMORY
delete sCurlThread ;
sCurlThread = NULL ;
+ LL_CHECK_MEMORY
#if SAFE_SSL
CRYPTO_set_locking_callback(NULL);
for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer());
#endif
+
+ LL_CHECK_MEMORY
for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter)
{
CURL* curl = *iter;
LLCurl::deleteEasyHandle(curl);
}
+
+ LL_CHECK_MEMORY
Easy::sFreeHandles.clear();
+ LL_CHECK_MEMORY
+
delete Easy::sHandleMutexp ;
Easy::sHandleMutexp = NULL ;
+ LL_CHECK_MEMORY
+
delete sHandleMutexp ;
sHandleMutexp = NULL ;
+ LL_CHECK_MEMORY
+
// removed as per https://jira.secondlife.com/browse/SH-3115
//llassert(Easy::sActiveHandles.empty());
}
@@ -1534,6 +1553,8 @@ void LLCurl::cleanupClass()
//static
CURLM* LLCurl::newMultiHandle()
{
+ llassert(sNotQuitting);
+
LLMutexLock lock(sHandleMutexp) ;
if(sTotalHandles + 1 > sMaxHandles)
@@ -1567,6 +1588,7 @@ CURLMcode LLCurl::deleteMultiHandle(CURLM* handle)
//static
CURL* LLCurl::newEasyHandle()
{
+ llassert(sNotQuitting);
LLMutexLock lock(sHandleMutexp) ;
if(sTotalHandles + 1 > sMaxHandles)
@@ -1591,7 +1613,9 @@ void LLCurl::deleteEasyHandle(CURL* handle)
if(handle)
{
LLMutexLock lock(sHandleMutexp) ;
+ LL_CHECK_MEMORY
curl_easy_cleanup(handle) ;
+ LL_CHECK_MEMORY
sTotalHandles-- ;
}
}
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index d6a7714d4c..62947bdb9d 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -44,6 +44,8 @@
#include "llthread.h"
#include "llqueuedthread.h"
#include "llframetimer.h"
+#include "llpointer.h"
+
class LLMutex;
class LLCurlThread;
@@ -67,7 +69,7 @@ public:
F64 mSpeedDownload;
};
- class Responder
+ class Responder : public LLThreadSafeRefCount
{
//LOG_CLASS(Responder);
public:
@@ -126,13 +128,10 @@ public:
return false;
}
- public: /* but not really -- don't touch this */
- U32 mReferenceCount;
-
private:
std::string mURL;
};
- typedef boost::intrusive_ptr<Responder> ResponderPtr;
+ typedef LLPointer<Responder> ResponderPtr;
/**
@@ -378,12 +377,6 @@ private:
void cleanupMulti(LLCurl::Multi* multi) ;
} ;
-namespace boost
-{
- void intrusive_ptr_add_ref(LLCurl::Responder* p);
- void intrusive_ptr_release(LLCurl::Responder* p);
-};
-
class LLCurlRequest
{
diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp
index d84fe0a49f..9b298d0c04 100644
--- a/indra/llmessage/tests/llcurl_stub.cpp
+++ b/indra/llmessage/tests/llcurl_stub.cpp
@@ -28,7 +28,6 @@
#include "llcurl.h"
LLCurl::Responder::Responder()
- : mReferenceCount(0)
{
}
@@ -77,19 +76,3 @@ void LLCurl::Responder::result(LLSD const&)
{
}
-namespace boost
-{
- void intrusive_ptr_add_ref(LLCurl::Responder* p)
- {
- ++p->mReferenceCount;
- }
-
- void intrusive_ptr_release(LLCurl::Responder* p)
- {
- if(p && 0 == --p->mReferenceCount)
- {
- delete p;
- }
- }
-};
-
diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp
index e338d4ec71..a2be307cc8 100644
--- a/indra/llmessage/tests/llhttpclient_test.cpp
+++ b/indra/llmessage/tests/llhttpclient_test.cpp
@@ -189,9 +189,9 @@ namespace tut
}
public:
- static boost::intrusive_ptr<Result> build(HTTPClientTestData& client)
+ static Result* build(HTTPClientTestData& client)
{
- return boost::intrusive_ptr<Result>(new Result(client));
+ return new Result(client);
}
~Result()
@@ -258,7 +258,6 @@ namespace tut
void HTTPClientTestObject::test<1>()
{
LLHTTPClient::get(local_server, newResult());
-
runThePump();
ensureStatusOK();
ensure("result object wasn't destroyed", mResultDeleted);
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index dbd96673a1..0644d2638c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1074,7 +1074,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mAuthURL = message.getValue("url");
mAuthRealm = message.getValue("realm");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
- }
+ }
else if(message_name == "debug_message")
{
mDebugMessageText = message.getValue("message_text");
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 28a14b23b9..ed48c49900 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -38,6 +38,10 @@
#include "llglslshader.h"
#include "llmemory.h"
+#if LL_DARWIN
+#define LL_VBO_POOLING 1
+#else
+#endif
//Next Highest Power Of Two
//helper function, returns first number > v that is a power of 2, or v if v is already a power of 2
U32 nhpo2(U32 v)
@@ -291,7 +295,6 @@ void LLVBOPool::seedPool()
-
void LLVBOPool::cleanup()
{
U32 size = LL_VBO_BLOCK_SIZE;
diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp
index 2a6ccc3dc9..8e9c6555c3 100644
--- a/indra/llui/llchatentry.cpp
+++ b/indra/llui/llchatentry.cpp
@@ -136,6 +136,35 @@ void LLChatEntry::updateHistory()
}
}
+void LLChatEntry::beforeValueChange()
+{
+ if(this->getLength() == 0 && !mLabel.empty())
+ {
+ this->clearSegments();
+ }
+}
+
+void LLChatEntry::onValueChange(S32 start, S32 end)
+{
+ //Internally resetLabel() must meet a condition before it can reset the label
+ resetLabel();
+}
+
+bool LLChatEntry::useLabel()
+{
+ return !getLength() && !mLabel.empty();
+}
+
+void LLChatEntry::onFocusReceived()
+{
+
+}
+
+void LLChatEntry::onFocusLost()
+{
+
+}
+
BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
{
BOOL handled = FALSE;
diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h
index 10a4594e83..49181c8d78 100644
--- a/indra/llui/llchatentry.h
+++ b/indra/llui/llchatentry.h
@@ -54,11 +54,16 @@ protected:
friend class LLUICtrlFactory;
LLChatEntry(const Params& p);
+ /*virtual*/ void beforeValueChange();
+ /*virtual*/ void onValueChange(S32 start, S32 end);
+ /*virtual*/ bool useLabel();
public:
virtual void draw();
virtual void onCommit();
+ /*virtual*/ void onFocusReceived();
+ /*virtual*/ void onFocusLost();
boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb);
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 9a4a90206b..c1a11851e2 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -286,7 +286,7 @@ void LLFolderView::addFolder( LLFolderViewFolder* folder)
//{
// mFolders.insert(mFolders.begin(), folder);
//}
- }
+}
void LLFolderView::closeAllFolders()
{
@@ -309,7 +309,7 @@ void LLFolderView::openTopLevelFolders()
// *width should be 0
// conform show folder state works
S32 LLFolderView::arrange( S32* unused_width, S32* unused_height )
- {
+ {
mMinWidth = 0;
S32 target_height;
@@ -856,7 +856,7 @@ void LLFolderView::propertiesSelectedItems( void )
// multi_propertiesp->openFloater(LLSD());
// }
//}
-}
+ }
void LLFolderView::autoOpenItem( LLFolderViewFolder* item )
@@ -1542,7 +1542,7 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask )
if (mCallbackRegistrar)
{
mCallbackRegistrar->popScope();
- }
+ }
}
else
{
@@ -1718,7 +1718,6 @@ void LLFolderView::update()
{
mNeedsAutoSelect = TRUE;
}
-
// filter to determine visibility before arranging
filter(getFolderViewModel()->getFilter());
// Clear the modified setting on the filter only if the filter count is non-zero after running the filter process
@@ -1727,7 +1726,7 @@ void LLFolderView::update()
{
getFolderViewModel()->getFilter().clearModified();
}
-
+
// automatically show matching items, and select first one if we had a selection
if (mNeedsAutoSelect)
{
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 5182a8cea1..93dc13475b 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1764,6 +1764,26 @@ bool LLMenuGL::addChild(LLView* view, S32 tab_group)
return false;
}
+// Used in LLContextMenu and in LLTogleableMenu
+
+// Add an item to the context menu branch
+bool LLMenuGL::addContextChild(LLView* view, S32 tab_group)
+{
+ LLContextMenu* context = dynamic_cast<LLContextMenu*>(view);
+ if (context)
+ return appendContextSubMenu(context);
+
+ LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
+ if (separator)
+ return append(separator);
+
+ LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
+ if (item)
+ return append(item);
+
+ return false;
+}
+
void LLMenuGL::removeChild( LLView* ctrl)
{
// previously a dynamic_cast with if statement to check validity
@@ -2501,6 +2521,32 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
return success;
}
+// add a context menu branch
+
+BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu)
+
+{
+ if (menu == this)
+ {
+ llerrs << "Can't attach a context menu to itself" << llendl;
+ }
+
+ LLContextMenuBranch *item;
+ LLContextMenuBranch::Params p;
+
+ p.name = menu->getName();
+ p.label = menu->getLabel();
+ p.branch = (LLContextMenu *)menu;
+ p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor");
+ p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
+ p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
+ p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
+ item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
+ LLMenuGL::sMenuContainer->addChild(item->getBranch());
+
+ return append( item );
+}
+
void LLMenuGL::setEnabledSubMenus(BOOL enable)
{
setEnabled(enable);
@@ -3037,7 +3083,17 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size
const S32 CURSOR_WIDTH = 12;
- if(menu->getChildList()->empty())
+ //Do not show menu if all menu items are disabled
+ BOOL item_enabled = false;
+ for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin();
+ itor != menu->getChildList()->end();
+ ++itor)
+ {
+ LLView *menu_item = (*itor);
+ item_enabled = item_enabled || menu_item->getEnabled();
+ }
+
+ if(menu->getChildList()->empty() || !item_enabled)
{
return;
}
@@ -3725,39 +3781,6 @@ void LLTearOffMenu::closeTearOff()
mMenu->setDropShadowed(TRUE);
}
-
-//-----------------------------------------------------------------------------
-// class LLContextMenuBranch
-// A branch to another context menu
-//-----------------------------------------------------------------------------
-class LLContextMenuBranch : public LLMenuItemGL
-{
-public:
- struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
- {
- Mandatory<LLContextMenu*> branch;
- };
-
- LLContextMenuBranch(const Params&);
-
- virtual ~LLContextMenuBranch()
- {}
-
- // called to rebuild the draw label
- virtual void buildDrawLabel( void );
-
- // onCommit() - do the primary funcationality of the menu item.
- virtual void onCommit( void );
-
- LLContextMenu* getBranch() { return mBranch.get(); }
- void setHighlight( BOOL highlight );
-
-protected:
- void showSubMenu();
-
- LLHandle<LLContextMenu> mBranch;
-};
-
LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
: LLMenuItemGL(p),
mBranch( p.branch()->getHandle() )
@@ -4029,44 +4052,8 @@ BOOL LLContextMenu::handleRightMouseUp( S32 x, S32 y, MASK mask )
return result;
}
-BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu)
-{
-
- if (menu == this)
- {
- llerrs << "Can't attach a context menu to itself" << llendl;
- }
-
- LLContextMenuBranch *item;
- LLContextMenuBranch::Params p;
- p.name = menu->getName();
- p.label = menu->getLabel();
- p.branch = menu;
- p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor");
- p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
- p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
- p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
-
- item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
- LLMenuGL::sMenuContainer->addChild(item->getBranch());
-
- return append( item );
-}
-
bool LLContextMenu::addChild(LLView* view, S32 tab_group)
{
- LLContextMenu* context = dynamic_cast<LLContextMenu*>(view);
- if (context)
- return appendContextSubMenu(context);
-
- LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
- if (separator)
- return append(separator);
-
- LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
- if (item)
- return append(item);
-
- return false;
+ return addContextChild(view, tab_group);
}
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index a9de3ef937..3e03232e92 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -519,6 +519,9 @@ public:
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
+ // add a context menu branch
+ BOOL appendContextSubMenu(LLMenuGL *menu);
+
protected:
void createSpilloverBranch();
void cleanupSpilloverBranch();
@@ -528,6 +531,10 @@ protected:
// add a menu - this will create a cascading menu
virtual BOOL appendMenu( LLMenuGL* menu );
+ // Used in LLContextMenu and in LLTogleableMenu
+ // to add an item of context menu branch
+ bool addContextChild(LLView* view, S32 tab_group);
+
// TODO: create accessor methods for these?
typedef std::list< LLMenuItemGL* > item_list_t;
item_list_t mItems;
@@ -677,8 +684,6 @@ public:
virtual bool addChild (LLView* view, S32 tab_group = 0);
- BOOL appendContextSubMenu(LLContextMenu *menu);
-
LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); }
LLView* getSpawningView() const { return mSpawningViewHandle.get(); }
@@ -691,7 +696,33 @@ protected:
LLHandle<LLView> mSpawningViewHandle;
};
+//-----------------------------------------------------------------------------
+// class LLContextMenuBranch
+// A branch to another context menu
+//-----------------------------------------------------------------------------
+class LLContextMenuBranch : public LLMenuItemGL
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
+ {
+ Mandatory<LLContextMenu*> branch;
+ };
+
+ LLContextMenuBranch(const Params&);
+
+ // Called to rebuild strings for this item
+ virtual void buildDrawLabel( void );
+ // Performed when menu item clicked
+ virtual void onCommit( void );
+
+ LLContextMenu* getBranch() { return mBranch.get(); }
+ void setHighlight( BOOL highlight );
+
+protected:
+ void showSubMenu();
+ LLHandle<LLContextMenu> mBranch;
+};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLMenuBarGL
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 98624f42b9..b827acb185 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -338,6 +338,11 @@ const LLStyle::Params& LLTextBase::getStyleParams()
return mStyle;
}
+void LLTextBase::beforeValueChange()
+{
+
+}
+
void LLTextBase::onValueChange(S32 start, S32 end)
{
}
@@ -530,7 +535,7 @@ void LLTextBase::drawText()
{
return;
}
- else if (text_len <= 0 && !mLabel.empty() && !hasFocus())
+ else if (useLabel())
{
text_len = mLabel.getWString().length();
}
@@ -747,6 +752,8 @@ void LLTextBase::drawText()
S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::segment_vec_t* segments )
{
+ beforeValueChange();
+
S32 old_len = getLength(); // length() returns character length
S32 insert_len = wstr.length();
@@ -822,6 +829,8 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s
S32 LLTextBase::removeStringNoUndo(S32 pos, S32 length)
{
+
+ beforeValueChange();
segment_set_t::iterator seg_iter = getSegIterContaining(pos);
while(seg_iter != mSegments.end())
{
@@ -880,6 +889,8 @@ S32 LLTextBase::removeStringNoUndo(S32 pos, S32 length)
S32 LLTextBase::overwriteCharNoUndo(S32 pos, llwchar wc)
{
+ beforeValueChange();
+
if (pos > (S32)getLength())
{
return 0;
@@ -2048,7 +2059,7 @@ BOOL LLTextBase::setLabelArg(const std::string& key, const LLStringExplicit& tex
void LLTextBase::resetLabel()
{
- if (!getLength() && !mLabel.empty() && !hasFocus())
+ if (useLabel())
{
clearSegments();
@@ -2061,6 +2072,11 @@ void LLTextBase::resetLabel()
}
}
+bool LLTextBase::useLabel()
+{
+ return !getLength() && !mLabel.empty() && !hasFocus();
+}
+
void LLTextBase::setFont(const LLFontGL* font)
{
mFont = font;
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 79662ebd33..629b304b25 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -382,7 +382,7 @@ public:
/**
* If label is set, draws text label (which is LLLabelTextSegment)
- * that is visible when no user text provided and has no focus
+ * that is visible when no user text provided
*/
void resetLabel();
@@ -501,7 +501,9 @@ protected:
LLTextBase(const Params &p);
virtual ~LLTextBase();
void initFromParams(const Params& p);
+ virtual void beforeValueChange();
virtual void onValueChange(S32 start, S32 end);
+ virtual bool useLabel();
// draw methods
void drawSelectionBackground(); // draws the black box behind the selected text
diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp
index d29260750f..b4c6c6162b 100644
--- a/indra/llui/lltoggleablemenu.cpp
+++ b/indra/llui/lltoggleablemenu.cpp
@@ -99,3 +99,8 @@ bool LLToggleableMenu::toggleVisibility()
return true;
}
+
+bool LLToggleableMenu::addChild(LLView* view, S32 tab_group)
+{
+ return addContextChild(view, tab_group);
+}
diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h
index dd9ac5b8c1..57b8f62eb6 100644
--- a/indra/llui/lltoggleablemenu.h
+++ b/indra/llui/lltoggleablemenu.h
@@ -47,6 +47,8 @@ public:
virtual void handleVisibilityChange (BOOL curVisibilityIn);
+ virtual bool addChild (LLView* view, S32 tab_group = 0);
+
const LLRect& getButtonRect() const { return mButtonRect; }
// Converts the given local button rect to a screen rect
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index ec1562a4c1..5248feae1b 100644..100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1581,6 +1581,7 @@ set(PACKAGE ON CACHE BOOL
if (WINDOWS)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
+ # *TODO -reenable this once we get server usage sorted out
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6b15e4b21a..d6c781020d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1893,8 +1893,17 @@ bool LLAppViewer::cleanup()
sTextureFetch->shutDownTextureCacheThread() ;
sTextureFetch->shutDownImageDecodeThread() ;
+ llinfos << "Shutting down message system" << llendflush;
+ end_messaging_system();
+
+ // *NOTE:Mani - The following call is not thread safe.
+ LL_CHECK_MEMORY
+ LLCurl::cleanupClass();
+ LL_CHECK_MEMORY
+
LLFilePickerThread::cleanupClass();
+ //MUST happen AFTER LLCurl::cleanupClass
delete sTextureCache;
sTextureCache = NULL;
delete sTextureFetch;
@@ -1963,12 +1972,6 @@ bool LLAppViewer::cleanup()
LLViewerAssetStatsFF::cleanup();
- llinfos << "Shutting down message system" << llendflush;
- end_messaging_system();
-
- // *NOTE:Mani - The following call is not thread safe.
- LLCurl::cleanupClass();
-
// If we're exiting to launch an URL, do that here so the screen
// is at the right resolution before we launch IE.
if (!gLaunchFileOnQuit.empty())
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 53c77fa22e..e0ca1232b0 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -131,7 +131,9 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1
// Enable to get mem debugging within visual studio.
- //_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#if LL_DEBUG
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#else
_CrtSetDbgFlag(0); // default, just making explicit
ULONG ulEnableLFH = 2;
@@ -146,6 +148,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
heap_enable_lfh_error[i] = GetLastError();
}
#endif
+#endif
// *FIX: global
gIconResource = MAKEINTRESOURCE(IDI_LL_ICON);
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 65bfc990d1..7b2c536f5a 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -919,7 +919,7 @@ public:
bool uploadConfirmationCallback(
const LLSD& notification,
const LLSD& response,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
+ LLPointer<LLNewAgentInventoryVariablePriceResponder> responder)
{
S32 option;
std::string confirmation_url;
@@ -949,7 +949,7 @@ public:
void confirmUpload(
const std::string& confirmation_url,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
+ LLPointer<LLNewAgentInventoryVariablePriceResponder> responder)
{
if ( getFilename().empty() )
{
@@ -1124,7 +1124,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(
// and cause sadness.
mImpl->confirmUpload(
confirmation_url,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this));
+ LLPointer<LLNewAgentInventoryVariablePriceResponder>(this));
}
else
{
@@ -1157,7 +1157,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(
mImpl,
_1,
_2,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)));
+ LLPointer<LLNewAgentInventoryVariablePriceResponder>(this)));
}
}
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index f51d7b622c..6395f5b694 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -874,6 +874,7 @@ class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
friend class LLUICtrlFactory;
public:
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
+ /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
/*virtual*/ void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h
index 7d0d904810..a9a5b61ae7 100644
--- a/indra/newview/llchicletbar.h
+++ b/indra/newview/llchicletbar.h
@@ -51,6 +51,7 @@ public:
// LLIMSessionObserver observe triggers
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {};
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h
index 373406aa6f..b92cf0f5e2 100644
--- a/indra/newview/llconversationlog.h
+++ b/indra/newview/llconversationlog.h
@@ -124,6 +124,7 @@ public:
// LLIMSessionObserver triggers
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}; // Stub
virtual void sessionRemoved(const LLUUID& session_id){} // Stub
virtual void sessionVoiceOrIMStarted(const LLUUID& session_id){}; // Stub
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id){}; // Stub
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 29e7ac4e12..f0c8658cfe 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
+#include "llagent.h"
#include "llavatarnamecache.h"
#include "llavataractions.h"
#include "llevents.h"
@@ -113,6 +114,19 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items)
items.push_back(std::string("share"));
items.push_back(std::string("pay"));
items.push_back(std::string("block_unblock"));
+
+ if(this->getType() != CONV_SESSION_1_ON_1)
+ {
+ items.push_back(std::string("Moderator Options Separator"));
+ items.push_back(std::string("Moderator Options"));
+ items.push_back(std::string("AllowTextChat"));
+ items.push_back(std::string("moderate_voice_separator"));
+ items.push_back(std::string("ModerateVoiceMuteSelected"));
+ items.push_back(std::string("ModerateVoiceUnMuteSelected"));
+ items.push_back(std::string("ModerateVoiceMute"));
+ items.push_back(std::string("ModerateVoiceUnmute"));
+ }
+
}
//
@@ -374,7 +388,10 @@ void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
menuentry_vec_t items;
menuentry_vec_t disabled_items;
- buildParticipantMenuOptions(items);
+ if(gAgent.getID() != mUUID)
+ {
+ buildParticipantMenuOptions(items);
+ }
hide_context_entries(menu, items, disabled_items);
}
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 416e6da2da..9144f402b4 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -32,6 +32,8 @@
#include <boost/bind.hpp>
#include "llagentdata.h"
#include "llconversationmodel.h"
+#include "llimfloater.h"
+#include "llnearbychat.h"
#include "llimconversation.h"
#include "llimfloatercontainer.h"
#include "llfloaterreg.h"
@@ -220,6 +222,13 @@ void LLConversationViewSession::toggleOpen()
if (!mMinimizedMode)
{
LLFolderViewFolder::toggleOpen();
+
+ // do item's selection when opened
+ if (LLFolderViewFolder::isOpen())
+ {
+ getParentFolder()->setSelection(this, true);
+ }
+
}
}
@@ -240,6 +249,9 @@ void LLConversationViewSession::selectItem()
// Set the focus on the selected floater
session_floater->setFocus(TRUE);
+ // Store the active session
+ LLIMFloaterContainer::getInstance()->setSelectedSession(item->getUUID());
+
LLFolderViewItem::selectItem();
}
@@ -405,21 +417,53 @@ void LLConversationViewParticipant::draw()
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE);
- const BOOL filled = show_context || (getRoot() ? getRoot()->getParentPanel()->hasFocus() : FALSE); // If we have keyboard focus, draw selection filled
const LLFontGL* font = getLabelFontForStyle(mLabelStyle);
F32 right_x = 0;
F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
F32 text_left = (F32)getLabelXPos();
- LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
+ LLColor4 color = mIsSelected ? sHighlightFgColor : sFgColor;
- drawHighlight(show_context, filled, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
+ drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFocusOutlineColor, sMouseOverColor);
drawLabel(font, text_left, y, color, right_x);
LLView::draw();
}
+void LLConversationViewParticipant::selectItem()
+{
+ LLConversationItem* vmi = this->getParentFolder() ? static_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL;
+ LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance();
+ LLFloater* session_floater;
+
+ //Only execute when switching floaters (conversations)
+ if(vmi && vmi->getUUID() != container->getSelectedSession())
+ {
+ //When null, show the nearby chat conversation floater
+ if(vmi->getUUID().isNull())
+ {
+ LLNearbyChat* nearbyChat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
+ nearbyChat->show();
+ }
+ //Otherwise, show the IM conversation floater
+ else
+ {
+ LLIMFloater::show(vmi->getUUID());
+ }
+
+ // Store the active session
+ container->setSelectedSession(vmi->getUUID());
+ }
+ //Focus the current conversation floater (it is already visible so just focus it)
+ else
+ {
+ session_floater = LLIMConversation::getConversation(vmi->getUUID());
+ session_floater->setFocus(TRUE);
+ }
+
+ LLFolderViewItem::selectItem();
+}
void LLConversationViewParticipant::refresh()
{
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index c81c70b456..bd95387bbe 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -113,6 +113,7 @@ public:
};
virtual ~LLConversationViewParticipant( void ) { }
+ void selectItem();
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
virtual void refresh();
void addToFolder(LLFolderViewFolder* folder);
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4eda2b92b3..954fd429a5 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -951,6 +951,12 @@ LLSpatialGroup* LLDrawable::getSpatialGroup() const
void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
{
+ //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this
+ llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this));
+
+ //precondition: groupp MUST be null or groupp MUST contain this
+ llassert(!groupp || groupp->hasElement(this));
+
/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
{
mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY);
@@ -970,9 +976,12 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
}
}
- mSpatialGroupp = groupp;
+ //postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1
+ //postcondition: if next group is NOT NULL, binIndex must not be -1
+ llassert(groupp == NULL ? (mSpatialGroupp == NULL || mSpatialGroupp->isDead()) || getBinIndex() == -1 :
+ getBinIndex() != -1);
- llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
+ mSpatialGroupp = groupp;
}
LLSpatialPartition* LLDrawable::getSpatialPartition()
@@ -1400,7 +1409,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
markDead();
return;
}
-
+
if (gShiftFrame)
{
return;
@@ -1483,13 +1492,11 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable::cleanupReferences();
if (mDrawable)
{
- LLSpatialGroup* group = mDrawable->getSpatialGroup();
- if (group)
- {
- group->mOctreeNode->remove(mDrawable);
- mDrawable->setSpatialGroup(NULL);
- }
+ /*
+ DON'T DO THIS -- this should happen through octree destruction
+
+ mDrawable->setSpatialGroup(NULL);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1500,15 +1507,10 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable* drawable = child->mDrawable;
if (drawable)
{
- LLSpatialGroup* group = drawable->getSpatialGroup();
- if (group)
- {
- group->mOctreeNode->remove(drawable);
- drawable->setSpatialGroup(NULL);
- }
+ drawable->setSpatialGroup(NULL);
}
}
- }
+ }*/
LLDrawable* drawablep = mDrawable;
mDrawable = NULL;
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index b4f6bf9383..313b310e1e 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -411,12 +411,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
continue;
}
- if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
- { //FIXME!
- llwarns << "Missing required components, skipping render batch." << llendl;
- continue;
- }
-
LLRenderPass::applyModelMatrix(params);
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 7a4d711d4e..c0976d1d43 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -83,6 +83,16 @@ public:
LLDriverParam(LLWearable *wearablep);
~LLDriverParam();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 4f4d9a40b4..2c786b7f8b 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -86,7 +86,7 @@ namespace
class LLEventPollEventTimer : public LLEventTimer
{
- typedef boost::intrusive_ptr<LLEventPollResponder> EventPollResponderPtr;
+ typedef LLPointer<LLEventPollResponder> EventPollResponderPtr;
public:
LLEventPollEventTimer(F32 period, EventPollResponderPtr responder)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 8d0664770b..582f06eeb0 100644..100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
+ mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
mTextureIndex = 255;
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 809d344d01..bca4b5e447 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -211,8 +211,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
BOOL item_is_multi = FALSE;
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
- || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
- && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
+ || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 0fe0e151fb..1e46d7a402 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -98,7 +98,11 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed)
mLabelSuggestedUseD(NULL),
mEditD(NULL),
mApplyEditsButton(NULL),
- mBeaconColor()
+ mBeaconColor(),
+ mPreviousValueA(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueB(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueC(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE)
{
}
@@ -168,7 +172,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditA = findChild<LLLineEditor>("edit_a_value");
llassert(mEditA != NULL);
mEditA->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueA));
mLabelEditB = findChild<LLTextBase>("edit_b_label");
llassert(mLabelEditB != NULL);
@@ -179,7 +183,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditB = findChild<LLLineEditor>("edit_b_value");
llassert(mEditB != NULL);
mEditB->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueB));
mLabelEditC = findChild<LLTextBase>("edit_c_label");
llassert(mLabelEditC != NULL);
@@ -190,7 +194,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditC = findChild<LLLineEditor>("edit_c_value");
llassert(mEditC != NULL);
mEditC->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueC));
mLabelEditD = findChild<LLTextBase>("edit_d_label");
llassert(mLabelEditD != NULL);
@@ -201,7 +205,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditD = findChild<LLLineEditor>("edit_d_value");
llassert(mEditD != NULL);
mEditD->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueD));
mApplyEditsButton = findChild<LLButton>("apply_edit_values");
llassert(mApplyEditsButton != NULL);
@@ -323,26 +327,38 @@ void LLFloaterPathfindingLinksets::onClearFiltersClicked()
rebuildObjectsScrollList();
}
-void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl)
+void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue)
{
LLLineEditor *pLineEditor = static_cast<LLLineEditor *>(pUICtrl);
llassert(pLineEditor != NULL);
const std::string &valueString = pLineEditor->getText();
- S32 value;
- if (LLStringUtil::convertToS32(valueString, value))
+ S32 intValue;
+ LLSD value;
+ bool doResetValue = false;
+
+ if (valueString.empty())
{
- if ((value < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (value > LLPathfindingLinkset::MAX_WALKABILITY_VALUE))
- {
- value = llclamp(value, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
- pLineEditor->setValue(LLSD(value));
- }
+ value = pPreviousValue;
+ doResetValue = true;
+ }
+ else if (LLStringUtil::convertToS32(valueString, intValue))
+ {
+ doResetValue = ((intValue < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (intValue > LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(llclamp(intValue, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
}
else
{
- pLineEditor->setValue(LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
+ doResetValue = true;
+ }
+
+ if (doResetValue)
+ {
+ pLineEditor->setValue(value);
}
+ pPreviousValue = value;
}
void LLFloaterPathfindingLinksets::onApplyChangesClicked()
@@ -376,10 +392,14 @@ void LLFloaterPathfindingLinksets::updateEditFieldValues()
const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(firstSelectedObjectPtr.get());
setEditLinksetUse(linkset->getLinksetUse());
- mEditA->setValue(LLSD(linkset->getWalkabilityCoefficientA()));
- mEditB->setValue(LLSD(linkset->getWalkabilityCoefficientB()));
- mEditC->setValue(LLSD(linkset->getWalkabilityCoefficientC()));
- mEditD->setValue(LLSD(linkset->getWalkabilityCoefficientD()));
+ mPreviousValueA = LLSD(linkset->getWalkabilityCoefficientA());
+ mPreviousValueB = LLSD(linkset->getWalkabilityCoefficientB());
+ mPreviousValueC = LLSD(linkset->getWalkabilityCoefficientC());
+ mPreviousValueD = LLSD(linkset->getWalkabilityCoefficientD());
+ mEditA->setValue(mPreviousValueA);
+ mEditB->setValue(mPreviousValueB);
+ mEditC->setValue(mPreviousValueC);
+ mEditD->setValue(mPreviousValueD);
}
}
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index 6538308122..7149da9215 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -74,7 +74,7 @@ private:
void onApplyAllFilters();
void onClearFiltersClicked();
- void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
+ void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue);
void onApplyChangesClicked();
void clearFilters();
@@ -132,6 +132,11 @@ private:
LLButton *mApplyEditsButton;
LLColor4 mBeaconColor;
+
+ LLSD mPreviousValueA;
+ LLSD mPreviousValueB;
+ LLSD mPreviousValueC;
+ LLSD mPreviousValueD;
};
#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index c5df7e16e9..a242b224cd 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -71,9 +71,9 @@ class LLIamHere : public LLHTTPClient::Responder
public:
- static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent )
+ static LLIamHere* build( LLFloaterTOS* parent )
{
- return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) );
+ return new LLIamHere( parent );
};
virtual void setParent( LLFloaterTOS* parentIn )
@@ -102,7 +102,7 @@ class LLIamHere : public LLHTTPClient::Responder
// this is global and not a class member to keep crud out of the header file
namespace {
- boost::intrusive_ptr< LLIamHere > gResponsePtr = 0;
+ LLPointer< LLIamHere > gResponsePtr = 0;
};
BOOL LLFloaterTOS::postBuild()
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index 2ad7f9b193..bd2a2419a8 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -54,7 +54,6 @@ LLIMConversation::LLIMConversation(const LLSD& session_id)
, mInputEditor(NULL)
, mInputEditorTopPad(0)
, mRefreshTimer(new LLTimer())
- , mHasFocus(false)
{
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -216,21 +215,11 @@ void LLIMConversation::onFocusReceived()
}
LLTransientDockableFloater::onFocusReceived();
-
- mHadFocus = mHasFocus;
- mHasFocus = true;
-
- if (! mHadFocus)
- {
- LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance();
- container->setConvItemSelect(mSessionID);
- }
}
void LLIMConversation::onFocusLost()
{
setBackgroundOpaque(false);
- mHasFocus = false;
LLTransientDockableFloater::onFocusLost();
}
@@ -393,7 +382,7 @@ void LLIMConversation::updateHeaderAndToolbar()
// prevent start conversation before its container
LLIMFloaterContainer::getInstance();
- bool is_torn_off = !getHost();
+ bool is_torn_off = checkIfTornOff();
if (!is_torn_off)
{
hideAllStandardButtons();
@@ -505,16 +494,12 @@ void LLIMConversation::onSlide(LLIMConversation* self)
/*virtual*/
void LLIMConversation::onOpen(const LLSD& key)
{
- LLIMFloaterContainer* host_floater = dynamic_cast<LLIMFloaterContainer*>(getHost());
- bool is_hosted = !!host_floater;
- if (is_hosted)
+ if (!checkIfTornOff())
{
+ LLIMFloaterContainer* host_floater = dynamic_cast<LLIMFloaterContainer*>(getHost());
// Show the messages pane when opening a floater hosted in the Conversations
host_floater->collapseMessagesPane(false);
}
-
- setTornOff(!is_hosted);
- updateHeaderAndToolbar();
}
// virtual
@@ -546,3 +531,16 @@ bool LLIMConversation::isChatMultiTab()
// Restart is required in order to change chat window type.
return true;
}
+
+bool LLIMConversation::checkIfTornOff()
+{
+ bool isTorn = !getHost();
+
+ if (isTorn != isTornOff())
+ {
+ setTornOff(isTorn);
+ updateHeaderAndToolbar();
+ }
+
+ return isTorn;
+}
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index c54081d316..603e0d0197 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -138,10 +138,9 @@ private:
*/
void reshapeChatHistory();
- LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called.
+ bool checkIfTornOff();
- bool mHadFocus;
- bool mHasFocus;
+ LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called.
};
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 467f48600a..e4032738a7 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -715,6 +715,19 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
}
}
+void LLIMFloater::setFocus(BOOL focusFlag)
+{
+ LLTransientDockableFloater::setFocus(focusFlag);
+
+ //Redirect focus to input editor
+ if (focusFlag)
+ {
+ updateMessages();
+ mInputEditor->setFocus(TRUE);
+ }
+
+}
+
void LLIMFloater::setVisible(BOOL visible)
{
LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*>
@@ -730,21 +743,6 @@ void LLIMFloater::setVisible(BOOL visible)
channel->redrawToasts();
}
- BOOL is_minimized = visible && isChatMultiTab()
- ? LLIMFloaterContainer::getInstance()->isMinimized()
- : !visible;
-
- if (!is_minimized && mChatHistory && mInputEditor)
- {
- //only if floater was construced and initialized from xml
- updateMessages();
- //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781)
- if (!isChatMultiTab() || hasFocus())
- {
- mInputEditor->setFocus(TRUE);
- }
- }
-
if(!visible)
{
LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID);
@@ -757,7 +755,10 @@ void LLIMFloater::setVisible(BOOL visible)
if (visible && isInVisibleChain())
{
sIMFloaterShowedSignal(mSessionID);
+
}
+
+ setFocus(visible);
}
BOOL LLIMFloater::getVisible()
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 5ed1d1ab35..26daf00afd 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -65,6 +65,7 @@ public:
// LLView overrides
/*virtual*/ BOOL postBuild();
+ /*virtual*/ void setFocus(BOOL focusFlag);
/*virtual*/ void setVisible(BOOL visible);
/*virtual*/ BOOL getVisible();
// Check typing timeout timer.
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 5f111b39d4..c9c7e94af9 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -44,6 +44,7 @@
#include "llfloateravatarpicker.h"
#include "llfloaterpreference.h"
#include "llimview.h"
+#include "llnotificationsutil.h"
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
#include "llconversationview.h"
@@ -98,19 +99,23 @@ LLIMFloaterContainer::~LLIMFloaterContainer()
void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
{
LLIMFloater::addToHost(session_id, true);
- addConversationListItem(session_id);
+ addConversationListItem(session_id, true);
+}
+
+void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
+{
+ setItemSelect(session_id);
}
void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
{
LLIMFloater::addToHost(session_id, true);
- addConversationListItem(session_id);
+ addConversationListItem(session_id, true);
}
void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
{
- removeConversationListItem(old_session_id);
- addConversationListItem(new_session_id);
+ addConversationListItem(new_session_id, removeConversationListItem(old_session_id));
}
void LLIMFloaterContainer::sessionRemoved(const LLUUID& session_id)
@@ -142,6 +147,9 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsListPanel = getChild<LLPanel>("conversations_list_panel");
+ // Open IM session with selected participant on double click event
+ mConversationsListPanel->setDoubleClickCallback(boost::bind(&LLIMFloaterContainer::doToSelected, this, LLSD("im")));
+
// Create the root model and view for all conversation sessions
LLConversationItem* base_item = new LLConversationItem(getRootViewModel());
@@ -823,59 +831,67 @@ void LLIMFloaterContainer::getParticipantUUIDs(uuid_vec_t& selected_uuids)
void LLIMFloaterContainer::doToParticipants(const std::string& command, uuid_vec_t& selectedIDS)
{
- if(selectedIDS.size() > 0)
-{
- const LLUUID userID = selectedIDS.front();
+ if(selectedIDS.size() > 0)
+ {
+ const LLUUID& userID = selectedIDS.front();
- if ("view_profile" == command)
- {
- LLAvatarActions::showProfile(userID);
- }
- else if("im" == command)
- {
- LLAvatarActions::startIM(userID);
- }
- else if("offer_teleport" == command)
- {
- LLAvatarActions::offerTeleport(selectedIDS);
- }
- else if("voice_call" == command)
- {
- LLAvatarActions::startCall(userID);
- }
- else if("chat_history" == command)
- {
- LLAvatarActions::viewChatHistory(userID);
- }
- else if("add_friend" == command)
- {
- LLAvatarActions::requestFriendshipDialog(userID);
- }
- else if("remove_friend" == command)
- {
- LLAvatarActions::removeFriendDialog(userID);
- }
- else if("invite_to_group" == command)
- {
- LLAvatarActions::inviteToGroup(userID);
- }
- else if("map" == command)
- {
- LLAvatarActions::showOnMap(userID);
- }
- else if("share" == command)
- {
- LLAvatarActions::share(userID);
- }
- else if("pay" == command)
- {
- LLAvatarActions::pay(userID);
- }
- else if("block_unblock" == command)
- {
- LLAvatarActions::toggleBlock(userID);
- }
-}
+ if ("view_profile" == command)
+ {
+ LLAvatarActions::showProfile(userID);
+ }
+ else if("im" == command)
+ {
+ LLAvatarActions::startIM(userID);
+ }
+ else if("offer_teleport" == command)
+ {
+ LLAvatarActions::offerTeleport(selectedIDS);
+ }
+ else if("voice_call" == command)
+ {
+ LLAvatarActions::startCall(userID);
+ }
+ else if("chat_history" == command)
+ {
+ LLAvatarActions::viewChatHistory(userID);
+ }
+ else if("add_friend" == command)
+ {
+ LLAvatarActions::requestFriendshipDialog(userID);
+ }
+ else if("remove_friend" == command)
+ {
+ LLAvatarActions::removeFriendDialog(userID);
+ }
+ else if("invite_to_group" == command)
+ {
+ LLAvatarActions::inviteToGroup(userID);
+ }
+ else if("map" == command)
+ {
+ LLAvatarActions::showOnMap(userID);
+ }
+ else if("share" == command)
+ {
+ LLAvatarActions::share(userID);
+ }
+ else if("pay" == command)
+ {
+ LLAvatarActions::pay(userID);
+ }
+ else if("block_unblock" == command)
+ {
+ LLAvatarActions::toggleBlock(userID);
+ }
+ else if("selected" == command || "mute_all" == command || "unmute_all" == command)
+ {
+ moderateVoice(command, userID);
+ }
+ else if ("toggle_allow_text_chat" == command)
+ {
+ toggleAllowTextChat(userID);
+ }
+ }
}
void LLIMFloaterContainer::doToSelectedConversation(const std::string& command, uuid_vec_t& selectedIDS)
@@ -956,10 +972,16 @@ void LLIMFloaterContainer::doToSelectedGroup(const LLSD& userdata)
bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
- uuid_vec_t mUUIDs;
- getParticipantUUIDs(mUUIDs);
+ uuid_vec_t uuids;
+ getParticipantUUIDs(uuids);
+
+ if(item == std::string("can_activate_group"))
+ {
+ LLUUID selected_group_id = getCurSelectedViewModelItem()->getUUID();
+ return gAgent.getGroupID() != selected_group_id;
+ }
- if(mUUIDs.size() <= 0)
+ if(uuids.size() <= 0)
{
return false;
}
@@ -969,7 +991,7 @@ bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
if (item == std::string("can_block"))
{
- const LLUUID& id = mUUIDs.front();
+ const LLUUID& id = uuids.front();
return LLAvatarActions::canBlock(id);
}
else if (item == std::string("can_add"))
@@ -979,7 +1001,7 @@ bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
// - and there are no friends among selection yet.
//EXT-7389 - disable for more than 1
- if(mUUIDs.size() > 1)
+ if(uuids.size() > 1)
{
return false;
}
@@ -987,8 +1009,8 @@ bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
bool result = true;
uuid_vec_t::const_iterator
- id = mUUIDs.begin(),
- uuids_end = mUUIDs.end();
+ id = uuids.begin(),
+ uuids_end = uuids.end();
for (;id != uuids_end; ++id)
{
@@ -1007,11 +1029,11 @@ bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
// - there are selected people
// - and there are only friends among selection.
- bool result = (mUUIDs.size() > 0);
+ bool result = (uuids.size() > 0);
uuid_vec_t::const_iterator
- id = mUUIDs.begin(),
- uuids_end = mUUIDs.end();
+ id = uuids.begin(),
+ uuids_end = uuids.end();
for (;id != uuids_end; ++id)
{
@@ -1030,15 +1052,20 @@ bool LLIMFloaterContainer::enableContextMenuItem(const LLSD& userdata)
}
else if (item == std::string("can_show_on_map"))
{
- const LLUUID& id = mUUIDs.front();
+ const LLUUID& id = uuids.front();
return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id))
|| gAgent.isGodlike();
}
else if(item == std::string("can_offer_teleport"))
{
- return LLAvatarActions::canOfferTeleport(mUUIDs);
+ return LLAvatarActions::canOfferTeleport(uuids);
}
+ else if("can_moderate_voice" == item || "can_allow_text_chat" == item || "can_mute" == item || "can_unmute" == item)
+ {
+ return enableModerateContextMenuItem(item);
+ }
+
return false;
}
@@ -1050,15 +1077,25 @@ bool LLIMFloaterContainer::checkContextMenuItem(const LLSD& userdata)
if(mUUIDs.size() > 0 )
{
- if (item == std::string("is_blocked"))
- {
- return LLAvatarActions::isBlocked(mUUIDs.front());
- }
+ if ("is_blocked" == item)
+ {
+ return LLAvatarActions::isBlocked(mUUIDs.front());
+ }
+ else if ("is_allowed_text_chat" == item)
+ {
+ const LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant());
+
+ if (NULL != speakerp)
+ {
+ return !speakerp->mModeratorMutedText;
+ }
+ }
}
return false;
}
+//Will select only the conversation item
void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)
{
LLFolderViewItem* widget = mConversationsWidgets[session_id];
@@ -1069,6 +1106,26 @@ void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)
}
}
+//Will select the conversation/participant item
+void LLIMFloaterContainer::setItemSelect(const LLUUID& session_id)
+{
+
+ if(mConversationsRoot->getCurSelectedItem() && mConversationsRoot->getCurSelectedItem()->getParentFolder())
+ {
+ //Retreive the conversation id. When a participant is selected, then have to to get the converation id from the parent.
+ LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(mConversationsRoot->getCurSelectedItem()->getParentFolder()->getViewModelItem());
+
+ //Will allow selection/highlighting of the conversation/participant
+ if(session_id != vmi->getUUID())
+ {
+ mSelectedSession = session_id;
+ LLFolderViewItem* widget = mConversationsWidgets[session_id];
+ (widget->getRoot())->setSelection(widget, FALSE, FALSE);
+ }
+ }
+}
+
+
void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id)
{
conversations_items_map::iterator item_it = mConversationsItems.find(session_id);
@@ -1115,7 +1172,7 @@ void LLIMFloaterContainer::setNearbyDistances()
}
}
-void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
+void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid, bool isWidgetSelected /*= false*/)
{
bool is_nearby_chat = uuid.isNull();
@@ -1170,7 +1227,10 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
current_participant_model++;
}
- setConvItemSelect(uuid);
+ if (isWidgetSelected)
+ {
+ setConvItemSelect(uuid);
+ }
// set the widget to minimized mode if conversations pane is collapsed
widget->toggleMinimizedMode(mConversationsPane->isCollapsed());
@@ -1178,17 +1238,19 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
return;
}
-void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus)
+bool LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool change_focus)
{
// Delete the widget and the associated conversation item
// Note : since the mConversationsItems is also the listener to the widget, deleting
// the widget will also delete its listener
+ bool isWidgetSelected = false;
conversations_widgets_map::iterator widget_it = mConversationsWidgets.find(uuid);
if (widget_it != mConversationsWidgets.end())
{
LLFolderViewItem* widget = widget_it->second;
if (widget)
{
+ isWidgetSelected = widget->isSelected();
widget->destroyView();
}
}
@@ -1204,10 +1266,12 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c
conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
if (widget_it != mConversationsWidgets.end())
{
+ mSelectedSession = widget_it->first;
LLFolderViewItem* widget = widget_it->second;
widget->selectItem();
}
}
+ return isWidgetSelected;
}
LLConversationViewSession* LLIMFloaterContainer::createConversationItemWidget(LLConversationItem* item)
@@ -1243,4 +1307,189 @@ LLConversationViewParticipant* LLIMFloaterContainer::createConversationViewParti
return LLUICtrlFactory::create<LLConversationViewParticipant>(params);
}
+bool LLIMFloaterContainer::enableModerateContextMenuItem(const std::string& userdata)
+{
+ // only group moderators can perform actions related to this "enable callback"
+ if (!isGroupModerator())
+ {
+ return false;
+ }
+
+ LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant());
+ if (NULL == speakerp)
+ {
+ return false;
+ }
+
+ bool voice_channel = speakerp->isInVoiceChannel();
+
+ if ("can_moderate_voice" == userdata)
+ {
+ return voice_channel;
+ }
+ else if ("can_mute" == userdata)
+ {
+ return voice_channel && !isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
+ else if ("can_unmute" == userdata)
+ {
+ return voice_channel && isMuted(getCurSelectedViewModelItem()->getUUID());
+ }
+
+ // The last invoke is used to check whether the "can_allow_text_chat" will enabled
+ return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID());
+}
+
+bool LLIMFloaterContainer::isGroupModerator()
+{
+ LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant();
+ if (NULL == speaker_manager)
+ {
+ llwarns << "Speaker manager is missing" << llendl;
+ return false;
+ }
+
+ // Is session a group call/chat?
+ if(gAgent.isInGroup(speaker_manager->getSessionID()))
+ {
+ LLSpeaker * speaker = speaker_manager->findSpeaker(gAgentID).get();
+
+ // Is agent a moderator?
+ return speaker && speaker->mIsModerator;
+ }
+
+ return false;
+}
+
+void LLIMFloaterContainer::moderateVoice(const std::string& command, const LLUUID& userID)
+{
+ if (!gAgent.getRegion()) return;
+
+ if (command.compare("selected"))
+ {
+ moderateVoiceAllParticipants(command.compare("mute_all"));
+ }
+ else
+ {
+ moderateVoiceParticipant(userID, isMuted(userID));
+ }
+}
+
+bool LLIMFloaterContainer::isMuted(const LLUUID& avatar_id)
+{
+ const LLSpeaker * speakerp = getSpeakerOfSelectedParticipant(getSpeakerMgrForSelectedParticipant());
+ return NULL == speakerp ? true : speakerp->mStatus == LLSpeaker::STATUS_MUTED;
+}
+
+void LLIMFloaterContainer::moderateVoiceAllParticipants(bool unmute)
+{
+ LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant());
+
+ if (NULL != speaker_managerp)
+ {
+ if (!unmute)
+ {
+ LLSD payload;
+ payload["session_id"] = speaker_managerp->getSessionID();
+ LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback);
+ return;
+ }
+
+ speaker_managerp->moderateVoiceAllParticipants(unmute);
+ }
+}
+
+// static
+void LLIMFloaterContainer::confirmMuteAllCallback(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ // if Cancel pressed
+ if (option == 1)
+ {
+ return;
+ }
+
+ const LLSD& payload = notification["payload"];
+ const LLUUID& session_id = payload["session_id"];
+
+ LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> (
+ LLIMModel::getInstance()->getSpeakerManager(session_id));
+ if (speaker_manager)
+ {
+ speaker_manager->moderateVoiceAllParticipants(false);
+ }
+
+ return;
+}
+
+void LLIMFloaterContainer::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
+{
+ LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr *>(getSpeakerMgrForSelectedParticipant());
+
+ if (NULL != speaker_managerp)
+ {
+ speaker_managerp->moderateVoiceParticipant(avatar_id, unmute);
+ }
+}
+
+LLSpeakerMgr * LLIMFloaterContainer::getSpeakerMgrForSelectedParticipant()
+{
+ LLFolderViewItem * selected_folder_itemp = mConversationsRoot->getCurSelectedItem();
+ if (NULL == selected_folder_itemp)
+ {
+ llwarns << "Current selected item is null" << llendl;
+ return NULL;
+ }
+
+ LLFolderViewFolder * conversation_itemp = selected_folder_itemp->getParentFolder();
+
+ conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin();
+ conversations_widgets_map::const_iterator end = mConversationsWidgets.end();
+ const LLUUID * conversation_uuidp = NULL;
+ while(iter != end)
+ {
+ if (iter->second == conversation_itemp)
+ {
+ conversation_uuidp = &iter->first;
+ break;
+ }
+ ++iter;
+ }
+ if (NULL == conversation_uuidp)
+ {
+ llwarns << "Cannot find conversation item widget" << llendl;
+ return NULL;
+ }
+
+ return conversation_uuidp->isNull() ? (LLSpeakerMgr *)LLLocalSpeakerMgr::getInstance()
+ : LLIMModel::getInstance()->getSpeakerManager(*conversation_uuidp);
+}
+
+LLSpeaker * LLIMFloaterContainer::getSpeakerOfSelectedParticipant(LLSpeakerMgr * speaker_managerp)
+{
+ if (NULL == speaker_managerp)
+ {
+ llwarns << "Speaker manager is missing" << llendl;
+ return NULL;
+ }
+
+ const LLConversationItem * participant_itemp = getCurSelectedViewModelItem();
+ if (NULL == participant_itemp)
+ {
+ llwarns << "Cannot evaluate current selected view model item" << llendl;
+ return NULL;
+ }
+
+ return speaker_managerp->findSpeaker(participant_itemp->getUUID());
+}
+
+void LLIMFloaterContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
+{
+ LLIMSpeakerMgr * speaker_managerp = dynamic_cast<LLIMSpeakerMgr*>(getSpeakerMgrForSelectedParticipant());
+ if (NULL != speaker_managerp)
+ {
+ speaker_managerp->toggleAllowTextChat(participant_uuid);
+ }
+}
+
// EOF
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index ceb054dfa3..ba2d085858 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -45,6 +45,8 @@ class LLLayoutPanel;
class LLLayoutStack;
class LLTabContainer;
class LLIMFloaterContainer;
+class LLSpeaker;
+class LLSpeakerMgr;
class LLIMFloaterContainer
: public LLMultiFloater
@@ -64,6 +66,7 @@ public:
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
void setConvItemSelect(const LLUUID& session_id);
+ void setItemSelect(const LLUUID& session_id);
/*virtual*/ void tabClose();
static LLFloater* getCurrentVoiceFloater();
@@ -81,11 +84,14 @@ public:
// LLIMSessionObserver observe triggers
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id);
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
LLConversationViewModel& getRootViewModel() { return mConversationViewModel; }
+ LLUUID getSelectedSession() { return mSelectedSession; }
+ void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; }
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
@@ -122,6 +128,17 @@ private:
bool checkContextMenuItem(const LLSD& userdata);
bool enableContextMenuItem(const LLSD& userdata);
+ static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response);
+ bool enableModerateContextMenuItem(const std::string& userdata);
+ LLSpeaker * getSpeakerOfSelectedParticipant(LLSpeakerMgr * speaker_managerp);
+ LLSpeakerMgr * getSpeakerMgrForSelectedParticipant();
+ bool isGroupModerator();
+ bool isMuted(const LLUUID& avatar_id);
+ void moderateVoice(const std::string& command, const LLUUID& userID);
+ void moderateVoiceAllParticipants(bool unmute);
+ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
+ void toggleAllowTextChat(const LLUUID& participant_uuid);
+
LLButton* mExpandCollapseBtn;
LLLayoutPanel* mMessagesPane;
LLLayoutPanel* mConversationsPane;
@@ -133,8 +150,8 @@ private:
// Conversation list implementation
public:
- void removeConversationListItem(const LLUUID& uuid, bool change_focus = true);
- void addConversationListItem(const LLUUID& uuid);
+ bool removeConversationListItem(const LLUUID& uuid, bool change_focus = true);
+ void addConversationListItem(const LLUUID& uuid, bool isWidgetSelected = false);
void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id);
void setNearbyDistances();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b45903835a..115da54ec8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -647,8 +647,6 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con
{
mId2SessionMap.erase(old_session_id);
mId2SessionMap[new_session_id] = session;
-
- gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id);
}
LLIMFloater* im_floater = LLIMFloater::findInstance(old_session_id);
@@ -657,6 +655,11 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con
im_floater->sessionInitReplyReceived(new_session_id);
}
+ if (old_session_id != new_session_id)
+ {
+ gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id);
+ }
+
// auto-start the call on session initialization?
if (session->mStartCallOnInitialize)
{
@@ -2650,10 +2653,17 @@ LLUUID LLIMMgr::addSession(
}
}
+ //Notify observers that a session was added
if (new_session)
{
LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice);
}
+ //Notifies observers that the session was already added
+ else
+ {
+ std::string session_name = LLIMModel::getInstance()->getName(session_id);
+ LLIMMgr::getInstance()->notifyObserverSessionActivated(session_id, session_name, other_participant_id);
+ }
//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
if (!new_session) return session_id;
@@ -2956,6 +2966,14 @@ void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::st
}
}
+void LLIMMgr::notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
+{
+ for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)
+ {
+ (*it)->sessionActivated(session_id, name, other_participant_id);
+ }
+}
+
void LLIMMgr::notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id)
{
for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 82cfa394a6..00b67f520c 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -303,6 +303,7 @@ class LLIMSessionObserver
public:
virtual ~LLIMSessionObserver() {}
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0;
+ virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0;
virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) = 0;
virtual void sessionRemoved(const LLUUID& session_id) = 0;
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) = 0;
@@ -469,6 +470,8 @@ private:
static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group);
void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ //Triggers when a session has already been added
+ void notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
void notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id);
void notifyObserverSessionRemoved(const LLUUID& session_id);
void notifyObserverSessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 139713b96e..28c2edbe84 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -577,7 +577,7 @@ void hide_context_entries(LLMenuGL& menu,
// descend into split menus:
LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(menu_item);
- if ((name == "More") && branchp)
+ if (NULL != branchp)
{
hide_context_entries(*branchp->getBranch(), entries_to_show, disabled_entries);
}
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index b96b486868..a89ae4a2dc 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -271,14 +271,27 @@ void LLNearbyChat::removeScreenChat()
}
}
-void LLNearbyChat::setVisible(BOOL visible)
+void LLNearbyChat::setFocus(BOOL focusFlag)
{
- if(visible)
- {
- removeScreenChat();
- }
+ LLTransientDockableFloater::setFocus(focusFlag);
+
+ //Redirect focus to input editor
+ if (focusFlag)
+ {
+ mInputEditor->setFocus(TRUE);
+ }
+
+}
+void LLNearbyChat::setVisible(BOOL visible)
+{
LLIMConversation::setVisible(visible);
+
+ if(visible)
+ {
+ removeScreenChat();
+ }
+ setFocus(visible);
}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 93168ba96a..7ada4daea8 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -52,7 +52,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
-
+ /*virtual*/ void setFocus(BOOL focusFlag);
/*virtual*/ void setVisible(BOOL visible);
void loadHistory();
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 4a63585ed5..dcecce6fe4 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -115,8 +115,8 @@ void LLPanelMarketplaceInbox::onFocusReceived()
if (sidepanel_inventory)
{
sidepanel_inventory->clearSelections(true, false);
- }
-
+ }
+
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
@@ -167,8 +167,8 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const
if (inbox_item_view && inbox_item_view->isFresh())
{
fresh_item_count++;
- }
- }
+ }
+ }
}
}
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 90226e7fba..b263143bd1 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -213,7 +213,6 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source,
LLConversationItemSession(data_source->getSessionID(), root_view_model),
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
- mParticipantListMenu(NULL),
mExcludeAgent(exclude_agent),
mValidateSpeakerCallback(NULL)
{
@@ -248,8 +247,6 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source,
if (use_context_menu)
{
- //mParticipantListMenu = new LLParticipantListMenu(*this);
- //mAvatarList->setContextMenu(mParticipantListMenu);
mAvatarList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
}
else
@@ -316,20 +313,6 @@ LLParticipantList::~LLParticipantList()
mAvatarListToggleIconsConnection.disconnect();
}
- // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged()
- // See ticket EXT-3427
- // hide menu before deleting it to stop enable and check handlers from triggering.
- if(mParticipantListMenu && !LLApp::isExiting())
- {
- mParticipantListMenu->hide();
- }
-
- if (mParticipantListMenu)
- {
- delete mParticipantListMenu;
- mParticipantListMenu = NULL;
- }
-
if (mAvatarList)
{
mAvatarList->setContextMenu(NULL);
@@ -786,350 +769,6 @@ bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::
return mParent.onSpeakerMuteEvent(event, userdata);
}
-/*LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
-{
- // set up the callbacks for all of the avatar menu items
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
- LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
-
- registrar.add("ParticipantList.Sort", boost::bind(&LLParticipantList::LLParticipantListMenu::sortParticipantList, this, _2));
- registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2));
- registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2));
-
- registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, mUUIDs.front()));
- registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, mUUIDs.front()));
- registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs.front()));
- registrar.add("Avatar.BlockUnblock", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteVoice, this, _2));
- registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, mUUIDs.front()));
- registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs.front()));
- registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, mUUIDs.front()));
-
- registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2));
-
- enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2));
- enable_registrar.add("ParticipantList.EnableItem.Moderate", boost::bind(&LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem, this, _2));
- enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2));
-
- // create the context menu from the XUI
- LLContextMenu* main_menu = createFromFile("menu_participant_list.xml");
-
- // Don't show sort options for P2P chat
- bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1);
- main_menu->setItemVisible("SortByName", is_sort_visible);
- main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible);
- main_menu->setItemVisible("Moderator Options Separator", isGroupModerator());
- main_menu->setItemVisible("Moderator Options", isGroupModerator());
- main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected());
- main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected());
- main_menu->arrangeAndClear();
-
- return main_menu;
-}*/
-
-void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
-{
- if (uuids.size() == 0) return;
-
- LLListContextMenu::show(spawning_view, uuids, x, y);
-
- const LLUUID& speaker_id = mUUIDs.front();
- BOOL is_muted = isMuted(speaker_id);
-
- if (is_muted)
- {
- LLMenuGL::sMenuContainer->getChildView("ModerateVoiceMuteSelected")->setVisible( false);
- }
- else
- {
- LLMenuGL::sMenuContainer->getChildView("ModerateVoiceUnMuteSelected")->setVisible( false);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::sortParticipantList(const LLSD& userdata)
-{
- std::string param = userdata.asString();
- if ("sort_by_name" == param)
- {
- mParent.setSortOrder(E_SORT_BY_NAME);
- }
- else if ("sort_by_recent_speakers" == param)
- {
- mParent.setSortOrder(E_SORT_BY_RECENT_SPEAKERS);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata)
-{
-
- LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr);
- if (mgr)
- {
- const LLUUID speaker_id = mUUIDs.front();
- mgr->toggleAllowTextChat(speaker_id);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags)
-{
- const LLUUID speaker_id = mUUIDs.front();
- BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, flags);
- std::string name;
-
- //fill in name using voice client's copy of name cache
- LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id);
- if (speakerp.isNull())
- {
- LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << llendl;
- return;
- }
- LLAvatarListItem* item = (mParent.mAvatarList ? dynamic_cast<LLAvatarListItem*>(mParent.mAvatarList->getItemByValue(speaker_id)) : NULL);
- if (NULL == item) return;
-
- name = item->getAvatarName();
-
- LLMute::EType mute_type;
- switch (speakerp->mType)
- {
- case LLSpeaker::SPEAKER_AGENT:
- mute_type = LLMute::AGENT;
- break;
- case LLSpeaker::SPEAKER_OBJECT:
- mute_type = LLMute::OBJECT;
- break;
- case LLSpeaker::SPEAKER_EXTERNAL:
- default:
- mute_type = LLMute::EXTERNAL;
- break;
- }
- LLMute mute(speaker_id, name, mute_type);
-
- if (!is_muted)
- {
- LLMuteList::getInstance()->add(mute, flags);
- }
- else
- {
- LLMuteList::getInstance()->remove(mute, flags);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata)
-{
- toggleMute(userdata, LLMute::flagTextChat);
-}
-
-void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userdata)
-{
- toggleMute(userdata, LLMute::flagVoiceChat);
-}
-
-bool LLParticipantList::LLParticipantListMenu::isGroupModerator()
-{
- if (!mParent.mSpeakerMgr)
- {
- llwarns << "Speaker manager is missing" << llendl;
- return false;
- }
-
- // Is session a group call/chat?
- if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID()))
- {
- LLSpeaker* speaker = mParent.mSpeakerMgr->findSpeaker(gAgentID).get();
-
- // Is agent a moderator?
- return speaker && speaker->mIsModerator;
- }
- return false;
-}
-
-bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id)
-{
- LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id);
- if (!selected_speakerp) return true;
-
- return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED;
-}
-
-void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata)
-{
- if (!gAgent.getRegion()) return;
-
- bool moderate_selected = userdata.asString() == "selected";
-
- if (moderate_selected)
- {
- const LLUUID& selected_avatar_id = mUUIDs.front();
- bool is_muted = isMuted(selected_avatar_id);
- moderateVoiceParticipant(selected_avatar_id, is_muted);
- }
- else
- {
- bool unmute_all = userdata.asString() == "unmute_all";
- moderateVoiceAllParticipants(unmute_all);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute)
-{
- LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr);
- if (mgr)
- {
- mgr->moderateVoiceParticipant(avatar_id, unmute);
- }
-}
-
-void LLParticipantList::LLParticipantListMenu::moderateVoiceAllParticipants(bool unmute)
-{
- LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr);
- if (mgr)
- {
- if (!unmute)
- {
- LLSD payload;
- payload["session_id"] = mgr->getSessionID();
- LLNotificationsUtil::add("ConfirmMuteAll", LLSD(), payload, confirmMuteAllCallback);
- return;
- }
-
- mgr->moderateVoiceAllParticipants(unmute);
- }
-}
-
-// static
-void LLParticipantList::LLParticipantListMenu::confirmMuteAllCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- // if Cancel pressed
- if (option == 1)
- {
- return;
- }
-
- const LLSD& payload = notification["payload"];
- const LLUUID& session_id = payload["session_id"];
-
- LLIMSpeakerMgr * speaker_manager = dynamic_cast<LLIMSpeakerMgr*> (
- LLIMModel::getInstance()->getSpeakerManager(session_id));
- if (speaker_manager)
- {
- speaker_manager->moderateVoiceAllParticipants(false);
- }
-
- return;
-}
-
-
-bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
-{
- std::string item = userdata.asString();
- const LLUUID& participant_id = mUUIDs.front();
-
- // For now non of "can_view_profile" action and menu actions listed below except "can_block"
- // can be performed for Avaline callers.
- bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id);
- if (!is_participant_avatar && "can_block" != item) return false;
-
- if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item
- || "can_pay" == item)
- {
- return mUUIDs.front() != gAgentID;
- }
- else if (item == std::string("can_add"))
- {
- // We can add friends if:
- // - there are selected people
- // - and there are no friends among selection yet.
-
- bool result = (mUUIDs.size() > 0);
-
- uuid_vec_t::const_iterator
- id = mUUIDs.begin(),
- uuids_end = mUUIDs.end();
-
- for (;id != uuids_end; ++id)
- {
- if ( *id == gAgentID || LLAvatarActions::isFriend(*id) )
- {
- result = false;
- break;
- }
- }
- return result;
- }
- else if (item == "can_call")
- {
- bool not_agent = mUUIDs.front() != gAgentID;
- bool can_call = not_agent && LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking();
- return can_call;
- }
-
- return true;
-}
-
-/*
- Processed menu items with such parameters:
- can_allow_text_chat
- can_moderate_voice
-*/
-bool LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem(const LLSD& userdata)
-{
- // only group moderators can perform actions related to this "enable callback"
- if (!isGroupModerator()) return false;
-
- const LLUUID& participant_id = mUUIDs.front();
- LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(participant_id);
-
- // not in voice participants can not be moderated
- bool speaker_in_voice = speakerp.notNull() && speakerp->isInVoiceChannel();
-
- const std::string& item = userdata.asString();
-
- if ("can_moderate_voice" == item)
- {
- return speaker_in_voice;
- }
-
- // For now non of menu actions except "can_moderate_voice" can be performed for Avaline callers.
- bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id);
- if (!is_participant_avatar) return false;
-
- return true;
-}
-
-bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata)
-{
- std::string item = userdata.asString();
- const LLUUID& id = mUUIDs.front();
-
- if (item == "is_muted")
- {
- return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat);
- }
- else if (item == "is_allowed_text_chat")
- {
- LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id);
-
- if (selected_speakerp.notNull())
- {
- return !selected_speakerp->mModeratorMutedText;
- }
- }
- else if(item == "is_blocked")
- {
- return LLMuteList::getInstance()->isMuted(id, LLMute::flagVoiceChat);
- }
- else if(item == "is_sorted_by_name")
- {
- return E_SORT_BY_NAME == mParent.getSortOrder();
- }
- else if(item == "is_sorted_by_recent_speakers")
- {
- return E_SORT_BY_RECENT_SPEAKERS == mParent.getSortOrder();
- }
-
- return false;
-}
-
bool LLParticipantList::LLAvatarItemRecentSpeakerComparator::doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const
{
if (mParent.mSpeakerMgr)
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index acee68873c..aaf1e070a5 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -160,79 +160,6 @@ protected:
};
/**
- * Menu used in the participant list.
- */
- class LLParticipantListMenu : public LLListContextMenu
- {
- public:
- LLParticipantListMenu(LLParticipantList& parent):mParent(parent){};
- /*virtual*/ LLContextMenu* createMenu();
- /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y);
- protected:
- LLParticipantList& mParent;
- private:
- bool enableContextMenuItem(const LLSD& userdata);
- bool enableModerateContextMenuItem(const LLSD& userdata);
- bool checkContextMenuItem(const LLSD& userdata);
-
- void sortParticipantList(const LLSD& userdata);
- void toggleAllowTextChat(const LLSD& userdata);
- void toggleMute(const LLSD& userdata, U32 flags);
- void toggleMuteText(const LLSD& userdata);
- void toggleMuteVoice(const LLSD& userdata);
-
- /**
- * Return true if Agent is group moderator(and moderator of group call).
- */
- bool isGroupModerator();
-
- // Voice moderation support
- /**
- * Check whether specified by argument avatar is muted for group chat or not.
- */
- bool isMuted(const LLUUID& avatar_id);
-
- /**
- * Processes Voice moderation menu items.
- *
- * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on
- * passed parameter.
- *
- * @param userdata can be "selected" or "others".
- *
- * @see moderateVoiceParticipant()
- * @see moderateVoiceAllParticipants()
- */
- void moderateVoice(const LLSD& userdata);
-
- /**
- * Mutes/Unmutes avatar for current group voice chat.
- *
- * It only marks avatar as muted for session and does not use local Agent's Block list.
- * It does not mute Agent itself.
- *
- * @param[in] avatar_id UUID of avatar to be processed
- * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted.
- *
- * @see moderateVoiceAllParticipants()
- */
- void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
-
- /**
- * Mutes/Unmutes all avatars for current group voice chat.
- *
- * It only marks avatars as muted for session and does not use local Agent's Block list.
- *
- * @param[in] unmute if true - avatars will be muted, otherwise - unmuted.
- *
- * @see moderateVoiceParticipant()
- */
- void moderateVoiceAllParticipants(bool unmute);
-
- static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response);
- };
-
- /**
* Comparator for comparing avatar items by last spoken time
*/
class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator, public LLRefCount
@@ -276,8 +203,6 @@ private:
LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener;
LLPointer<SpeakerMuteListener> mSpeakerMuteListener;
- LLParticipantListMenu* mParticipantListMenu;
-
/**
* This field manages an adding a new avatar_id in the mAvatarList
* If true, then agent_id wont be added into mAvatarList
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 70f3b5335e..c6b9aaae4b 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -240,8 +240,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseCoords[i].clear();
mBaseNormals[i].clear();
mBaseBinormals[i].clear();
- mTexCoords[i].clear();
- mWeights[i] = 0.f;
+ mWeights[i] = 0.f;
}
mNumVertices = numVertices;
return TRUE;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index ffb11a3f7e..850171d169 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -406,6 +406,16 @@ public:
LLPolySkeletalDistortion(LLVOAvatar *avatarp);
~LLPolySkeletalDistortion();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index d25d1420ee..bd96608641 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -73,9 +73,9 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -89,17 +89,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
}
}
-
//-----------------------------------------------------------------------------
// ~LLPolyMorphData()
//-----------------------------------------------------------------------------
LLPolyMorphData::~LLPolyMorphData()
{
- delete [] mVertexIndices;
- delete [] mCoords;
- delete [] mNormals;
- delete [] mBinormals;
- delete [] mTexCoords;
+ freeData();
}
//-----------------------------------------------------------------------------
@@ -119,11 +114,16 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-------------------------------------------------------------------------
+ // free any existing data
+ //-------------------------------------------------------------------------
+ freeData();
+
+ //-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
@@ -207,6 +207,42 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-----------------------------------------------------------------------------
+// freeData()
+//-----------------------------------------------------------------------------
+void LLPolyMorphData::freeData()
+{
+ if (mCoords != NULL)
+ {
+ ll_aligned_free_16(mCoords);
+ mCoords = NULL;
+ }
+
+ if (mNormals != NULL)
+ {
+ ll_aligned_free_16(mNormals);
+ mNormals = NULL;
+ }
+
+ if (mBinormals != NULL)
+ {
+ ll_aligned_free_16(mBinormals);
+ mBinormals = NULL;
+ }
+
+ if (mTexCoords != NULL)
+ {
+ delete [] mTexCoords;
+ mTexCoords = NULL;
+ }
+
+ if (mVertexIndices != NULL)
+ {
+ delete [] mVertexIndices;
+ mVertexIndices = NULL;
+ }
+}
+
+//-----------------------------------------------------------------------------
// LLPolyMorphTargetInfo()
//-----------------------------------------------------------------------------
LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 46e23b7792..678599d7e1 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -48,6 +48,16 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
@@ -67,6 +77,9 @@ public:
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
+
+private:
+ void freeData();
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index e62c9c3da5..6acbf82fd7 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1859,6 +1859,8 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
drawablep->setSpatialGroup(NULL);
}
+ drawablep->setSpatialGroup(NULL);
+
assert_octree_valid(mOctree);
return TRUE;
@@ -4194,7 +4196,7 @@ public:
{
if (index < 255)
{
- if (facep->mDrawInfo->mTextureList.size()<= index)
+ if (facep->mDrawInfo->mTextureList.size() <= index)
{
llerrs << "Face texture index out of bounds." << llendl;
}
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index f050df2b39..e63037b4a8 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -350,6 +350,8 @@ public:
element_list& getData() { return mOctreeNode->getData(); }
element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
+ bool hasElement(LLDrawable* drawablep) { return std::find(mOctreeNode->getDataBegin(), mOctreeNode->getDataEnd(), drawablep) != mOctreeNode->getDataEnd(); }
+
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
bool isEmpty() const { return mOctreeNode->isEmpty(); }
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 6be12711ac..378d5e0aa2 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -171,6 +171,7 @@ public:
// LLIMSessionObserver observe triggers
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 467115c928..ad09af6594 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -510,7 +510,13 @@ void LLTexLayerSetBuffer::doUpload()
BOOL valid = FALSE;
LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C;
S32 file_size = 0;
- U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size);
+
+ //data buffer MUST be allocated using LLImageBase
+ LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE);
+ file_size = file.getSize();
+ U8* data = integrity_test->allocateData(file_size);
+ file.read(data, file_size);
+
if (data)
{
valid = integrity_test->validate(data, file_size); // integrity_test will delete 'data'
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2c0da60b48..fffe20208f 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -67,6 +67,16 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@@ -143,6 +153,16 @@ public:
LLTexLayerParamColor( LLVOAvatar* avatar );
/* virtual */ ~LLTexLayerParamColor();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 2ed7488b85..e8a4d8b2f2 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2950,7 +2950,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
~lcl_responder()
{
+ LL_CHECK_MEMORY
mFetcher->decrCurlPOSTCount();
+ LL_CHECK_MEMORY
}
// virtual
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index c58e1adb8c..db5ad9479c 100755
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -263,8 +263,8 @@ public :
EService mService;
};
- typedef boost::intrusive_ptr<TranslationReceiver> TranslationReceiverPtr;
- typedef boost::intrusive_ptr<KeyVerificationReceiver> KeyVerificationReceiverPtr;
+ typedef LLPointer<TranslationReceiver> TranslationReceiverPtr;
+ typedef LLPointer<KeyVerificationReceiver> KeyVerificationReceiverPtr;
/**
* Translate given text.
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 6da9296ea3..7990b81d92 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5126,12 +5126,6 @@ class LLEditDelete : public view_listener_t
}
};
-bool enable_object_return()
-{
- return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
- (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
-}
-
void handle_spellcheck_replace_with_suggestion(const LLUICtrl* ctrl, const LLSD& param)
{
const LLContextMenu* menu = dynamic_cast<const LLContextMenu*>(ctrl->getParent());
@@ -5204,6 +5198,12 @@ bool enable_spellcheck_add_to_ignore(const LLUICtrl* ctrl)
return (spellcheck_handler) && (spellcheck_handler->canAddToIgnore());
}
+bool enable_object_return()
+{
+ return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
+ (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
+}
+
bool enable_object_delete()
{
bool new_value =
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 81cbc3b6c3..775280ca34 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3394,9 +3394,9 @@ public :
{
}
- static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args)
+ static ChatTranslationReceiver* build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args)
{
- return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args));
+ return new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args);
}
protected:
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index b2e6dc4571..2fe6cd578b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -237,6 +237,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTimeDilation(1.f),
mRotTime(0.f),
mAngularVelocityRot(),
+ mPreviousRotation(),
mState(0),
mMedia(NULL),
mClickAction(0),
@@ -784,7 +785,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
-
+
if (parentp && mDrawable->isActive())
{
parentp->makeActive();
@@ -1410,9 +1411,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#else
val = (U16 *) &data[count];
#endif
- setAngularVelocity( U16_to_F32(val[VX], -size, size),
+ new_angv.set(U16_to_F32(val[VX], -size, size),
U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size));
+ setAngularVelocity(new_angv);
break;
case 16:
@@ -1436,9 +1438,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
- setAngularVelocity( U8_to_F32(data[13], -size, size),
+ new_angv.set(U8_to_F32(data[13], -size, size),
U8_to_F32(data[14], -size, size),
U8_to_F32(data[15], -size, size) );
+ setAngularVelocity(new_angv);
break;
}
@@ -1510,9 +1513,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackU16(val[VX], "AccX");
dp->unpackU16(val[VY], "AccY");
dp->unpackU16(val[VZ], "AccZ");
- setAngularVelocity( U16_to_F32(val[VX], -64.f, 64.f),
+ new_angv.set(U16_to_F32(val[VX], -64.f, 64.f),
U16_to_F32(val[VY], -64.f, 64.f),
U16_to_F32(val[VZ], -64.f, 64.f));
+ setAngularVelocity(new_angv);
}
break;
case OUT_FULL_COMPRESSED:
@@ -1556,8 +1560,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (value & 0x80)
{
- dp->unpackVector3(vec, "Omega");
- setAngularVelocity(vec);
+ dp->unpackVector3(new_angv, "Omega");
+ setAngularVelocity(new_angv);
}
if (value & 0x20)
@@ -2038,12 +2042,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- if (new_rot != getRotation()
- || new_angv != old_angv)
+ if ((new_rot != getRotation())
+ || (new_angv != old_angv))
+ {
+ if (new_rot != mPreviousRotation)
{
- if (new_angv != old_angv)
+ resetRot();
+ }
+ else if (new_angv != old_angv)
{
- if (flagUsePhysics())
+ if (flagUsePhysics() || new_angv.isExactlyZero())
{
resetRot();
}
@@ -2053,6 +2061,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
+ // Remember the last rotation value
+ mPreviousRotation = new_rot;
+
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
setChanged(ROTATED | SILHOUETTE);
@@ -2159,28 +2170,28 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
if (!mDead)
{
- // CRO - don't velocity interp linked objects!
- // Leviathan - but DO velocity interp joints
- if (!mStatic && sVelocityInterpolate && !isSelected())
- {
- // calculate dt from last update
- F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
- F32 dt = mTimeDilation * dt_raw;
+ // CRO - don't velocity interp linked objects!
+ // Leviathan - but DO velocity interp joints
+ if (!mStatic && sVelocityInterpolate && !isSelected())
+ {
+ // calculate dt from last update
+ F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
+ F32 dt = mTimeDilation * dt_raw;
applyAngularVelocity(dt);
-
+
if (isAttachment())
- {
- mLastInterpUpdateSecs = time;
+ {
+ mLastInterpUpdateSecs = time;
return;
- }
- else
- { // Move object based on it's velocity and rotation
- interpolateLinearMotion(time, dt);
- }
}
+ else
+ { // Move object based on it's velocity and rotation
+ interpolateLinearMotion(time, dt);
+ }
+ }
- updateDrawable(FALSE);
+ updateDrawable(FALSE);
}
}
@@ -4080,7 +4091,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos
return retval;
}
-
+//virtual
void LLViewerObject::changeTEImage(S32 index, LLViewerTexture* new_image)
{
if(index < 0 || index >= getNumTEs())
@@ -5384,9 +5395,9 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
mPhysicsShapeUnknown = false;
if (type != mPhysicsShapeType)
{
- mPhysicsShapeType = type;
- mCostStale = true;
- }
+ mPhysicsShapeType = type;
+ mCostStale = true;
+}
}
void LLViewerObject::setPhysicsGravity(F32 gravity)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 22e0de681e..1fb30db8f2 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -322,7 +322,7 @@ public:
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
/*virtual*/ BOOL setMaterial(const U8 material);
virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
- void changeTEImage(S32 index, LLViewerTexture* new_image) ;
+ virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ;
LLViewerTexture *getTEImage(const U8 te) const;
void fitFaceTexture(const U8 face);
@@ -725,6 +725,7 @@ protected:
F32 mTimeDilation; // Time dilation sent with the object.
F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
+ LLQuaternion mPreviousRotation;
U8 mState; // legacy
LLViewerObjectMedia* mMedia; // NULL if no media associated
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 05c7ef5381..47a99d7ea4 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -255,10 +255,9 @@ public:
}
}
- static boost::intrusive_ptr<BaseCapabilitiesComplete> build( U64 region_handle, S32 id )
+ static BaseCapabilitiesComplete* build( U64 region_handle, S32 id )
{
- return boost::intrusive_ptr<BaseCapabilitiesComplete>(
- new BaseCapabilitiesComplete(region_handle, id) );
+ return new BaseCapabilitiesComplete(region_handle, id);
}
private:
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 403288b2fd..4e37a9043d 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -283,7 +283,7 @@ private:
struct Line
{
Line(const std::string& in_text, S32 in_x, S32 in_y) : text(in_text), x(in_x), y(in_y) {}
- std::string text;
+ std::string text;
S32 x,y;
};
@@ -2561,9 +2561,16 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
// If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
// no view has keyboard focus, this is a printable character key (and no modifier key is
// pressed except shift), then give focus to nearby chat (STORM-560)
- if ( nearby_chat && gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
+ if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
!keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) )
{
+ // Initialize nearby chat if it's missing
+ if (!nearby_chat)
+ {
+ LLSD name("im_container");
+ LLFloaterReg::toggleInstanceOrBringToFront(name);
+ }
+
LLChatEntry* chat_editor = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat")->getChatBox();
if (chat_editor)
{
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 958282f1eb..b73c2a20ab 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1803,6 +1803,18 @@ void LLVOVolume::setNumTEs(const U8 num_tes)
return ;
}
+//virtual
+void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep)
+{
+ BOOL changed = (mTEImages[index] != imagep);
+ LLViewerObject::changeTEImage(index, imagep);
+ if (changed)
+ {
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ }
+}
+
void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep)
{
BOOL changed = (mTEImages[te] != imagep);
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 0082f2e991..5482c80f2b 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -173,6 +173,7 @@ public:
/*virtual*/ void setScale(const LLVector3 &scale, BOOL damped);
+ /*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) ;
/*virtual*/ void setNumTEs(const U8 num_tes);
/*virtual*/ void setTEImage(const U8 te, LLViewerTexture *imagep);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index c7ebaf6fbe..ba047487f5 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2313,7 +2313,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
bound_shader = true;
gOcclusionCubeProgram.bind();
}
-
+
if (sUseOcclusion > 1)
{
if (mCubeVB.isNull())
@@ -2491,7 +2491,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
{
gOcclusionCubeProgram.bind();
}
- }
+ }
if (mCubeVB.isNull())
{ //cube VB will be used for issuing occlusion queries
@@ -2548,11 +2548,6 @@ void LLPipeline::updateGL()
glu->mInQ = FALSE;
LLGLUpdate::sGLQ.pop_front();
}
-
- { //seed VBO Pools
- LLFastTimer t(FTM_SEED_VBO_POOLS);
- LLVertexBuffer::seedPools();
- }
}
{ //seed VBO Pools
@@ -3336,11 +3331,11 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderPhysicalBeacons(LLDrawable* drawablep)
{
@@ -3365,11 +3360,11 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderMOAPBeacons(LLDrawable* drawablep)
{
@@ -3405,11 +3400,11 @@ void renderMOAPBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderParticleBeacons(LLDrawable* drawablep)
{
@@ -3434,11 +3429,11 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderSoundHighlights(LLDrawable* drawablep)
{
@@ -3456,11 +3451,11 @@ void renderSoundHighlights(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void LLPipeline::postSort(LLCamera& camera)
{
@@ -3673,7 +3668,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (facep)
{
gPipeline.mSelectedFaces.push_back(facep);
- }
+ }
}
return true;
}
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index c4c4defab9..856f91e214 100644
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -21,6 +21,7 @@
<menu_item_call label="Beschäftigt" name="Set Busy"/>
</menu>
<menu_item_call label="L$ kaufen..." name="Buy and Sell L$"/>
+ <menu_item_call label="Händler-Outbox..." name="MerchantOutbox"/>
<menu_item_call label="Kontoübersicht..." name="Manage My Account">
<menu_item_call.on_click name="ManageMyAccount_url" parameter="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=de"/>
</menu_item_call>
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 8cd0463de8..2b542595c5 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -255,11 +255,12 @@
bottom="0"
expand_lines_count="5"
follows="left|right|bottom"
- font="SansSerifSmall"
+ font="SansSerifSmall"
visible="true"
height="20"
is_expandable="true"
label="To"
+ text_tentative_color="TextFgTentativeColor"
layout="bottomleft"
name="chat_editor"
max_length="1023"
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index 9bc5c7d5a4..4a457fb929 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -6,7 +6,7 @@
height="395"
width="1075"
min_height="395"
- min_width="1075"
+ min_width="990"
layout="topleft"
name="floater_pathfinding_linksets"
help_topic="floater_pathfinding_linksets"
@@ -524,7 +524,7 @@
tool_tip="Walkability for characters of type D. Example character type is other."
width="45" />
<button
- follows="right|bottom"
+ follows="left|bottom"
height="21"
label="Apply changes"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 2e29c61cb2..6021ba0a5a 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -134,16 +134,6 @@
top_delta="-25"
name="Pipette"
width="28" />
- <check_box
- follows="left|bottom"
- height="20"
- initial_value="true"
- label="Live Preview"
- layout="topleft"
- left="4"
- name="apply_immediate_check"
- top="262"
- width="120" />
<text
follows="left|bottom"
height="20"
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 912ff811d9..2e9bda5804 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -117,6 +117,7 @@
layout="topleft"
name="activate_group">
<on_click function="Group.DoToSelected" parameter="activate_group"/>
+ <on_enable function="Avatar.EnableItem" parameter="can_activate_group" />
</menu_item_call>
<menu_item_call
label="Leave Group"
@@ -124,4 +125,49 @@
name="leave_group">
<on_click function="Group.DoToSelected" parameter="leave_group"/>
</menu_item_call>
+ <menu_item_separator
+ layout="topleft"
+ name="Moderator Options Separator"/>
+ <context_menu
+ label="Moderator Options"
+ layout="topleft"
+ name="Moderator Options">
+ <menu_item_check
+ label="Allow text chat"
+ layout="topleft"
+ name="AllowTextChat">
+ <on_check function="Avatar.CheckItem" parameter="is_allowed_text_chat" />
+ <on_click function="Avatar.DoToSelected" parameter="toggle_allow_text_chat" />
+ <on_enable function="Avatar.EnableItem" parameter="can_allow_text_chat" />
+ </menu_item_check>
+ <menu_item_separator layout="topleft" name="moderate_voice_separator" />
+ <menu_item_call
+ label="Mute this participant"
+ layout="topleft"
+ name="ModerateVoiceMuteSelected">
+ <on_click function="Avatar.DoToSelected" parameter="selected" />
+ <on_enable function="Avatar.EnableItem" parameter="can_mute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unmute this participant"
+ layout="topleft"
+ name="ModerateVoiceUnMuteSelected">
+ <on_click function="Avatar.DoToSelected" parameter="selected" />
+ <on_enable function="Avatar.EnableItem" parameter="can_unmute" />
+ </menu_item_call>
+ <menu_item_call
+ label="Mute everyone"
+ layout="topleft"
+ name="ModerateVoiceMute">
+ <on_click function="Avatar.DoToSelected" parameter="mute_all" />
+ <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
+ </menu_item_call>
+ <menu_item_call
+ label="Unmute everyone"
+ layout="topleft"
+ name="ModerateVoiceUnmute">
+ <on_click function="Avatar.DoToSelected" parameter="unmute_all" />
+ <on_enable function="Avatar.EnableItem" parameter="can_moderate_voice" />
+ </menu_item_call>
+ </context_menu>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 606fdd33d9..4410f41e29 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -7637,18 +7637,6 @@ We cannot display a preview of this texture because it is no-copy and/or no-tran
<notification
icon="alertmodal.tga"
- name="LivePreviewUnavailable"
- type="alert">
-
-We cannot display a preview of this texture because it is no-copy and/or no-transfer.
- <usetemplate
- ignoretext="Warn me that Live Preview mode is not available for no-copy and/or no-transfer textures"
- name="okignore"
- yestext="OK"/>
- </notification>
-
- <notification
- icon="alertmodal.tga"
name="ConfirmLeaveCall"
type="alert">
Are you sure you want to leave this call?
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index e9a787cef0..e69a17e037 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- height="570"
- layout="topleft"
- name="object properties"
- help_topic="object_properties"
- title="Object Profile"
- width="333">
- <panel.string
- name="text deed continued">
- Deed
- </panel.string>
- <panel.string
- name="text deed">
- Deed
- </panel.string>
- <panel.string
- name="text modify info 1">
- You can modify this object
- </panel.string>
- <panel.string
- name="text modify info 2">
- You can modify these objects
- </panel.string>
- <panel.string
- name="text modify info 3">
- You can't modify this object
- </panel.string>
- <panel.string
- name="text modify info 4">
- You can't modify these objects
- </panel.string>
- <panel.string
+ height="570"
+ layout="topleft"
+ name="object properties"
+ help_topic="object_properties"
+ title="Object Profile"
+ width="333">
+ <panel.string
+ name="text deed continued">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text deed">
+ Deed
+ </panel.string>
+ <panel.string
+ name="text modify info 1">
+ You can modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 2">
+ You can modify these objects
+ </panel.string>
+ <panel.string
+ name="text modify info 3">
+ You can't modify this object
+ </panel.string>
+ <panel.string
+ name="text modify info 4">
+ You can't modify these objects
+ </panel.string>
+ <panel.string
name="text modify info 5">
You can't modify this object across a region boundary
</panel.string>
@@ -39,399 +39,399 @@
You can't modify these objects across a region boundary
</panel.string>
<panel.string
- name="text modify warning">
- This object has linked parts
- </panel.string>
- <panel.string
- name="Cost Default">
- Price: L$
- </panel.string>
- <panel.string
- name="Cost Total">
- Total Price: L$
- </panel.string>
- <panel.string
- name="Cost Per Unit">
- Price Per: L$
- </panel.string>
- <panel.string
- name="Cost Mixed">
- Mixed Price
- </panel.string>
- <panel.string
- name="Sale Mixed">
- Mixed Sale
- </panel.string>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- left="8"
- name="back_btn"
- tab_stop="false"
- top="0"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHuge"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- use_ellipses="true"
- value="Object Profile"
- width="290" />
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="where"
- text_color="LtGray_50"
- value="(Inworld)"
- width="150" />
- <panel
- follows="all"
- height="490"
- label=""
- layout="topleft"
- left="10"
- help_topic=""
- name="properties_panel"
- top="45"
- width="313"
- background_visible="true"
- bg_alpha_color="DkGray2">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Name:"
- top="10"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="20"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="Object Name"
- top_delta="0"
- width="225" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="5"
- name="Description:"
- top_pad="10"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="23"
- layout="topleft"
- name="Object Description"
- select_on_focus="true"
- left_delta="78"
- max_length_bytes="127"
- top_delta="-5"
- width="225"/>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="CreatorNameLabel"
- top_pad="12"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Creator Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Owner:"
- top_pad="15"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- follows="left|right|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="0"
- name="Owner Name"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="225">
- TestString PleaseIgnore
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="23"
- layout="topleft"
- left="5"
- name="Group_label"
- top_pad="15"
- width="78">
- Group:
- </text>
+ name="text modify warning">
+ This object has linked parts
+ </panel.string>
+ <panel.string
+ name="Cost Default">
+ Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Total">
+ Total Price: L$
+ </panel.string>
+ <panel.string
+ name="Cost Per Unit">
+ Price Per: L$
+ </panel.string>
+ <panel.string
+ name="Cost Mixed">
+ Mixed Price
+ </panel.string>
+ <panel.string
+ name="Sale Mixed">
+ Mixed Sale
+ </panel.string>
<button
- follows="top|left"
- height="10"
- image_disabled="Activate_Checkmark"
- image_selected="Activate_Checkmark"
- image_unselected="Activate_Checkmark"
- image_color="White_50"
- layout="topleft"
- left_pad="0"
- top_delta="0"
- name="button set group"
- tab_stop="false"
- tool_tip="Choose a group to share this object's permissions"
- width="10" />
- <name_box
- follows="left|top"
- height="18"
- initial_value="Loading..."
- layout="topleft"
- left_pad="5"
- top_delta="-1"
- name="Group Name Proxy"
- width="150" />
- <button
- follows="top|left"
- height="23"
- label="Deed"
- label_selected="Deed"
- layout="topleft"
- name="button deed"
- top_pad="0"
- left="81"
- tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="9"
- layout="topleft"
- top_pad="5"
- left="5"
- name="label click action"
- width="280">
- Click to:
- </text>
- <combo_box
- follows="left|top"
- height="23"
- layout="topleft"
- name="clickaction"
- width="168"
- left="81">
- <combo_box.item
- label="Touch (default)"
- name="Touch/grab(default)"
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ left="8"
+ name="back_btn"
+ tab_stop="false"
+ top="0"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHuge"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ use_ellipses="true"
+ value="Object Profile"
+ width="290" />
+ <text
+ follows="top|left"
+ height="13"
+ layout="topleft"
+ left="45"
+ name="where"
+ text_color="LtGray_50"
+ value="(Inworld)"
+ width="150" />
+ <panel
+ follows="all"
+ height="490"
+ label=""
+ layout="topleft"
+ left="10"
+ help_topic=""
+ name="properties_panel"
+ top="45"
+ width="313"
+ background_visible="true"
+ bg_alpha_color="DkGray2">
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Name:"
+ top="10"
+ width="78">
+ Name:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="20"
+ layout="topleft"
+ left_delta="78"
+ max_length_bytes="63"
+ name="Object Name"
+ top_delta="0"
+ width="225" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="5"
+ name="Description:"
+ top_pad="10"
+ width="78">
+ Description:
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ name="Object Description"
+ select_on_focus="true"
+ left_delta="78"
+ max_length_bytes="127"
+ top_delta="-5"
+ width="225"/>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="CreatorNameLabel"
+ top_pad="12"
+ width="78">
+ Creator:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Creator Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Owner:"
+ top_pad="15"
+ width="78">
+ Owner:
+ </text>
+ <text
+ type="string"
+ follows="left|right|top"
+ font="SansSerifSmall"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="Owner Name"
+ top_delta="0"
+ translate="false"
+ use_ellipses="true"
+ width="225">
+ TestString PleaseIgnore
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left="5"
+ name="Group_label"
+ top_pad="15"
+ width="78">
+ Group:
+ </text>
+ <button
+ follows="top|left"
+ height="10"
+ image_disabled="Activate_Checkmark"
+ image_selected="Activate_Checkmark"
+ image_unselected="Activate_Checkmark"
+ image_color="White_50"
+ layout="topleft"
+ left_pad="0"
+ top_delta="0"
+ name="button set group"
+ tab_stop="false"
+ tool_tip="Choose a group to share this object's permissions"
+ width="10" />
+ <name_box
+ follows="left|top"
+ height="18"
+ initial_value="Loading..."
+ layout="topleft"
+ left_pad="5"
+ top_delta="-1"
+ name="Group Name Proxy"
+ width="150" />
+ <button
+ follows="top|left"
+ height="23"
+ label="Deed"
+ label_selected="Deed"
+ layout="topleft"
+ name="button deed"
+ top_pad="0"
+ left="81"
+ tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer."
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="9"
+ layout="topleft"
+ top_pad="5"
+ left="5"
+ name="label click action"
+ width="280">
+ Click to:
+ </text>
+ <combo_box
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ name="clickaction"
+ width="168"
+ left="81">
+ <combo_box.item
+ label="Touch (default)"
+ name="Touch/grab(default)"
value="Touch" />
- <combo_box.item
- label="Sit on object"
- name="Sitonobject"
+ <combo_box.item
+ label="Sit on object"
+ name="Sitonobject"
value="Sit" />
- <combo_box.item
- label="Buy object"
- name="Buyobject"
+ <combo_box.item
+ label="Buy object"
+ name="Buyobject"
value="Buy" />
- <combo_box.item
- label="Pay object"
- name="Payobject"
+ <combo_box.item
+ label="Pay object"
+ name="Payobject"
value="Pay" />
- <combo_box.item
- label="Open"
- name="Open"
- value="Open" />
- </combo_box>
- <panel
- border="false"
- follows="left|top"
- layout="topleft"
- mouse_opaque="false"
- background_visible="true"
- bg_alpha_color="DkGray"
- name="perms_inv"
- left="0"
- top_pad="15"
- height="135"
- width="313">
- <text
- type="string"
- length="1"
+ <combo_box.item
+ label="Open"
+ name="Open"
+ value="Open" />
+ </combo_box>
+ <panel
+ border="false"
+ follows="left|top"
+ layout="topleft"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_alpha_color="DkGray"
+ name="perms_inv"
+ left="0"
+ top_pad="15"
+ height="135"
+ width="313">
+ <text
+ type="string"
+ length="1"
left="5"
- top_pad="15"
- text_color="EmphasisColor"
- height="15"
- follows="left|top|right"
- layout="topleft"
- name="perm_modify"
- width="310">
- You can modify this object
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Anyone can:"
- top_pad="8"
- width="100">
- Anyone:
- </text>
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox allow everyone copy"
- top_delta="-2"
- width="90" />
- <check_box
- height="18"
- label="Move"
- layout="topleft"
- name="checkbox allow everyone move"
- left_pad="0"
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="8"
- width="100">
- Group:
- </text>
- <check_box
- height="18"
- label="Share"
- layout="topleft"
- left_pad="90"
- top_delta="-2"
- name="checkbox share with group"
- tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
- width="150" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="8"
- width="200"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="18"
- label="Modify"
- layout="topleft"
- left="20"
- top_pad="0"
- name="checkbox next owner can modify"
- width="90" />
- <check_box
- height="18"
- label="Copy"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can copy"
- width="90" />
- <check_box
- height="18"
- label="Transfer"
- layout="topleft"
- left_pad="0"
- name="checkbox next owner can transfer"
- tool_tip="Next owner can give away or resell this object"
- width="106" />
- </panel>
- <check_box
- height="23"
- label="For Sale"
- layout="topleft"
- left="20"
- name="checkbox for sale"
- top_pad="10"
- width="100" />
- <combo_box
- height="23"
- left_pad="0"
- layout="topleft"
- follows="left|top"
- name="sale type"
- width="170">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
+ top_pad="15"
+ text_color="EmphasisColor"
+ height="15"
+ follows="left|top|right"
+ layout="topleft"
+ name="perm_modify"
+ width="310">
+ You can modify this object
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="Anyone can:"
+ top_pad="8"
+ width="100">
+ Anyone:
+ </text>
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox allow everyone copy"
+ top_delta="-2"
+ width="90" />
+ <check_box
+ height="18"
+ label="Move"
+ layout="topleft"
+ name="checkbox allow everyone move"
+ left_pad="0"
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="GroupLabel"
+ top_pad="8"
+ width="100">
+ Group:
+ </text>
+ <check_box
+ height="18"
+ label="Share"
+ layout="topleft"
+ left_pad="90"
+ top_delta="-2"
+ name="checkbox share with group"
+ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+ width="150" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="NextOwnerLabel"
+ top_pad="8"
+ width="200"
+ word_wrap="true">
+ Next owner:
+ </text>
+ <check_box
+ height="18"
+ label="Modify"
+ layout="topleft"
+ left="20"
+ top_pad="0"
+ name="checkbox next owner can modify"
+ width="90" />
+ <check_box
+ height="18"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can copy"
+ width="90" />
+ <check_box
+ height="18"
+ label="Transfer"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can transfer"
+ tool_tip="Next owner can give away or resell this object"
+ width="106" />
+ </panel>
+ <check_box
+ height="23"
+ label="For Sale"
+ layout="topleft"
+ left="20"
+ name="checkbox for sale"
+ top_pad="10"
+ width="100" />
+ <combo_box
+ height="23"
+ left_pad="0"
+ layout="topleft"
+ follows="left|top"
+ name="sale type"
+ width="170">
+ <combo_box.item
+ name="Copy"
+ label="Copy"
+ value="2" />
+ <combo_box.item
+ name="Contents"
+ label="Contents"
+ value="3" />
+ <combo_box.item
+ name="Original"
+ label="Original"
+ value="1" />
+ </combo_box>
+ <spinner
follows="left|top"
decimal_digits="0"
increment="1"
@@ -445,17 +445,17 @@
min_val="1"
height="20"
max_val="999999999" />
- <check_box
- height="20"
- width="110"
- top_pad="6"
- label="Show in search"
- layout="topleft"
- left="120"
- name="search_check"
- tool_tip="Let people see this object in search results" />
- <text
- type="string"
+ <check_box
+ height="20"
+ width="110"
+ top_pad="6"
+ label="Show in search"
+ layout="topleft"
+ left="120"
+ name="search_check"
+ tool_tip="Let people see this object in search results" />
+ <text
+ type="string"
follows="left|top"
name="pathfinding_attributes_label"
top_pad="6"
@@ -466,7 +466,7 @@
<text
type="string"
follows="left|top"
- text_color="EmphasisColor"
+ text_color="EmphasisColor"
name="pathfinding_attributes_value"
width="130"
word_wrap="false"
@@ -475,120 +475,120 @@
<text
type="string"
text_color="EmphasisColor"
- length="1"
+ length="1"
top_pad="10"
- follows="left|top"
- layout="topleft"
- left="10"
- name="B:"
- height="10"
- width="50">
- B:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="O:"
- height="10"
- width="50">
- O:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="G:"
- height="10"
- width="50">
- G:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- left_pad="0"
- layout="topleft"
- name="E:"
- height="10"
- width="50">
- E:
- </text>
- <text
- type="string"
- text_color="EmphasisColor"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="N:"
- height="10"
- width="50">
- N:
- </text>
- <text
- type="string"
- text_color="White"
- length="1"
- follows="left|top"
- layout="topleft"
- left_pad="0"
- name="F:"
- height="10"
- width="50">
- F:
- </text>
- </panel>
- <panel
- height="25"
- layout="bottomright"
- name="button_panel"
- left="5"
- bottom="5"
- width="313">
- <button
- follows="bottom|left"
- height="23"
- label="Open"
- layout="topleft"
- left="5"
- name="open_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Pay"
- layout="topleft"
- left_pad="5"
- name="pay_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Buy"
- layout="topleft"
- left_pad="5"
- name="buy_btn"
- top="0"
- width="73" />
- <button
- follows="bottom|left"
- height="23"
- label="Details"
- layout="topleft"
- left_pad="5"
- name="details_btn"
- top="0"
- width="74" />
+ follows="left|top"
+ layout="topleft"
+ left="10"
+ name="B:"
+ height="10"
+ width="50">
+ B:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="O:"
+ height="10"
+ width="50">
+ O:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="G:"
+ height="10"
+ width="50">
+ G:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ left_pad="0"
+ layout="topleft"
+ name="E:"
+ height="10"
+ width="50">
+ E:
+ </text>
+ <text
+ type="string"
+ text_color="EmphasisColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="N:"
+ height="10"
+ width="50">
+ N:
+ </text>
+ <text
+ type="string"
+ text_color="White"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left_pad="0"
+ name="F:"
+ height="10"
+ width="50">
+ F:
+ </text>
+ </panel>
+ <panel
+ height="25"
+ layout="bottomright"
+ name="button_panel"
+ left="5"
+ bottom="5"
+ width="313">
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Open"
+ layout="topleft"
+ left="5"
+ name="open_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Pay"
+ layout="topleft"
+ left_pad="5"
+ name="pay_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Buy"
+ layout="topleft"
+ left_pad="5"
+ name="buy_btn"
+ top="0"
+ width="73" />
+ <button
+ follows="bottom|left"
+ height="23"
+ label="Details"
+ layout="topleft"
+ left_pad="5"
+ name="details_btn"
+ top="0"
+ width="74" />
- </panel>
+ </panel>
</panel>
diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp
index 10e37fae97..fd9527d631 100644
--- a/indra/newview/tests/lltranslate_test.cpp
+++ b/indra/newview/tests/lltranslate_test.cpp
@@ -299,11 +299,6 @@ LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLCo
std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
LLControlGroup::~LLControlGroup() {}
-namespace boost {
- void intrusive_ptr_add_ref(LLCurl::Responder*) {}
- void intrusive_ptr_release(LLCurl::Responder*) {}
-}
-
LLCurl::Responder::Responder() {}
void LLCurl::Responder::completedHeader(U32, std::string const&, LLSD const&) {}
void LLCurl::Responder::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t& buffer) {}
@@ -314,7 +309,7 @@ void LLCurl::Responder::result(LLSD const&) {}
LLCurl::Responder::~Responder() {}
void LLHTTPClient::get(const std::string&, const LLSD&, ResponderPtr, const LLSD&, const F32) {}
-void LLHTTPClient::get(const std::string&, boost::intrusive_ptr<LLCurl::Responder>, const LLSD&, const F32) {}
+void LLHTTPClient::get(const std::string&, LLPointer<LLCurl::Responder>, const LLSD&, const F32) {}
LLBufferStream::LLBufferStream(const LLChannelDescriptors& channels, LLBufferArray* buffer)
: std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) {}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d1c952ac3b..04118a5c87 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -537,6 +537,7 @@ class WindowsManifest(ViewerManifest):
result += 'File ' + pkg_file + '\n'
else:
result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
+
# at the end of a delete, just rmdir all the directories
if not install:
deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
@@ -1062,7 +1063,6 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libalut.so")
self.path("libopenal.so", "libopenal.so.1")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
-
# KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
# libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
# and libfontconfig.so. Before we added support for library-file
@@ -1081,7 +1081,13 @@ class Linux_i686Manifest(LinuxManifest):
# previous call did, without having to explicitly state the
# version number.
self.path("libfontconfig.so.*.*")
- self.path("libtcmalloc.so*") #formerly called google perf tools
+ try:
+ self.path("libtcmalloc.so*") #formerly called google perf tools
+ pass
+ except:
+ print "tcmalloc files not found, skipping"
+ pass
+
try:
self.path("libfmod-3.75.so")
pass
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index 4da774a5f6..5edbbf9914 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -51,37 +51,6 @@ public:
};
-class LLUpdateChecker::Implementation:
- public LLHTTPClient::Responder
-{
-public:
- Implementation(Client & client);
- ~Implementation();
- void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
-
- // Responder:
- virtual void completed(U32 status,
- const std::string & reason,
- const LLSD& content);
- virtual void error(U32 status, const std::string & reason);
-
-private:
- static const char * sProtocolVersion;
-
- Client & mClient;
- LLHTTPClient mHttpClient;
- bool mInProgress;
- std::string mVersion;
-
- std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
- std::string const & servicePath, std::string channel, std::string version);
-
- LOG_CLASS(LLUpdateChecker::Implementation);
-};
-
-
-
// LLUpdateChecker
//-----------------------------------------------------------------------------
@@ -134,13 +103,7 @@ void LLUpdateChecker::Implementation::checkVersion(std::string const & protocolV
std::string checkUrl = buildUrl(protocolVersion, hostUrl, servicePath, channel, version);
LL_INFOS("UpdateCheck") << "checking for updates at " << checkUrl << llendl;
- // The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the
- // passed object to be silently and automatically deleted. We pass a self-
- // referential intrusive pointer to which we add a reference to keep the
- // client from deleting the update checker implementation instance.
- LLHTTPClient::ResponderPtr temporaryPtr(this);
- boost::intrusive_ptr_add_ref(temporaryPtr.get());
- mHttpClient.get(checkUrl, temporaryPtr);
+ mHttpClient.get(checkUrl, this);
}
void LLUpdateChecker::Implementation::completed(U32 status,
diff --git a/indra/viewer_components/updater/llupdatechecker.h b/indra/viewer_components/updater/llupdatechecker.h
index d882169068..23f62a7c5e 100644
--- a/indra/viewer_components/updater/llupdatechecker.h
+++ b/indra/viewer_components/updater/llupdatechecker.h
@@ -29,6 +29,7 @@
#include <boost/shared_ptr.hpp>
+#include "llhttpclient.h"
//
// Implements asynchronous checking for updates.
@@ -36,7 +37,36 @@
class LLUpdateChecker {
public:
class Client;
- class Implementation;
+ class Implementation:
+
+ public LLHTTPClient::Responder
+ {
+ public:
+ Implementation(Client & client);
+ ~Implementation();
+ void checkVersion(std::string const & protocolVersion, std::string const & hostUrl,
+ std::string const & servicePath, std::string channel, std::string version);
+
+ // Responder:
+ virtual void completed(U32 status,
+ const std::string & reason,
+ const LLSD& content);
+ virtual void error(U32 status, const std::string & reason);
+
+ private:
+ static const char * sProtocolVersion;
+
+ Client & mClient;
+ LLHTTPClient mHttpClient;
+ bool mInProgress;
+ std::string mVersion;
+
+ std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
+ std::string const & servicePath, std::string channel, std::string version);
+
+ LOG_CLASS(LLUpdateChecker::Implementation);
+ };
+
// An exception that may be raised on check errors.
class CheckError;
@@ -48,7 +78,7 @@ public:
std::string const & servicePath, std::string channel, std::string version);
private:
- boost::shared_ptr<Implementation> mImplementation;
+ LLPointer<Implementation> mImplementation;
};