Merge viewer-release
commit
a219cf1c98
2
.hgtags
2
.hgtags
|
|
@ -498,3 +498,5 @@ bc61801f614022c920cb5c3df1d7d67a9561ce1f 3.7.22-release
|
|||
3be800e1afad9615442159e388d6d137be7b951e 3.7.23-release
|
||||
d3d0101e980ec95043e0af9b7903045d3bc447e4 3.7.24-release
|
||||
9978a8c3a2ffce4a5e1c186256581c2ac139c9dc 3.7.25-release
|
||||
000e9dda4162cbf0a83ba88558b19473654a09a9 3.7.26-release
|
||||
afd8d4756e8eda3c8f760625d1c17a2ad40ad6c8 3.7.27-release
|
||||
|
|
|
|||
|
|
@ -261,6 +261,9 @@ public:
|
|||
static std::vector< LLCharacter* > sInstances;
|
||||
static BOOL sAllowInstancesChange ; //debug use
|
||||
|
||||
virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
|
||||
const LLVector3& getHoverOffset() const { return mHoverOffset; }
|
||||
|
||||
protected:
|
||||
LLMotionController mMotionController;
|
||||
|
||||
|
|
@ -273,7 +276,6 @@ protected:
|
|||
U32 mSkeletonSerialNum;
|
||||
LLAnimPauseRequest mPauseRequest;
|
||||
|
||||
|
||||
private:
|
||||
// visual parameter stuff
|
||||
typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
|
||||
|
|
@ -284,6 +286,8 @@ private:
|
|||
visual_param_name_map_t mVisualParamNameMap;
|
||||
|
||||
static LLStringTable sVisualParamNames;
|
||||
|
||||
LLVector3 mHoverOffset;
|
||||
};
|
||||
|
||||
#endif // LL_LLCHARACTER_H
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ const LLVector3& LLJoint::getPosition()
|
|||
|
||||
bool do_debug_joint(const std::string& name)
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -361,7 +361,6 @@ void LLJoint::removeAttachmentPosOverride( const LLUUID& mesh_id, const std::str
|
|||
}
|
||||
updatePos(av_info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -64,22 +64,18 @@ protected:
|
|||
public:
|
||||
// Constructor
|
||||
LLJointState()
|
||||
{
|
||||
mUsage = 0;
|
||||
mJoint = NULL;
|
||||
mUsage = 0;
|
||||
mWeight = 0.f;
|
||||
mPriority = LLJoint::USE_MOTION_PRIORITY;
|
||||
}
|
||||
: mUsage(0)
|
||||
, mJoint(NULL)
|
||||
, mWeight(0.f)
|
||||
, mPriority(LLJoint::USE_MOTION_PRIORITY)
|
||||
{}
|
||||
|
||||
LLJointState(LLJoint* joint)
|
||||
{
|
||||
mUsage = 0;
|
||||
mJoint = joint;
|
||||
mUsage = 0;
|
||||
mWeight = 0.f;
|
||||
mPriority = LLJoint::USE_MOTION_PRIORITY;
|
||||
}
|
||||
: mUsage(0)
|
||||
, mJoint(joint)
|
||||
, mWeight(0.f)
|
||||
, mPriority(LLJoint::USE_MOTION_PRIORITY)
|
||||
{}
|
||||
|
||||
// joint that this state is applied to
|
||||
LLJoint* getJoint() { return mJoint; }
|
||||
|
|
|
|||
|
|
@ -118,6 +118,12 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
|
|||
|
||||
buffer_space = 64 - buffer_index; // how much space is left in buffer
|
||||
|
||||
// now, transform each 64-byte piece of the input, bypassing the buffer
|
||||
if (input == NULL || input_length == 0){
|
||||
std::cerr << "LLMD5::update: Invalid input!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// Transform as many times as possible.
|
||||
if (input_length >= buffer_space) { // ie. we have enough to fill the buffer
|
||||
// fill the rest of the buffer and transform
|
||||
|
|
@ -127,12 +133,6 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) {
|
|||
buffer_space);
|
||||
transform (buffer);
|
||||
|
||||
// now, transform each 64-byte piece of the input, bypassing the buffer
|
||||
if (input == NULL || input_length == 0){
|
||||
std::cerr << "LLMD5::update: Invalid input!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
for (input_index = buffer_space; input_index + 63 < input_length;
|
||||
input_index += 64)
|
||||
transform (input+input_index);
|
||||
|
|
|
|||
|
|
@ -63,13 +63,18 @@ LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sM
|
|||
|
||||
void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
|
||||
{
|
||||
#ifdef SHOW_ASSERT
|
||||
// Redundant, place to set breakpoints.
|
||||
if (ptr%alignment!=0)
|
||||
{
|
||||
LL_WARNS() << "alignment check failed" << LL_ENDL;
|
||||
}
|
||||
llassert(ptr%alignment==0);
|
||||
#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
|
||||
//do not check
|
||||
return;
|
||||
#else
|
||||
#ifdef SHOW_ASSERT
|
||||
// Redundant, place to set breakpoints.
|
||||
if (ptr%alignment!=0)
|
||||
{
|
||||
LL_WARNS() << "alignment check failed" << LL_ENDL;
|
||||
}
|
||||
llassert(ptr%alignment==0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -2148,3 +2153,60 @@ void LLPrivateMemoryPoolTester::fragmentationtest()
|
|||
}
|
||||
#endif
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN)
|
||||
|
||||
#include <map>
|
||||
|
||||
struct mem_info {
|
||||
std::map<void*, void*> memory_info;
|
||||
LLMutex mutex;
|
||||
|
||||
static mem_info& get() {
|
||||
static mem_info instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
private:
|
||||
mem_info(){}
|
||||
};
|
||||
|
||||
void* ll_aligned_malloc_fallback( size_t size, int align )
|
||||
{
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
|
||||
unsigned int for_alloc = sysinfo.dwPageSize;
|
||||
while(for_alloc < size) for_alloc += sysinfo.dwPageSize;
|
||||
|
||||
void *p = VirtualAlloc(NULL, for_alloc+sysinfo.dwPageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);
|
||||
if(NULL == p) {
|
||||
// call debugger
|
||||
__asm int 3;
|
||||
}
|
||||
DWORD old;
|
||||
BOOL Res = VirtualProtect((void*)((char*)p + for_alloc), sysinfo.dwPageSize, PAGE_NOACCESS, &old);
|
||||
if(FALSE == Res) {
|
||||
// call debugger
|
||||
__asm int 3;
|
||||
}
|
||||
|
||||
void* ret = (void*)((char*)p + for_alloc-size);
|
||||
|
||||
{
|
||||
LLMutexLock lock(&mem_info::get().mutex);
|
||||
mem_info::get().memory_info.insert(std::pair<void*, void*>(ret, p));
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ll_aligned_free_fallback( void* ptr )
|
||||
{
|
||||
LLMutexLock lock(&mem_info::get().mutex);
|
||||
VirtualFree(mem_info::get().memory_info.find(ptr)->second, 0, MEM_RELEASE);
|
||||
mem_info::get().memory_info.erase(ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -94,32 +94,44 @@ template <typename T> T* LL_NEXT_ALIGNED_ADDRESS_64(T* address)
|
|||
|
||||
#define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16)
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// for enable buffer overrun detection predefine LL_DEBUG_BUFFER_OVERRUN in current library
|
||||
// change preprocessro code to: #if 1 && defined(LL_WINDOWS)
|
||||
|
||||
inline void* ll_aligned_malloc_fallback( size_t size, int align )
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_malloc(size, align);
|
||||
#if 0 && defined(LL_WINDOWS)
|
||||
void* ll_aligned_malloc_fallback( size_t size, int align );
|
||||
void ll_aligned_free_fallback( void* ptr );
|
||||
//------------------------------------------------------------------------------------------------
|
||||
#else
|
||||
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
||||
char* aligned = ((char*)mem) + sizeof(void*);
|
||||
aligned += align - ((uintptr_t)aligned & (align - 1));
|
||||
|
||||
((void**)aligned)[-1] = mem;
|
||||
return aligned;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_fallback( void* ptr )
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
if (ptr)
|
||||
inline void* ll_aligned_malloc_fallback( size_t size, int align )
|
||||
{
|
||||
free( ((void**)ptr)[-1] );
|
||||
#if defined(LL_WINDOWS)
|
||||
return _aligned_malloc(size, align);
|
||||
#else
|
||||
void* mem = malloc( size + (align - 1) + sizeof(void*) );
|
||||
char* aligned = ((char*)mem) + sizeof(void*);
|
||||
aligned += align - ((uintptr_t)aligned & (align - 1));
|
||||
|
||||
((void**)aligned)[-1] = mem;
|
||||
return aligned;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ll_aligned_free_fallback( void* ptr )
|
||||
{
|
||||
#if defined(LL_WINDOWS)
|
||||
_aligned_free(ptr);
|
||||
#else
|
||||
if (ptr)
|
||||
{
|
||||
free( ((void**)ptr)[-1] );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
#if !LL_USE_TCMALLOC
|
||||
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
|
||||
|
|
|
|||
|
|
@ -125,6 +125,30 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
|
|||
return false;
|
||||
}
|
||||
|
||||
void ll_get_stack_trace_internal(std::vector<std::string>& lines)
|
||||
{
|
||||
const S32 MAX_STACK_DEPTH = 100;
|
||||
const S32 STRING_NAME_LENGTH = 256;
|
||||
|
||||
HANDLE process = GetCurrentProcess();
|
||||
SymInitialize( process, NULL, TRUE );
|
||||
|
||||
void *stack[MAX_STACK_DEPTH];
|
||||
|
||||
unsigned short frames = RtlCaptureStackBackTrace_fn( 0, MAX_STACK_DEPTH, stack, NULL );
|
||||
SYMBOL_INFO *symbol = (SYMBOL_INFO*)calloc(sizeof(SYMBOL_INFO) + STRING_NAME_LENGTH * sizeof(char), 1);
|
||||
symbol->MaxNameLen = STRING_NAME_LENGTH-1;
|
||||
symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
|
||||
|
||||
for(unsigned int i = 0; i < frames; i++)
|
||||
{
|
||||
SymFromAddr(process, (DWORD64)(stack[i]), 0, symbol);
|
||||
lines.push_back(symbol->Name);
|
||||
}
|
||||
|
||||
free( symbol );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
bool ll_get_stack_trace(std::vector<std::string>& lines)
|
||||
|
|
@ -132,5 +156,10 @@ bool ll_get_stack_trace(std::vector<std::string>& lines)
|
|||
return false;
|
||||
}
|
||||
|
||||
void ll_get_stack_trace_internal(std::vector<std::string>& lines)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <string>
|
||||
|
||||
LL_COMMON_API bool ll_get_stack_trace(std::vector<std::string>& lines);
|
||||
LL_COMMON_API void ll_get_stack_trace_internal(std::vector<std::string>& lines);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "linden_common.h"
|
||||
#include "lluriparser.h"
|
||||
|
||||
LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mRes(0)
|
||||
LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedTmp(false), mRes(0)
|
||||
{
|
||||
mState.uri = &mUri;
|
||||
|
||||
|
|
@ -118,17 +118,39 @@ void LLUriParser::fragment(const std::string& s)
|
|||
|
||||
void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
|
||||
{
|
||||
str = "";
|
||||
|
||||
if(&textRange == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(textRange.first == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(textRange.afterLast == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
S32 len = textRange.afterLast - textRange.first;
|
||||
if (len)
|
||||
{
|
||||
str = textRange.first;
|
||||
str = str.substr(0, len);
|
||||
str.assign(textRange.first, len);
|
||||
}
|
||||
}
|
||||
|
||||
void LLUriParser::extractParts()
|
||||
{
|
||||
if (mTmpScheme)
|
||||
if(&mUri == NULL)
|
||||
{
|
||||
LL_WARNS() << "mUri is NULL for uri: " << mNormalizedUri << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mTmpScheme || mNormalizedTmp)
|
||||
{
|
||||
mScheme.clear();
|
||||
}
|
||||
|
|
@ -157,6 +179,7 @@ void LLUriParser::extractParts()
|
|||
|
||||
S32 LLUriParser::normalize()
|
||||
{
|
||||
mNormalizedTmp = mTmpScheme;
|
||||
if (!mRes)
|
||||
{
|
||||
mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
|
||||
|
|
@ -175,29 +198,58 @@ S32 LLUriParser::normalize()
|
|||
if (!mRes)
|
||||
{
|
||||
mNormalizedUri = &label_buf[mTmpScheme ? 7 : 0];
|
||||
mTmpScheme = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mTmpScheme)
|
||||
{
|
||||
mNormalizedUri = mNormalizedUri.substr(7);
|
||||
mTmpScheme = false;
|
||||
}
|
||||
|
||||
return mRes;
|
||||
}
|
||||
|
||||
void LLUriParser::glue(std::string& uri) const
|
||||
{
|
||||
std::string first_part;
|
||||
glueFirst(first_part);
|
||||
|
||||
std::string second_part;
|
||||
glueSecond(second_part);
|
||||
|
||||
uri = first_part + second_part;
|
||||
}
|
||||
|
||||
void LLUriParser::glueFirst(std::string& uri) const
|
||||
{
|
||||
if (mScheme.size())
|
||||
{
|
||||
uri = mScheme;
|
||||
uri += "://";
|
||||
}
|
||||
else
|
||||
{
|
||||
uri.clear();
|
||||
}
|
||||
|
||||
uri += mHost;
|
||||
}
|
||||
|
||||
void LLUriParser::glueSecond(std::string& uri) const
|
||||
{
|
||||
if (mPort.size())
|
||||
{
|
||||
uri += ':';
|
||||
uri = ':';
|
||||
uri += mPort;
|
||||
}
|
||||
else
|
||||
{
|
||||
uri.clear();
|
||||
}
|
||||
|
||||
uri += mPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public:
|
|||
|
||||
void extractParts();
|
||||
void glue(std::string& uri) const;
|
||||
void glueFirst(std::string& uri) const;
|
||||
void glueSecond(std::string& uri) const;
|
||||
bool test() const;
|
||||
S32 normalize();
|
||||
|
||||
|
|
@ -79,6 +81,7 @@ private:
|
|||
|
||||
S32 mRes;
|
||||
bool mTmpScheme;
|
||||
bool mNormalizedTmp;
|
||||
};
|
||||
|
||||
#endif // LL_LLURIPARSER_H
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@ bool LLImageDecodeThread::ImageRequest::processRequest()
|
|||
mFormattedImage->getComponents());
|
||||
}
|
||||
done = mFormattedImage->decode(mDecodedImageRaw, decode_time_slice); // 1ms
|
||||
mDecodedRaw = done;
|
||||
// some decoders are removing data when task is complete and there were errors
|
||||
mDecodedRaw = done && mDecodedImageRaw->getData();
|
||||
}
|
||||
if (done && mNeedsAux && !mDecodedAux && mFormattedImage.notNull())
|
||||
{
|
||||
|
|
@ -155,7 +156,7 @@ bool LLImageDecodeThread::ImageRequest::processRequest()
|
|||
1);
|
||||
}
|
||||
done = mFormattedImage->decodeChannels(mDecodedImageAux, decode_time_slice, 4, 4); // 1ms
|
||||
mDecodedAux = done;
|
||||
mDecodedAux = done && mDecodedImageAux->getData();
|
||||
}
|
||||
|
||||
return done;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ LLImageRaw::~LLImageRaw() { }
|
|||
void LLImageRaw::deleteData() { }
|
||||
U8* LLImageRaw::allocateData(S32 size) { return NULL; }
|
||||
U8* LLImageRaw::reallocateData(S32 size) { return NULL; }
|
||||
const U8* LLImageBase::getData() const { return NULL; }
|
||||
U8* LLImageBase::getData() { return NULL; }
|
||||
|
||||
// End Stubbing
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -248,8 +248,8 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
|
|||
// compute the starting step-size
|
||||
F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ]));
|
||||
F32 step_length = bounding_radius - minimum_radius;
|
||||
S32 step_count = 0;
|
||||
S32 max_step_count = 12;
|
||||
//S32 step_count = 0;
|
||||
//S32 max_step_count = 12;
|
||||
F32 half_milimeter = 0.0005f;
|
||||
|
||||
// wander the center around in search of tighter solutions
|
||||
|
|
@ -258,7 +258,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector<LLSphere>& sphere_list)
|
|||
S32 last_dz = 2;
|
||||
|
||||
while (step_length > half_milimeter
|
||||
&& step_count < max_step_count)
|
||||
/*&& step_count < max_step_count*/)
|
||||
{
|
||||
// the algorithm for testing the maximum radius could be expensive enough
|
||||
// that it makes sense to NOT duplicate testing when possible, so we keep
|
||||
|
|
|
|||
|
|
@ -2685,6 +2685,17 @@ void LLVolume::setMeshAssetLoaded(BOOL loaded)
|
|||
mIsMeshAssetLoaded = loaded;
|
||||
}
|
||||
|
||||
void LLVolume::copyFacesTo(std::vector<LLVolumeFace> &faces) const
|
||||
{
|
||||
faces = mVolumeFaces;
|
||||
}
|
||||
|
||||
void LLVolume::copyFacesFrom(const std::vector<LLVolumeFace> &faces)
|
||||
{
|
||||
mVolumeFaces = faces;
|
||||
mSculptLevel = 0;
|
||||
}
|
||||
|
||||
void LLVolume::copyVolumeFaces(const LLVolume* volume)
|
||||
{
|
||||
mVolumeFaces = volume->mVolumeFaces;
|
||||
|
|
@ -5970,7 +5981,10 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
|
|||
}
|
||||
else
|
||||
{ //degenerate, make up a value
|
||||
normal.set(0,0,1);
|
||||
if(normal.getF32ptr()[2] >= 0)
|
||||
normal.set(0.f,0.f,1.f);
|
||||
else
|
||||
normal.set(0.f,0.f,-1.f);
|
||||
}
|
||||
|
||||
llassert(llfinite(normal.getF32ptr()[0]));
|
||||
|
|
@ -6284,6 +6298,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
|
|||
num_vertices = mNumS*mNumT;
|
||||
num_indices = (mNumS-1)*(mNumT-1)*6;
|
||||
|
||||
partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build;
|
||||
|
||||
if (!partial_build)
|
||||
{
|
||||
resizeVertices(num_vertices);
|
||||
|
|
|
|||
|
|
@ -993,6 +993,7 @@ public:
|
|||
void resizePath(S32 length);
|
||||
const LLAlignedArray<LLVector4a,64>& getMesh() const { return mMesh; }
|
||||
const LLVector4a& getMeshPt(const U32 i) const { return mMesh[i]; }
|
||||
|
||||
|
||||
void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); }
|
||||
|
||||
|
|
@ -1045,6 +1046,8 @@ public:
|
|||
|
||||
void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level);
|
||||
void copyVolumeFaces(const LLVolume* volume);
|
||||
void copyFacesTo(std::vector<LLVolumeFace> &faces) const;
|
||||
void copyFacesFrom(const std::vector<LLVolumeFace> &faces);
|
||||
void cacheOptimize();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,
|
|||
mPeakBPSOut(0.f),
|
||||
mPeriodTime(0.0),
|
||||
mExistenceTimer(),
|
||||
mAckCreationTime(0.f),
|
||||
mCurrentResendCount(0),
|
||||
mLastPacketGap(0),
|
||||
mHeartbeatInterval(circuit_heartbeat_interval),
|
||||
|
|
@ -1078,60 +1079,69 @@ BOOL LLCircuitData::collectRAck(TPACKETID packet_num)
|
|||
}
|
||||
|
||||
mAcks.push_back(packet_num);
|
||||
if (mAckCreationTime == 0)
|
||||
{
|
||||
mAckCreationTime = getAgeInSeconds();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// this method is called during the message system processAcks() to
|
||||
// send out any acks that did not get sent already.
|
||||
void LLCircuit::sendAcks()
|
||||
void LLCircuit::sendAcks(F32 collect_time)
|
||||
{
|
||||
collect_time = llclamp(collect_time, 0.f, LL_COLLECT_ACK_TIME_MAX);
|
||||
LLCircuitData* cd;
|
||||
circuit_data_map::iterator end = mSendAckMap.end();
|
||||
for(circuit_data_map::iterator it = mSendAckMap.begin(); it != end; ++it)
|
||||
circuit_data_map::iterator it = mSendAckMap.begin();
|
||||
while (it != mSendAckMap.end())
|
||||
{
|
||||
cd = (*it).second;
|
||||
|
||||
circuit_data_map::iterator cur_it = it++;
|
||||
cd = (*cur_it).second;
|
||||
S32 count = (S32)cd->mAcks.size();
|
||||
if(count > 0)
|
||||
F32 age = cd->getAgeInSeconds() - cd->mAckCreationTime;
|
||||
if (age > collect_time || count == 0)
|
||||
{
|
||||
// send the packet acks
|
||||
S32 acks_this_packet = 0;
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
if (count>0)
|
||||
{
|
||||
if(acks_this_packet == 0)
|
||||
// send the packet acks
|
||||
S32 acks_this_packet = 0;
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
gMessageSystem->newMessageFast(_PREHASH_PacketAck);
|
||||
if(acks_this_packet == 0)
|
||||
{
|
||||
gMessageSystem->newMessageFast(_PREHASH_PacketAck);
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_Packets);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ID, cd->mAcks[i]);
|
||||
++acks_this_packet;
|
||||
if(acks_this_packet > 250)
|
||||
{
|
||||
gMessageSystem->sendMessage(cd->mHost);
|
||||
acks_this_packet = 0;
|
||||
}
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_Packets);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ID, cd->mAcks[i]);
|
||||
++acks_this_packet;
|
||||
if(acks_this_packet > 250)
|
||||
if(acks_this_packet > 0)
|
||||
{
|
||||
gMessageSystem->sendMessage(cd->mHost);
|
||||
acks_this_packet = 0;
|
||||
}
|
||||
}
|
||||
if(acks_this_packet > 0)
|
||||
{
|
||||
gMessageSystem->sendMessage(cd->mHost);
|
||||
}
|
||||
|
||||
if(gMessageSystem->mVerboseLog)
|
||||
{
|
||||
std::ostringstream str;
|
||||
str << "MSG: -> " << cd->mHost << "\tPACKET ACKS:\t";
|
||||
std::ostream_iterator<TPACKETID> append(str, " ");
|
||||
std::copy(cd->mAcks.begin(), cd->mAcks.end(), append);
|
||||
LL_INFOS() << str.str() << LL_ENDL;
|
||||
}
|
||||
if(gMessageSystem->mVerboseLog)
|
||||
{
|
||||
std::ostringstream str;
|
||||
str << "MSG: -> " << cd->mHost << "\tPACKET ACKS:\t";
|
||||
std::ostream_iterator<TPACKETID> append(str, " ");
|
||||
std::copy(cd->mAcks.begin(), cd->mAcks.end(), append);
|
||||
LL_INFOS() << str.str() << LL_ENDL;
|
||||
}
|
||||
|
||||
// empty out the acks list
|
||||
cd->mAcks.clear();
|
||||
// empty out the acks list
|
||||
cd->mAcks.clear();
|
||||
cd->mAckCreationTime = 0.f;
|
||||
}
|
||||
// remove data map
|
||||
mSendAckMap.erase(cur_it);
|
||||
}
|
||||
}
|
||||
|
||||
// All acks have been sent, clear the map
|
||||
mSendAckMap.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ const U8 LL_PACKET_ID_SIZE = 6;
|
|||
|
||||
const S32 LL_MAX_RESENT_PACKETS_PER_FRAME = 100;
|
||||
const S32 LL_MAX_ACKED_PACKETS_PER_FRAME = 200;
|
||||
const F32 LL_COLLECT_ACK_TIME_MAX = 2.f;
|
||||
|
||||
//
|
||||
// Prototypes and Predefines
|
||||
|
|
@ -237,6 +238,7 @@ protected:
|
|||
packet_time_map mPotentialLostPackets;
|
||||
packet_time_map mRecentlyReceivedReliablePackets;
|
||||
std::vector<TPACKETID> mAcks;
|
||||
F32 mAckCreationTime; // first ack creation time
|
||||
|
||||
typedef std::map<TPACKETID, LLReliablePacket *> reliable_map;
|
||||
typedef reliable_map::iterator reliable_iter;
|
||||
|
|
@ -302,7 +304,7 @@ public:
|
|||
|
||||
// this method is called during the message system processAcks()
|
||||
// to send out any acks that did not get sent already.
|
||||
void sendAcks();
|
||||
void sendAcks(F32 collect_time);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& s, LLCircuit &circuit);
|
||||
void getInfo(LLSD& info) const;
|
||||
|
|
@ -333,6 +335,7 @@ protected:
|
|||
circuit_data_map mCircuitData;
|
||||
|
||||
typedef std::set<LLCircuitData *, LLCircuitData::less> ping_set_t; // Circuits sorted by next ping time
|
||||
|
||||
ping_set_t mPingSet;
|
||||
|
||||
// This variable points to the last circuit data we found to
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ S32 LLMessageSystem::getReceiveBytes() const
|
|||
}
|
||||
|
||||
|
||||
void LLMessageSystem::processAcks()
|
||||
void LLMessageSystem::processAcks(F32 collect_time)
|
||||
{
|
||||
F64Seconds mt_sec = getMessageTimeSeconds();
|
||||
{
|
||||
|
|
@ -813,7 +813,7 @@ void LLMessageSystem::processAcks()
|
|||
mCircuitInfo.resendUnackedPackets(mUnackedListDepth, mUnackedListSize);
|
||||
|
||||
//cycle through ack list for each host we need to send acks to
|
||||
mCircuitInfo.sendAcks();
|
||||
mCircuitInfo.sendAcks(collect_time);
|
||||
|
||||
if (!mDenyTrustedCircuitSet.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ public:
|
|||
|
||||
BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received
|
||||
BOOL checkMessages( S64 frame_count = 0 );
|
||||
void processAcks();
|
||||
void processAcks(F32 collect_time = 0.f);
|
||||
|
||||
BOOL isMessageFast(const char *msg);
|
||||
BOOL isMessage(const char *msg)
|
||||
|
|
|
|||
|
|
@ -1383,5 +1383,7 @@ char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->
|
|||
char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData");
|
||||
char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion");
|
||||
char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion");
|
||||
char const* const _PREHASH_AppearanceHover = LLMessageStringTable::getInstance()->getString("AppearanceHover");
|
||||
char const* const _PREHASH_HoverHeight = LLMessageStringTable::getInstance()->getString("HoverHeight");
|
||||
char const* const _PREHASH_Experience = LLMessageStringTable::getInstance()->getString("Experience");
|
||||
char const* const _PREHASH_ExperienceID = LLMessageStringTable::getInstance()->getString("ExperienceID");
|
||||
|
|
|
|||
|
|
@ -1383,6 +1383,8 @@ extern char const* const _PREHASH_GroupAVSounds;
|
|||
extern char const* const _PREHASH_AppearanceData;
|
||||
extern char const* const _PREHASH_AppearanceVersion;
|
||||
extern char const* const _PREHASH_CofVersion;
|
||||
extern char const* const _PREHASH_AppearanceHover;
|
||||
extern char const* const _PREHASH_HoverHeight;
|
||||
extern char const* const _PREHASH_Experience;
|
||||
extern char const* const _PREHASH_ExperienceID;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1681,11 +1681,11 @@ LLSD LLModel::writeModel(
|
|||
}
|
||||
}
|
||||
|
||||
F32* src_tc = (F32*) face.mTexCoords[j].mV;
|
||||
|
||||
//texcoord
|
||||
if (face.mTexCoords)
|
||||
{
|
||||
F32* src_tc = (F32*) face.mTexCoords[j].mV;
|
||||
|
||||
for (U32 k = 0; k < 2; ++k)
|
||||
{ //for each component
|
||||
//convert to 16-bit normalized
|
||||
|
|
@ -2012,7 +2012,7 @@ bool LLModel::loadModel(std::istream& is)
|
|||
}
|
||||
}
|
||||
|
||||
std::string nm[] =
|
||||
static const std::string nm[] =
|
||||
{
|
||||
"lowest_lod",
|
||||
"low_lod",
|
||||
|
|
|
|||
|
|
@ -324,6 +324,11 @@ S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMateri
|
|||
return mTextureList.setMaterialParams(index, pMaterialParams);
|
||||
}
|
||||
|
||||
LLMaterialPtr LLPrimitive::getTEMaterialParams(const U8 index)
|
||||
{
|
||||
return mTextureList.getMaterialParams(index);
|
||||
}
|
||||
|
||||
//===============================================================
|
||||
S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
|
||||
{
|
||||
|
|
@ -1360,9 +1365,8 @@ S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
|
|||
retval |= setTEBumpShinyFullbright(i, tec.bump[i]);
|
||||
retval |= setTEMediaTexGen(i, tec.media_flags[i]);
|
||||
retval |= setTEGlow(i, (F32)tec.glow[i] / (F32)0xFF);
|
||||
|
||||
retval |= setTEMaterialID(i, tec.material_ids[i]);
|
||||
|
||||
retval |= setTEMaterialID(i, tec.material_ids[i]);
|
||||
|
||||
coloru = LLColor4U(tec.colors + 4*i);
|
||||
|
||||
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
|
||||
|
|
|
|||
|
|
@ -389,6 +389,8 @@ public:
|
|||
virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
|
||||
virtual void setTESelected(const U8 te, bool sel);
|
||||
|
||||
LLMaterialPtr getTEMaterialParams(const U8 index);
|
||||
|
||||
void copyTEs(const LLPrimitive *primitive);
|
||||
S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
|
||||
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
|
||||
|
|
|
|||
|
|
@ -377,6 +377,16 @@ S32 LLPrimTextureList::setMaterialParams(const U8 index, const LLMaterialPtr pMa
|
|||
return TEM_CHANGE_NONE;
|
||||
}
|
||||
|
||||
LLMaterialPtr LLPrimTextureList::getMaterialParams(const U8 index)
|
||||
{
|
||||
if (index < mEntryList.size())
|
||||
{
|
||||
return mEntryList[index]->getMaterialParams();
|
||||
}
|
||||
|
||||
return LLMaterialPtr();
|
||||
}
|
||||
|
||||
S32 LLPrimTextureList::size() const
|
||||
{
|
||||
return mEntryList.size();
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ public:
|
|||
S32 setMaterialID(const U8 index, const LLMaterialID& pMaterialID);
|
||||
S32 setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams);
|
||||
|
||||
LLMaterialPtr getMaterialParams(const U8 index);
|
||||
|
||||
S32 size() const;
|
||||
|
||||
// void forceResize(S32 new_size);
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ const U32 FLAGS_TEMPORARY_ON_REZ = (1U << 29);
|
|||
//const U32 FLAGS_UNUSED_007 = (1U << 31); // was FLAGS_ZLIB_COMPRESSED
|
||||
|
||||
const U32 FLAGS_LOCAL = FLAGS_ANIM_SOURCE | FLAGS_CAMERA_SOURCE;
|
||||
const U32 FLAGS_WORLD = FLAGS_USE_PHYSICS | FLAGS_PHANTOM | FLAGS_TEMPORARY_ON_REZ;
|
||||
|
||||
typedef enum e_havok_joint_type
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ bool LLRender::sGLCoreProfile = false;
|
|||
static const U32 LL_NUM_TEXTURE_LAYERS = 32;
|
||||
static const U32 LL_NUM_LIGHT_UNITS = 8;
|
||||
|
||||
static GLenum sGLTextureType[] =
|
||||
static const GLenum sGLTextureType[] =
|
||||
{
|
||||
GL_TEXTURE_2D,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
|
|
@ -61,14 +61,14 @@ static GLenum sGLTextureType[] =
|
|||
GL_TEXTURE_2D_MULTISAMPLE
|
||||
};
|
||||
|
||||
static GLint sGLAddressMode[] =
|
||||
static const GLint sGLAddressMode[] =
|
||||
{
|
||||
GL_REPEAT,
|
||||
GL_MIRRORED_REPEAT,
|
||||
GL_CLAMP_TO_EDGE
|
||||
};
|
||||
|
||||
static GLenum sGLCompareFunc[] =
|
||||
static const GLenum sGLCompareFunc[] =
|
||||
{
|
||||
GL_NEVER,
|
||||
GL_ALWAYS,
|
||||
|
|
@ -82,7 +82,7 @@ static GLenum sGLCompareFunc[] =
|
|||
|
||||
const U32 immediate_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
|
||||
static GLenum sGLBlendFactor[] =
|
||||
static const GLenum sGLBlendFactor[] =
|
||||
{
|
||||
GL_ONE,
|
||||
GL_ZERO,
|
||||
|
|
@ -99,12 +99,12 @@ static GLenum sGLBlendFactor[] =
|
|||
};
|
||||
|
||||
LLTexUnit::LLTexUnit(S32 index)
|
||||
: mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT),
|
||||
mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT),
|
||||
mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR),
|
||||
mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA),
|
||||
mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0),
|
||||
mHasMipMaps(false)
|
||||
: mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT),
|
||||
mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT),
|
||||
mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR),
|
||||
mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA),
|
||||
mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0),
|
||||
mHasMipMaps(false)
|
||||
{
|
||||
llassert_always(index < (S32)LL_NUM_TEXTURE_LAYERS);
|
||||
mIndex = index;
|
||||
|
|
@ -1189,7 +1189,7 @@ void LLRender::syncMatrices()
|
|||
|
||||
if (shader)
|
||||
{
|
||||
llassert(shader);
|
||||
//llassert(shader);
|
||||
|
||||
bool mvp_done = false;
|
||||
|
||||
|
|
@ -1288,7 +1288,7 @@ void LLRender::syncMatrices()
|
|||
}
|
||||
else if (!LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
GLenum mode[] =
|
||||
static const GLenum mode[] =
|
||||
{
|
||||
GL_MODELVIEW,
|
||||
GL_PROJECTION,
|
||||
|
|
|
|||
|
|
@ -1611,7 +1611,7 @@ void LLFolderView::update()
|
|||
|
||||
LLFolderViewFilter& filter_object = getFolderViewModel()->getFilter();
|
||||
|
||||
if (filter_object.isModified() && filter_object.isNotDefault())
|
||||
if (filter_object.isModified() && filter_object.isNotDefault() && mParentPanel.get()->getVisible())
|
||||
{
|
||||
mNeedsAutoSelect = TRUE;
|
||||
}
|
||||
|
|
@ -1653,8 +1653,10 @@ void LLFolderView::update()
|
|||
scrollToShowSelection();
|
||||
}
|
||||
|
||||
BOOL filter_finished = getViewModelItem()->passedFilter()
|
||||
&& mViewModel->contentsReady();
|
||||
BOOL filter_finished = mViewModel->contentsReady()
|
||||
&& (getViewModelItem()->passedFilter()
|
||||
|| ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration()
|
||||
&& !filter_object.isModified()));
|
||||
if (filter_finished
|
||||
|| gFocusMgr.childHasKeyboardFocus(mParentPanel.get())
|
||||
|| gFocusMgr.childHasMouseCapture(mParentPanel.get()))
|
||||
|
|
|
|||
|
|
@ -3696,7 +3696,7 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
|||
{
|
||||
handled = pMenu->handleKey(key, mask, TRUE);
|
||||
}
|
||||
else
|
||||
else if (mask == MASK_NONE || (key >= KEY_LEFT && key <= KEY_DOWN))
|
||||
{
|
||||
//highlight first enabled one
|
||||
if(pMenu->highlightNextItem(NULL))
|
||||
|
|
|
|||
|
|
@ -1825,6 +1825,7 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
return LLUICtrl::handleRightMouseDown(x, y, mask);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
|
|||
mPrecision(p.decimal_digits),
|
||||
mTextEnabledColor(p.text_color()),
|
||||
mTextDisabledColor(p.text_disabled_color()),
|
||||
mLabelWidth(p.label_width)
|
||||
mLabelWidth(p.label_width),
|
||||
mEditorCommitSignal(NULL)
|
||||
{
|
||||
S32 top = getRect().getHeight();
|
||||
S32 bottom = 0;
|
||||
|
|
@ -196,6 +197,11 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
|
|||
updateText();
|
||||
}
|
||||
|
||||
LLSliderCtrl::~LLSliderCtrl()
|
||||
{
|
||||
delete mEditorCommitSignal;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLSliderCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
|
||||
{
|
||||
|
|
@ -308,6 +314,8 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata )
|
|||
if( success )
|
||||
{
|
||||
self->onCommit();
|
||||
if (self->mEditorCommitSignal)
|
||||
(*(self->mEditorCommitSignal))(self, self->getValueF32());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -421,6 +429,11 @@ boost::signals2::connection LLSliderCtrl::setSliderMouseUpCallback( const commit
|
|||
return mSlider->setMouseUpCallback( cb );
|
||||
}
|
||||
|
||||
boost::signals2::connection LLSliderCtrl::setSliderEditorCommitCallback( const commit_signal_t::slot_type& cb )
|
||||
{
|
||||
if (!mEditorCommitSignal) mEditorCommitSignal = new commit_signal_t();
|
||||
return mEditorCommitSignal->connect(cb);
|
||||
}
|
||||
void LLSliderCtrl::onTabInto()
|
||||
{
|
||||
if( mEditor )
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ protected:
|
|||
LLSliderCtrl(const Params&);
|
||||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
virtual ~LLSliderCtrl() {} // Children all cleaned up by default view destructor.
|
||||
virtual ~LLSliderCtrl();
|
||||
|
||||
/*virtual*/ F32 getValueF32() const { return mSlider->getValueF32(); }
|
||||
void setValue(F32 v, BOOL from_event = FALSE);
|
||||
|
|
@ -112,6 +112,7 @@ public:
|
|||
|
||||
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
|
||||
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
|
||||
boost::signals2::connection setSliderEditorCommitCallback( const commit_signal_t::slot_type& cb );
|
||||
|
||||
/*virtual*/ void onTabInto();
|
||||
|
||||
|
|
@ -150,6 +151,8 @@ private:
|
|||
|
||||
LLUIColor mTextEnabledColor;
|
||||
LLUIColor mTextDisabledColor;
|
||||
|
||||
commit_signal_t* mEditorCommitSignal;
|
||||
};
|
||||
|
||||
#endif // LL_LLSLIDERCTRL_H
|
||||
|
|
|
|||
|
|
@ -2063,8 +2063,16 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
|
|||
LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted());
|
||||
|
||||
// output the styled Url
|
||||
//appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
|
||||
appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly());
|
||||
|
||||
// show query part of url with gray color only for LLUrlEntryHTTP and LLUrlEntryHTTPNoProtocol url entries
|
||||
std::string label = match.getQuery();
|
||||
if (label.size())
|
||||
{
|
||||
link_params.color = LLColor4::grey;
|
||||
link_params.readonly_color = LLColor4::grey;
|
||||
appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
|
||||
}
|
||||
|
||||
// set the tooltip for the Url label
|
||||
if (! match.getTooltip().empty())
|
||||
|
|
@ -2855,13 +2863,44 @@ void LLTextBase::updateRects()
|
|||
needsReflow();
|
||||
}
|
||||
|
||||
// update mTextBoundingRect after mVisibleTextRect took scrolls into account
|
||||
if (!mLineInfoList.empty() && mScroller)
|
||||
{
|
||||
S32 delta_pos = 0;
|
||||
|
||||
switch(mVAlign)
|
||||
{
|
||||
case LLFontGL::TOP:
|
||||
delta_pos = llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom);
|
||||
break;
|
||||
case LLFontGL::VCENTER:
|
||||
delta_pos = (llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2;
|
||||
break;
|
||||
case LLFontGL::BOTTOM:
|
||||
delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom;
|
||||
break;
|
||||
case LLFontGL::BASELINE:
|
||||
// do nothing
|
||||
break;
|
||||
}
|
||||
// move line segments to fit new visible rect
|
||||
if (delta_pos != 0)
|
||||
{
|
||||
for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it)
|
||||
{
|
||||
it->mRect.translate(0, delta_pos);
|
||||
}
|
||||
mTextBoundingRect.translate(0, delta_pos);
|
||||
}
|
||||
}
|
||||
|
||||
// update document container again, using new mVisibleTextRect (that has scrollbars enabled as needed)
|
||||
doc_rect.mBottom = llmin(mVisibleTextRect.mBottom, mTextBoundingRect.mBottom);
|
||||
doc_rect.mLeft = 0;
|
||||
doc_rect.mRight = mScroller
|
||||
? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight)
|
||||
: mVisibleTextRect.getWidth();
|
||||
doc_rect.mTop = llmax(mVisibleTextRect.mTop, mTextBoundingRect.mTop);
|
||||
doc_rect.mTop = llmax(mVisibleTextRect.getHeight(), mTextBoundingRect.getHeight()) + doc_rect.mBottom;
|
||||
if (!mScroller)
|
||||
{
|
||||
// push doc rect to top of text widget
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
BOOL handled = FALSE;
|
||||
|
||||
// if I'm not currently selecting text
|
||||
if (!(hasSelection() && hasMouseCapture()))
|
||||
if (!(mIsSelecting && hasMouseCapture()))
|
||||
{
|
||||
// let text segments handle mouse event
|
||||
handled = LLTextBase::handleMouseUp(x, y, mask);
|
||||
|
|
@ -2448,12 +2448,30 @@ void LLTextEditor::updateLinkSegments()
|
|||
LLTextSegment *segment = *it;
|
||||
if (segment && segment->getStyle() && segment->getStyle()->isLink())
|
||||
{
|
||||
// if the link's label (what the user can edit) is a valid Url,
|
||||
// then update the link's HREF to be the same as the label text.
|
||||
// This lets users edit Urls in-place.
|
||||
LLStyleConstSP style = segment->getStyle();
|
||||
LLStyleSP new_style(new LLStyle(*style));
|
||||
LLWString url_label = wtext.substr(segment->getStart(), segment->getEnd()-segment->getStart());
|
||||
|
||||
segment_set_t::const_iterator next_it = mSegments.upper_bound(segment);
|
||||
LLTextSegment *next_segment = *next_it;
|
||||
if (next_segment)
|
||||
{
|
||||
LLWString next_url_label = wtext.substr(next_segment->getStart(), next_segment->getEnd()-next_segment->getStart());
|
||||
std::string link_check = wstring_to_utf8str(url_label) + wstring_to_utf8str(next_url_label);
|
||||
LLUrlMatch match;
|
||||
|
||||
if ( LLUrlRegistry::instance().findUrl(link_check, match))
|
||||
{
|
||||
if(match.getQuery() == wstring_to_utf8str(next_url_label))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if the link's label (what the user can edit) is a valid Url,
|
||||
// then update the link's HREF to be the same as the label text.
|
||||
// This lets users edit Urls in-place.
|
||||
if (LLUrlRegistry::instance().hasUrl(url_label))
|
||||
{
|
||||
std::string new_url = wstring_to_utf8str(url_label);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ std::string localize_slapp_label(const std::string& url, const std::string& full
|
|||
|
||||
|
||||
LLUrlEntryBase::LLUrlEntryBase()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
LLUrlEntryBase::~LLUrlEntryBase()
|
||||
{
|
||||
|
|
@ -188,6 +189,30 @@ bool LLUrlEntryBase::isWikiLinkCorrect(std::string url)
|
|||
return (LLUrlRegistry::instance().hasUrl(label)) ? false : true;
|
||||
}
|
||||
|
||||
std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const
|
||||
{
|
||||
LLUriParser up(unescapeUrl(url));
|
||||
up.normalize();
|
||||
|
||||
std::string label;
|
||||
up.extractParts();
|
||||
up.glueFirst(label);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const
|
||||
{
|
||||
LLUriParser up(unescapeUrl(url));
|
||||
|
||||
std::string query;
|
||||
up.extractParts();
|
||||
up.glueSecond(query);
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
static std::string getStringAfterToken(const std::string str, const std::string token)
|
||||
{
|
||||
size_t pos = str.find(token);
|
||||
|
|
@ -204,6 +229,7 @@ static std::string getStringAfterToken(const std::string str, const std::string
|
|||
// LLUrlEntryHTTP Describes generic http: and https: Urls
|
||||
//
|
||||
LLUrlEntryHTTP::LLUrlEntryHTTP()
|
||||
: LLUrlEntryBase()
|
||||
{
|
||||
mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
|
@ -212,6 +238,25 @@ LLUrlEntryHTTP::LLUrlEntryHTTP()
|
|||
}
|
||||
|
||||
std::string LLUrlEntryHTTP::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
return urlToLabelWithGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTP::getQuery(const std::string &url) const
|
||||
{
|
||||
return urlToGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTP::getUrl(const std::string &string) const
|
||||
{
|
||||
if (string.find("://") == std::string::npos)
|
||||
{
|
||||
return "http://" + escapeUrl(string);
|
||||
}
|
||||
return escapeUrl(string);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTP::getTooltip(const std::string &url) const
|
||||
{
|
||||
return unescapeUrl(url);
|
||||
}
|
||||
|
|
@ -248,6 +293,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const
|
|||
// LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com
|
||||
//
|
||||
LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol()
|
||||
: LLUrlEntryBase()
|
||||
{
|
||||
mPattern = boost::regex("("
|
||||
"\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR
|
||||
|
|
@ -261,7 +307,12 @@ LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol()
|
|||
|
||||
std::string LLUrlEntryHTTPNoProtocol::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
return unescapeUrl(url);
|
||||
return urlToLabelWithGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTPNoProtocol::getQuery(const std::string &url) const
|
||||
{
|
||||
return urlToGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
|
||||
|
|
@ -273,6 +324,95 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
|
|||
return escapeUrl(string);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const
|
||||
{
|
||||
return unescapeUrl(url);
|
||||
}
|
||||
|
||||
LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
|
||||
: LLUrlEntryBase()
|
||||
{
|
||||
mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
mMenuName = "menu_url_http.xml";
|
||||
mTooltip = LLTrans::getString("TooltipHttpUrl");
|
||||
}
|
||||
|
||||
std::string LLUrlEntryInvalidSLURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
|
||||
return escapeUrl(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryInvalidSLURL::getUrl(const std::string &string) const
|
||||
{
|
||||
return escapeUrl(string);
|
||||
}
|
||||
|
||||
std::string LLUrlEntryInvalidSLURL::getTooltip(const std::string &url) const
|
||||
{
|
||||
return unescapeUrl(url);
|
||||
}
|
||||
|
||||
bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
|
||||
{
|
||||
S32 actual_parts;
|
||||
|
||||
if(url.find(".com/secondlife/") != std::string::npos)
|
||||
{
|
||||
actual_parts = 5;
|
||||
}
|
||||
else if(url.find("/app/") != std::string::npos)
|
||||
{
|
||||
actual_parts = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
actual_parts = 3;
|
||||
}
|
||||
|
||||
LLURI uri(url);
|
||||
LLSD path_array = uri.pathArray();
|
||||
S32 path_parts = path_array.size();
|
||||
S32 x,y,z;
|
||||
|
||||
if (path_parts == actual_parts)
|
||||
{
|
||||
// handle slurl with (X,Y,Z) coordinates
|
||||
LLStringUtil::convertToS32(path_array[path_parts-3],x);
|
||||
LLStringUtil::convertToS32(path_array[path_parts-2],y);
|
||||
LLStringUtil::convertToS32(path_array[path_parts-1],z);
|
||||
|
||||
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256) && (z>= 0))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (path_parts == (actual_parts-1))
|
||||
{
|
||||
// handle slurl with (X,Y) coordinates
|
||||
|
||||
LLStringUtil::convertToS32(path_array[path_parts-2],x);
|
||||
LLStringUtil::convertToS32(path_array[path_parts-1],y);
|
||||
;
|
||||
if((x>= 0 && x<= 256) && (y>= 0 && y<= 256))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (path_parts == (actual_parts-2))
|
||||
{
|
||||
// handle slurl with (X) coordinate
|
||||
LLStringUtil::convertToS32(path_array[path_parts-1],x);
|
||||
if(x>= 0 && x<= 256)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// LLUrlEntrySLURL Describes generic http: and https: Urls
|
||||
//
|
||||
|
|
@ -294,6 +434,7 @@ std::string LLUrlEntrySLURL::getLabel(const std::string &url, const LLUrlLabelCa
|
|||
// - http://slurl.com/secondlife/Place/X
|
||||
// - http://slurl.com/secondlife/Place
|
||||
//
|
||||
|
||||
LLURI uri(url);
|
||||
LLSD path_array = uri.pathArray();
|
||||
S32 path_parts = path_array.size();
|
||||
|
|
@ -346,29 +487,53 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
|
|||
}
|
||||
|
||||
//
|
||||
// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link
|
||||
// LLUrlEntrySeconlifeURL Describes *secondlife.com/ and *lindenlab.com/ urls to substitute icon 'hand.png' before link
|
||||
//
|
||||
LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL()
|
||||
{
|
||||
mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?(/\\S*)?\\b",
|
||||
LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()
|
||||
{
|
||||
mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
||||
mIcon = "Hand";
|
||||
mMenuName = "menu_url_http.xml";
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
std::string LLUrlEntrySecondlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
LLUriParser up(url);
|
||||
up.extractParts();
|
||||
return up.host();
|
||||
return urlToLabelWithGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const
|
||||
std::string LLUrlEntrySecondlifeURL::getQuery(const std::string &url) const
|
||||
{
|
||||
return urlToGreyQuery(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const
|
||||
{
|
||||
return url;
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySecondlifeURL::getUrl(const std::string &string) const
|
||||
{
|
||||
if (string.find("://") == std::string::npos)
|
||||
{
|
||||
return "http://" + escapeUrl(string);
|
||||
}
|
||||
return escapeUrl(string);
|
||||
}
|
||||
|
||||
//
|
||||
// LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link
|
||||
//
|
||||
LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL()
|
||||
{
|
||||
mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)",
|
||||
boost::regex::perl|boost::regex::icase);
|
||||
|
||||
mIcon = "Hand";
|
||||
mMenuName = "menu_url_http.xml";
|
||||
}
|
||||
|
||||
//
|
||||
// LLUrlEntryAgent Describes a Second Life agent Url, e.g.,
|
||||
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ public:
|
|||
/// Given a matched Url, return a label for the Url
|
||||
virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; }
|
||||
|
||||
/// Return port, query and fragment parts for the Url
|
||||
virtual std::string getQuery(const std::string &url) const { return ""; }
|
||||
|
||||
/// Return an icon that can be displayed next to Urls of this type
|
||||
virtual std::string getIcon(const std::string &url);
|
||||
|
||||
|
|
@ -104,6 +107,8 @@ public:
|
|||
|
||||
bool isWikiLinkCorrect(std::string url);
|
||||
|
||||
virtual bool isSLURLvalid(const std::string &url) const { return TRUE; };
|
||||
|
||||
protected:
|
||||
std::string getIDStringFromUrl(const std::string &url) const;
|
||||
std::string escapeUrl(const std::string &url) const;
|
||||
|
|
@ -111,6 +116,8 @@ protected:
|
|||
std::string getLabelFromWikiLink(const std::string &url) const;
|
||||
std::string getUrlFromWikiLink(const std::string &string) const;
|
||||
void addObserver(const std::string &id, const std::string &url, const LLUrlLabelCallback &cb);
|
||||
std::string urlToLabelWithGreyQuery(const std::string &url) const;
|
||||
std::string urlToGreyQuery(const std::string &url) const;
|
||||
virtual void callObservers(const std::string &id, const std::string &label, const std::string& icon);
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -133,6 +140,9 @@ class LLUrlEntryHTTP : public LLUrlEntryBase
|
|||
public:
|
||||
LLUrlEntryHTTP();
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getQuery(const std::string &url) const;
|
||||
/*virtual*/ std::string getUrl(const std::string &string) const;
|
||||
/*virtual*/ std::string getTooltip(const std::string &url) const;
|
||||
};
|
||||
|
||||
///
|
||||
|
|
@ -155,7 +165,20 @@ class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase
|
|||
public:
|
||||
LLUrlEntryHTTPNoProtocol();
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getQuery(const std::string &url) const;
|
||||
/*virtual*/ std::string getUrl(const std::string &string) const;
|
||||
/*virtual*/ std::string getTooltip(const std::string &url) const;
|
||||
};
|
||||
|
||||
class LLUrlEntryInvalidSLURL : public LLUrlEntryBase
|
||||
{
|
||||
public:
|
||||
LLUrlEntryInvalidSLURL();
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getUrl(const std::string &string) const;
|
||||
/*virtual*/ std::string getTooltip(const std::string &url) const;
|
||||
|
||||
bool isSLURLvalid(const std::string &url) const;
|
||||
};
|
||||
|
||||
///
|
||||
|
|
@ -172,16 +195,24 @@ public:
|
|||
///
|
||||
/// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls
|
||||
///
|
||||
class LLUrlEntrySeconlifeURL : public LLUrlEntryBase
|
||||
class LLUrlEntrySecondlifeURL : public LLUrlEntryBase
|
||||
{
|
||||
public:
|
||||
LLUrlEntrySeconlifeURL();
|
||||
LLUrlEntrySecondlifeURL();
|
||||
bool isTrusted() const { return true; }
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getQuery(const std::string &url) const;
|
||||
/*virtual*/ std::string getTooltip(const std::string &url) const;
|
||||
/*virtual*/ std::string getUrl(const std::string &string) const;
|
||||
};
|
||||
|
||||
private:
|
||||
std::string mLabel;
|
||||
///
|
||||
/// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls
|
||||
///
|
||||
class LLUrlEntrySimpleSecondlifeURL : public LLUrlEntrySecondlifeURL
|
||||
{
|
||||
public:
|
||||
LLUrlEntrySimpleSecondlifeURL();
|
||||
};
|
||||
|
||||
///
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ LLUrlMatch::LLUrlMatch() :
|
|||
{
|
||||
}
|
||||
|
||||
void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
|
||||
const std::string &label, const std::string &tooltip,
|
||||
void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std::string &label,
|
||||
const std::string& query, const std::string &tooltip,
|
||||
const std::string &icon, const LLStyle::Params& style,
|
||||
const std::string &menu, const std::string &location,
|
||||
const LLUUID& id, bool underline_on_hover_only, bool trusted)
|
||||
|
|
@ -52,6 +52,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
|
|||
mEnd = end;
|
||||
mUrl = url;
|
||||
mLabel = label;
|
||||
mQuery = query;
|
||||
mTooltip = tooltip;
|
||||
mIcon = icon;
|
||||
mStyle = style;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ public:
|
|||
/// return a label that can be used for the display of this Url
|
||||
std::string getLabel() const { return mLabel; }
|
||||
|
||||
/// return a right part of url which should be drawn in grey
|
||||
std::string getQuery() const { return mQuery; }
|
||||
|
||||
/// return a message that could be displayed in a tooltip or status bar
|
||||
std::string getTooltip() const { return mTooltip; }
|
||||
|
||||
|
|
@ -85,10 +88,10 @@ public:
|
|||
|
||||
/// Change the contents of this match object (used by LLUrlRegistry)
|
||||
void setValues(U32 start, U32 end, const std::string &url, const std::string &label,
|
||||
const std::string &tooltip, const std::string &icon,
|
||||
const std::string& query, const std::string &tooltip, const std::string &icon,
|
||||
const LLStyle::Params& style, const std::string &menu,
|
||||
const std::string &location, const LLUUID& id,
|
||||
bool underline_on_hover_only = false, bool trusted = false );
|
||||
bool underline_on_hover_only = false, bool trusted = false);
|
||||
|
||||
const LLUUID& getID() const { return mID; }
|
||||
private:
|
||||
|
|
@ -96,6 +99,7 @@ private:
|
|||
U32 mEnd;
|
||||
std::string mUrl;
|
||||
std::string mLabel;
|
||||
std::string mQuery;
|
||||
std::string mTooltip;
|
||||
std::string mIcon;
|
||||
std::string mMenuName;
|
||||
|
|
|
|||
|
|
@ -44,10 +44,13 @@ LLUrlRegistry::LLUrlRegistry()
|
|||
registerUrl(new LLUrlEntryNoLink());
|
||||
mUrlEntryIcon = new LLUrlEntryIcon();
|
||||
registerUrl(mUrlEntryIcon);
|
||||
mLLUrlEntryInvalidSLURL = new LLUrlEntryInvalidSLURL();
|
||||
registerUrl(mLLUrlEntryInvalidSLURL);
|
||||
registerUrl(new LLUrlEntrySLURL());
|
||||
|
||||
// decorated links for host names like: secondlife.com and lindenlab.com
|
||||
registerUrl(new LLUrlEntrySeconlifeURL());
|
||||
registerUrl(new LLUrlEntrySecondlifeURL());
|
||||
registerUrl(new LLUrlEntrySimpleSecondlifeURL());
|
||||
|
||||
registerUrl(new LLUrlEntryHTTP());
|
||||
mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel();
|
||||
|
|
@ -189,6 +192,14 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
|
|||
if (start < match_start || match_entry == NULL)
|
||||
{
|
||||
|
||||
if((mLLUrlEntryInvalidSLURL == *it))
|
||||
{
|
||||
if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if((mUrlEntryHTTPLabel == *it) || (mUrlEntrySLLabel == *it))
|
||||
{
|
||||
if(url_entry && !url_entry->isWikiLinkCorrect(text.substr(start, end - start + 1)))
|
||||
|
|
@ -217,6 +228,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
|
|||
match.setValues(match_start, match_end,
|
||||
match_entry->getUrl(url),
|
||||
match_entry->getLabel(url, cb),
|
||||
match_entry->getQuery(url),
|
||||
match_entry->getTooltip(url),
|
||||
match_entry->getIcon(url),
|
||||
match_entry->getStyle(),
|
||||
|
|
@ -253,6 +265,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr
|
|||
|
||||
match.setValues(start, end, match.getUrl(),
|
||||
match.getLabel(),
|
||||
match.getQuery(),
|
||||
match.getTooltip(),
|
||||
match.getIcon(),
|
||||
match.getStyle(),
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ private:
|
|||
|
||||
std::vector<LLUrlEntryBase *> mUrlEntry;
|
||||
LLUrlEntryBase* mUrlEntryIcon;
|
||||
LLUrlEntryBase* mLLUrlEntryInvalidSLURL;
|
||||
LLUrlEntryBase* mUrlEntryHTTPLabel;
|
||||
LLUrlEntryBase* mUrlEntrySLLabel;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure("empty()", match.empty());
|
||||
|
||||
match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(0, 1, "http://secondlife.com", "", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure("! empty()", ! match.empty());
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getStart() == 0", match.getStart(), 0);
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getStart() == 10", match.getStart(), 10);
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getEnd() == 0", match.getEnd(), 0);
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getEnd() == 20", match.getEnd(), 20);
|
||||
}
|
||||
|
||||
|
|
@ -190,10 +190,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getUrl() == ''", match.getUrl(), "");
|
||||
|
||||
match.setValues(10, 20, "http://slurl.com/", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "http://slurl.com/", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getUrl() == '' (2)", match.getUrl(), "");
|
||||
}
|
||||
|
||||
|
|
@ -206,10 +206,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getLabel() == ''", match.getLabel(), "");
|
||||
|
||||
match.setValues(10, 20, "", "Label", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "Label", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getLabel() == '' (2)", match.getLabel(), "");
|
||||
}
|
||||
|
||||
|
|
@ -222,10 +222,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getTooltip() == ''", match.getTooltip(), "");
|
||||
|
||||
match.setValues(10, 20, "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getTooltip() == '' (2)", match.getTooltip(), "");
|
||||
}
|
||||
|
||||
|
|
@ -238,10 +238,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure_equals("getIcon() == ''", match.getIcon(), "");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure_equals("getIcon() == '' (2)", match.getIcon(), "");
|
||||
}
|
||||
|
||||
|
|
@ -254,10 +254,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure("getMenuName() empty", match.getMenuName().empty());
|
||||
|
||||
match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null);
|
||||
ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure("getMenuName() empty (2)", match.getMenuName().empty());
|
||||
}
|
||||
|
||||
|
|
@ -270,10 +270,10 @@ namespace tut
|
|||
LLUrlMatch match;
|
||||
ensure("getLocation() empty", match.getLocation().empty());
|
||||
|
||||
match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null);
|
||||
ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris");
|
||||
|
||||
match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null);
|
||||
ensure("getLocation() empty (2)", match.getLocation().empty());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,4 +51,3 @@ LLWindowHeadless::~LLWindowHeadless()
|
|||
void LLWindowHeadless::swapBuffers()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ public:
|
|||
/*virtual*/ void delayInputProcessing() {};
|
||||
/*virtual*/ void swapBuffers();
|
||||
|
||||
// handy coordinate space conversion routines
|
||||
|
||||
// handy coordinate space conversion routines
|
||||
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
|
||||
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
|
||||
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
|
||||
|
|
|
|||
|
|
@ -904,6 +904,11 @@ void LLWindowMacOSX::swapBuffers()
|
|||
CGLFlushDrawable(mContext);
|
||||
}
|
||||
|
||||
void LLWindowMacOSX::restoreGLContext()
|
||||
{
|
||||
CGLSetCurrentContext(mContext);
|
||||
}
|
||||
|
||||
F32 LLWindowMacOSX::getGamma()
|
||||
{
|
||||
F32 result = 2.2; // Default to something sane
|
||||
|
|
@ -1158,6 +1163,8 @@ void LLWindowMacOSX::beforeDialog()
|
|||
|
||||
void LLWindowMacOSX::afterDialog()
|
||||
{
|
||||
//For fix problem with Core Flow view on OSX
|
||||
restoreGLContext();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
/*virtual*/ void gatherInput();
|
||||
/*virtual*/ void delayInputProcessing() {};
|
||||
/*virtual*/ void swapBuffers();
|
||||
|
||||
|
||||
// handy coordinate space conversion routines
|
||||
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
|
||||
/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to);
|
||||
|
|
@ -155,7 +155,9 @@ protected:
|
|||
|
||||
//Satisfy MAINT-3135 and MAINT-3288 with a flag.
|
||||
/*virtual */ void setOldResize(bool oldresize) {setResizeMode(oldresize, mGLView); }
|
||||
|
||||
|
||||
private:
|
||||
void restoreGLContext();
|
||||
|
||||
protected:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ public:
|
|||
/*virtual*/ void gatherInput() {};
|
||||
/*virtual*/ void delayInputProcessing() {};
|
||||
/*virtual*/ void swapBuffers();
|
||||
/*virtual*/ void restoreGLContext() {};
|
||||
|
||||
// handy coordinate space conversion routines
|
||||
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ public:
|
|||
/*virtual*/ void processMiscNativeEvents();
|
||||
/*virtual*/ void gatherInput();
|
||||
/*virtual*/ void swapBuffers();
|
||||
/*virtual*/ void restoreGLContext() {};
|
||||
|
||||
/*virtual*/ void delayInputProcessing() { };
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ public:
|
|||
/*virtual*/ void gatherInput();
|
||||
/*virtual*/ void delayInputProcessing();
|
||||
/*virtual*/ void swapBuffers();
|
||||
/*virtual*/ void restoreGLContext() {};
|
||||
|
||||
// handy coordinate space conversion routines
|
||||
/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to);
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterhandler.cpp
|
||||
llfloaterhardwaresettings.cpp
|
||||
llfloaterhelpbrowser.cpp
|
||||
llfloaterhoverheight.cpp
|
||||
llfloaterhud.cpp
|
||||
llfloaterimagepreview.cpp
|
||||
llfloaterimsessiontab.cpp
|
||||
|
|
@ -865,6 +866,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterhandler.h
|
||||
llfloaterhardwaresettings.h
|
||||
llfloaterhelpbrowser.h
|
||||
llfloaterhoverheight.h
|
||||
llfloaterhud.h
|
||||
llfloaterimagepreview.h
|
||||
llfloaterimnearbychat.h
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
<key>tags</key>
|
||||
<array>
|
||||
<!-- sample entry for debugging specific items
|
||||
<string>Avatar</string>
|
||||
<string>Inventory</string>
|
||||
<string>SceneLoadTiming</string>
|
||||
<string>Avatar</string>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,17 @@
|
|||
<key>Value</key>
|
||||
<real>300</real>
|
||||
</map>
|
||||
<key>AckCollectTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Ack messages collection and grouping time</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.1</real>
|
||||
</map>
|
||||
<key>AdminMenu</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -654,6 +665,21 @@
|
|||
<key>Value</key>
|
||||
<integer>2</integer>
|
||||
</map>
|
||||
<key>AvatarPosFinalOffset</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>After-everything-else fixup for avatar position.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Vector3</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>AvatarPickerURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -5004,6 +5030,7 @@
|
|||
<key>Type</key>
|
||||
<string>LLSD</string>
|
||||
<key>Value</key>
|
||||
<array />
|
||||
</map>
|
||||
<key>LSLFindCaseInsensitivity</key>
|
||||
<map>
|
||||
|
|
@ -11759,7 +11786,7 @@
|
|||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<integer>0.0</integer>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>TextureFetchSource</key>
|
||||
<map>
|
||||
|
|
@ -13202,6 +13229,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>EnvironmentPersistAcrossLogin</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Keep Environment settings consistent across sessions</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>UseDayCycle</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -14093,17 +14131,6 @@
|
|||
<key>Value</key>
|
||||
<integer>-1</integer>
|
||||
</map>
|
||||
<key>MaxFPS</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Yield some time to the local host if we reach a threshold framerate.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>-1.0</real>
|
||||
</map>
|
||||
<key>ForcePeriodicRenderingTime</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -15595,7 +15622,6 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
<llsd>
|
||||
<map>
|
||||
<key>AvatarHoverOffsetZ</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>After-everything-else fixup for avatar Z position.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>0.0</real>
|
||||
</map>
|
||||
<key>DoNotDisturbResponseChanged</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -398,6 +398,8 @@ LLAgent::LLAgent() :
|
|||
mAutoPilotFinishedCallback(NULL),
|
||||
mAutoPilotCallbackData(NULL),
|
||||
|
||||
mMovementKeysLocked(FALSE),
|
||||
|
||||
mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))),
|
||||
|
||||
mHaveHomePosition(FALSE),
|
||||
|
|
|
|||
|
|
@ -515,6 +515,9 @@ public:
|
|||
void moveYaw(F32 mag, bool reset_view = true);
|
||||
void movePitch(F32 mag);
|
||||
|
||||
BOOL isMovementLocked() const { return mMovementKeysLocked; }
|
||||
void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; }
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Move the avatar's frame
|
||||
//--------------------------------------------------------------------
|
||||
|
|
@ -569,6 +572,7 @@ private:
|
|||
void (*mAutoPilotFinishedCallback)(BOOL, void *);
|
||||
void* mAutoPilotCallbackData;
|
||||
LLUUID mLeaderID;
|
||||
BOOL mMovementKeysLocked;
|
||||
|
||||
/** Movement
|
||||
** **
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "llfloaterreg.h"
|
||||
#include "llhudmanager.h"
|
||||
#include "lljoystickbutton.h"
|
||||
#include "llmorphview.h"
|
||||
#include "llmoveview.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llsmoothstep.h"
|
||||
|
|
@ -2269,7 +2270,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
|
|||
|
||||
gFocusMgr.setKeyboardFocus( NULL );
|
||||
gFocusMgr.setMouseCapture( NULL );
|
||||
|
||||
if( gMorphView )
|
||||
{
|
||||
gMorphView->setVisible( TRUE );
|
||||
}
|
||||
// Remove any pitch or rotation from the avatar
|
||||
LLVector3 at = gAgent.getAtAxis();
|
||||
at.mV[VZ] = 0.f;
|
||||
|
|
|
|||
|
|
@ -686,6 +686,8 @@ LLAppViewer::LLAppViewer()
|
|||
mQuitRequested(false),
|
||||
mLogoutRequestSent(false),
|
||||
mYieldTime(-1),
|
||||
mLastAgentControlFlags(0),
|
||||
mLastAgentForceUpdate(0),
|
||||
mMainloopTimeout(NULL),
|
||||
mAgentRegionLastAlive(false),
|
||||
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
|
||||
|
|
@ -4838,22 +4840,24 @@ void LLAppViewer::idle()
|
|||
gAgentPilot.updateTarget();
|
||||
gAgent.autoPilot(&yaw);
|
||||
}
|
||||
|
||||
static LLFrameTimer agent_update_timer;
|
||||
static U32 last_control_flags;
|
||||
|
||||
// When appropriate, update agent location to the simulator.
|
||||
F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
|
||||
BOOL flags_changed = gAgent.controlFlagsDirty() || (last_control_flags != gAgent.getControlFlags());
|
||||
|
||||
if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
|
||||
// Send avatar and camera info
|
||||
last_control_flags = gAgent.getControlFlags();
|
||||
send_agent_update(TRUE);
|
||||
agent_update_timer.reset();
|
||||
}
|
||||
|
||||
static LLFrameTimer agent_update_timer;
|
||||
|
||||
// When appropriate, update agent location to the simulator.
|
||||
F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
|
||||
F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
|
||||
BOOL force_update = gAgent.controlFlagsDirty()
|
||||
|| (mLastAgentControlFlags != gAgent.getControlFlags())
|
||||
|| (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
|
||||
if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
|
||||
// Send avatar and camera info
|
||||
mLastAgentControlFlags = gAgent.getControlFlags();
|
||||
mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
|
||||
send_agent_update(force_update);
|
||||
agent_update_timer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
|
|
@ -5417,7 +5421,7 @@ void LLAppViewer::idleNetwork()
|
|||
}
|
||||
|
||||
// Handle per-frame message system processing.
|
||||
gMessageSystem->processAcks();
|
||||
gMessageSystem->processAcks(gSavedSettings.getF32("AckCollectTime"));
|
||||
|
||||
#ifdef TIME_THROTTLE_MESSAGES
|
||||
if (total_time >= CheckMessagesMaxTime)
|
||||
|
|
|
|||
|
|
@ -279,6 +279,8 @@ private:
|
|||
bool mQuitRequested; // User wants to quit, may have modified documents open.
|
||||
bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim.
|
||||
S32 mYieldTime;
|
||||
U32 mLastAgentControlFlags;
|
||||
F32 mLastAgentForceUpdate;
|
||||
struct SettingsFiles* mSettingsLocationList;
|
||||
|
||||
LLWatchdogTimeout* mMainloopTimeout;
|
||||
|
|
@ -318,6 +320,7 @@ public:
|
|||
|
||||
// consts from viewer.h
|
||||
const S32 AGENT_UPDATES_PER_SECOND = 10;
|
||||
const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1;
|
||||
|
||||
// Globals with external linkage. From viewer.h
|
||||
// *NOTE:Mani - These will be removed as the Viewer App Cleanup project continues.
|
||||
|
|
|
|||
|
|
@ -229,21 +229,34 @@ void LLAssetUploadResponder::httpFailure()
|
|||
{
|
||||
// *TODO: Add adaptive retry policy?
|
||||
LL_WARNS() << dumpResponse() << LL_ENDL;
|
||||
LLSD args;
|
||||
std::string reason;
|
||||
if (isHttpClientErrorStatus(getStatus()))
|
||||
{
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = "Error in upload request. Please visit "
|
||||
reason = "Error in upload request. Please visit "
|
||||
"http://secondlife.com/support for help fixing this problem.";
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
}
|
||||
else
|
||||
{
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = "The server is experiencing unexpected "
|
||||
reason = "The server is experiencing unexpected "
|
||||
"difficulties.";
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
}
|
||||
LLSD args;
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = reason;
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
|
||||
// unfreeze script preview
|
||||
if(mAssetType == LLAssetType::AT_LSL_TEXT)
|
||||
{
|
||||
LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
|
||||
if (preview)
|
||||
{
|
||||
LLSD errors;
|
||||
errors.append(LLTrans::getString("UploadFailed") + reason);
|
||||
preview->callbackLSLCompileFailed(errors);
|
||||
}
|
||||
}
|
||||
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
LLFilePicker::instance().reset(); // unlock file picker when bulk upload fails
|
||||
}
|
||||
|
|
@ -298,8 +311,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content)
|
|||
void LLAssetUploadResponder::uploadFailure(const LLSD& content)
|
||||
{
|
||||
LL_WARNS() << dumpResponse() << LL_ENDL;
|
||||
|
||||
// unfreeze script preview
|
||||
if(mAssetType == LLAssetType::AT_LSL_TEXT)
|
||||
{
|
||||
LLPreviewLSL* preview = LLFloaterReg::findTypedInstance<LLPreviewLSL>("preview_script", mPostData["item_id"]);
|
||||
if (preview)
|
||||
{
|
||||
LLSD errors;
|
||||
errors.append(LLTrans::getString("UploadFailed") + content["message"].asString());
|
||||
preview->callbackLSLCompileFailed(errors);
|
||||
}
|
||||
}
|
||||
|
||||
// remove the "Uploading..." message
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
|
||||
LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot");
|
||||
if (floater_snapshot)
|
||||
{
|
||||
|
|
@ -625,7 +652,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
|
|||
}
|
||||
else
|
||||
{
|
||||
LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id));
|
||||
LLSD floater_key;
|
||||
floater_key["taskid"] = task_id;
|
||||
floater_key["itemid"] = item_id;
|
||||
LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
|
||||
if (preview)
|
||||
{
|
||||
// Bytecode save completed
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ namespace action_give_inventory
|
|||
}
|
||||
|
||||
std::string residents;
|
||||
LLAvatarActions::buildResidentsString(avatar_names, residents);
|
||||
LLAvatarActions::buildResidentsString(avatar_names, residents, true);
|
||||
|
||||
std::string items;
|
||||
build_items_string(inventory_selected_uuids, items);
|
||||
|
|
@ -777,7 +777,7 @@ namespace action_give_inventory
|
|||
}
|
||||
|
||||
// static
|
||||
void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string)
|
||||
void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name)
|
||||
{
|
||||
llassert(avatar_names.size() > 0);
|
||||
|
||||
|
|
@ -785,7 +785,15 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name
|
|||
const std::string& separator = LLTrans::getString("words_separator");
|
||||
for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; )
|
||||
{
|
||||
residents_string.append((*it).getDisplayName());
|
||||
if(complete_name)
|
||||
{
|
||||
residents_string.append((*it).getCompleteName());
|
||||
}
|
||||
else
|
||||
{
|
||||
residents_string.append((*it).getDisplayName());
|
||||
}
|
||||
|
||||
if (++it == avatar_names.end())
|
||||
{
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ public:
|
|||
* @param avatar_names - a vector of given avatar names from which resulting string is built
|
||||
* @param residents_string - the resulting string
|
||||
*/
|
||||
static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string);
|
||||
static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name = false);
|
||||
|
||||
/**
|
||||
* Builds a string of residents' display names separated by "words_separator" string.
|
||||
|
|
|
|||
|
|
@ -860,7 +860,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
|
|||
{
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get( buddy_id, &av_name);
|
||||
buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id);
|
||||
buddy_map_t::value_type value(buddy_id, av_name.getDisplayName());
|
||||
if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION))
|
||||
{
|
||||
mMappable.insert(value);
|
||||
|
|
@ -871,7 +871,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
|
|||
bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
|
||||
{
|
||||
gCacheName->getFullName(buddy_id, mFullName);
|
||||
buddy_map_t::value_type value(mFullName, buddy_id);
|
||||
buddy_map_t::value_type value(buddy_id, mFullName);
|
||||
if(buddy->isOnline())
|
||||
{
|
||||
mOnline.insert(value);
|
||||
|
|
@ -883,8 +883,8 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud
|
|||
{
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(buddy_id, &av_name);
|
||||
mFullName = av_name.getDisplayName();
|
||||
buddy_map_t::value_type value(mFullName, buddy_id);
|
||||
mFullName = av_name.getCompleteName();
|
||||
buddy_map_t::value_type value(buddy_id, mFullName);
|
||||
if(buddy->isOnline())
|
||||
{
|
||||
mOnline.insert(value);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public:
|
|||
LLCollectMappableBuddies() {}
|
||||
virtual ~LLCollectMappableBuddies() {}
|
||||
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
|
||||
typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
|
||||
typedef std::map<LLUUID, std::string> buddy_map_t;
|
||||
buddy_map_t mMappable;
|
||||
std::string mFullName;
|
||||
};
|
||||
|
|
@ -245,7 +245,7 @@ public:
|
|||
LLCollectOnlineBuddies() {}
|
||||
virtual ~LLCollectOnlineBuddies() {}
|
||||
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
|
||||
typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
|
||||
typedef std::map<LLUUID, std::string> buddy_map_t;
|
||||
buddy_map_t mOnline;
|
||||
std::string mFullName;
|
||||
};
|
||||
|
|
@ -258,7 +258,7 @@ public:
|
|||
LLCollectAllBuddies() {}
|
||||
virtual ~LLCollectAllBuddies() {}
|
||||
virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy);
|
||||
typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t;
|
||||
typedef std::map<LLUUID, std::string> buddy_map_t;
|
||||
buddy_map_t mOnline;
|
||||
buddy_map_t mOffline;
|
||||
std::string mFullName;
|
||||
|
|
|
|||
|
|
@ -1113,7 +1113,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
|
|||
|
||||
if (irc_me && !use_plain_text_chat_history)
|
||||
{
|
||||
message = chat.mFromName + message;
|
||||
std::string from_name = chat.mFromName;
|
||||
LLAvatarName av_name;
|
||||
if (!chat.mFromID.isNull() &&
|
||||
LLAvatarNameCache::get(chat.mFromID, &av_name) &&
|
||||
!av_name.isDisplayNameDefault())
|
||||
{
|
||||
from_name = av_name.getCompleteName();
|
||||
}
|
||||
message = from_name + message;
|
||||
}
|
||||
|
||||
if (square_brackets)
|
||||
|
|
|
|||
|
|
@ -376,6 +376,14 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void LLIMChiclet::hidePopupMenu()
|
||||
{
|
||||
if (mPopupMenu)
|
||||
{
|
||||
mPopupMenu->setVisible(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLIMChiclet::canCreateMenu()
|
||||
{
|
||||
if(mPopupMenu)
|
||||
|
|
|
|||
|
|
@ -305,6 +305,8 @@ public:
|
|||
*/
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
|
||||
void hidePopupMenu();
|
||||
|
||||
protected:
|
||||
|
||||
LLIMChiclet(const LLIMChiclet::Params& p);
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask )
|
|||
LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume");
|
||||
LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice");
|
||||
if (result
|
||||
&& getRoot()
|
||||
&& getRoot() && (getRoot()->getCurSelectedItem() == this)
|
||||
&& !(volume_floater && volume_floater->isShown() && volume_floater->hasFocus())
|
||||
&& !(chat_volume_floater && chat_volume_floater->isShown() && chat_volume_floater->hasFocus()))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data)
|
|||
{
|
||||
if (name.empty())
|
||||
{
|
||||
llassert(name.empty());
|
||||
//llassert(name.empty());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,14 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
|||
retval = gPipeline.getSpatialPartition((LLViewerObject*) mVObjp);
|
||||
}
|
||||
else if (isRoot())
|
||||
{ //must be an active volume
|
||||
{
|
||||
if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment())
|
||||
{
|
||||
// remove obsolete bridge
|
||||
mSpatialBridge->markDead();
|
||||
setSpatialBridge(NULL);
|
||||
}
|
||||
//must be an active volume
|
||||
if (!mSpatialBridge)
|
||||
{
|
||||
if (mVObjp->isHUDAttachment())
|
||||
|
|
|
|||
|
|
@ -303,7 +303,8 @@ void LLEnvManagerNew::loadUserPrefs()
|
|||
mUserPrefs.mSkyPresetName = gSavedSettings.getString("SkyPresetName");
|
||||
mUserPrefs.mDayCycleName = gSavedSettings.getString("DayCycleName");
|
||||
|
||||
mUserPrefs.mUseRegionSettings = gSavedSettings.getBOOL("UseEnvironmentFromRegion");
|
||||
bool use_region_settings = gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin") ? gSavedSettings.getBOOL("UseEnvironmentFromRegion") : true;
|
||||
mUserPrefs.mUseRegionSettings = use_region_settings;
|
||||
mUserPrefs.mUseDayCycle = gSavedSettings.getBOOL("UseDayCycle");
|
||||
|
||||
if (mUserPrefs.mUseRegionSettings)
|
||||
|
|
|
|||
|
|
@ -330,24 +330,52 @@ void LLFace::dirtyTexture()
|
|||
{
|
||||
vobj->mLODChanged = TRUE;
|
||||
|
||||
LLVOAvatar* avatar = vobj->getAvatar();
|
||||
if (avatar)
|
||||
{ //avatar render cost may have changed
|
||||
avatar->updateVisualComplexity();
|
||||
}
|
||||
LLVOAvatar* avatar = vobj->getAvatar();
|
||||
if (avatar)
|
||||
{ //avatar render cost may have changed
|
||||
avatar->updateVisualComplexity();
|
||||
}
|
||||
}
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gPipeline.markTextured(drawablep);
|
||||
}
|
||||
|
||||
void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture)
|
||||
{
|
||||
LLDrawable* drawablep = getDrawable();
|
||||
if(mVObjp.notNull() && mVObjp->getVolume())
|
||||
{
|
||||
LLVOVolume *vobj = drawablep->getVOVolume();
|
||||
if(vobj && vobj->notifyAboutCreatingTexture(texture))
|
||||
{
|
||||
gPipeline.markTextured(drawablep);
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture)
|
||||
{
|
||||
LLDrawable* drawablep = getDrawable();
|
||||
if(mVObjp.notNull() && mVObjp->getVolume())
|
||||
{
|
||||
LLVOVolume *vobj = drawablep->getVOVolume();
|
||||
if(vobj && vobj->notifyAboutMissingAsset(texture))
|
||||
{
|
||||
gPipeline.markTextured(drawablep);
|
||||
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture)
|
||||
{
|
||||
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
|
||||
|
||||
|
||||
if(mTexture[ch] == new_texture)
|
||||
{
|
||||
return ;
|
||||
|
|
@ -956,6 +984,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po
|
|||
const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset);
|
||||
const LLVector4a& normal4a = vf.mNormals[0];
|
||||
const LLVector4a& tangent = vf.mTangents[0];
|
||||
if (!&tangent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLVector4a binormal4a;
|
||||
binormal4a.setCross3(normal4a, tangent);
|
||||
|
|
@ -1299,15 +1331,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
}
|
||||
|
||||
if (shiny_in_alpha)
|
||||
{
|
||||
|
||||
GLfloat alpha[4] =
|
||||
{
|
||||
0.00f,
|
||||
0.25f,
|
||||
0.5f,
|
||||
0.75f
|
||||
};
|
||||
|
||||
static const GLfloat alpha[4] =
|
||||
{
|
||||
0.00f,
|
||||
0.25f,
|
||||
0.5f,
|
||||
0.75f
|
||||
};
|
||||
|
||||
llassert(tep->getShiny() <= 3);
|
||||
color.mV[3] = U8 (alpha[tep->getShiny()] * 255);
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ public:
|
|||
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
|
||||
BOOL hasMedia() const ;
|
||||
|
||||
BOOL switchTexture() ;
|
||||
BOOL switchTexture() ;
|
||||
|
||||
//vertex buffer tracking
|
||||
void setVertexBuffer(LLVertexBuffer* buffer);
|
||||
|
|
@ -230,10 +230,13 @@ public:
|
|||
|
||||
static U32 getRiggedDataMask(U32 type);
|
||||
|
||||
void notifyAboutCreatingTexture(LLViewerTexture *texture);
|
||||
void notifyAboutMissingAsset(LLViewerTexture *texture);
|
||||
|
||||
public: //aligned members
|
||||
LLVector4a mExtents[2];
|
||||
|
||||
private:
|
||||
private:
|
||||
F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
|
||||
BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -348,11 +348,11 @@ void LLFloaterAvatarPicker::populateFriend()
|
|||
|
||||
for(it = collector.mOnline.begin(); it!=collector.mOnline.end(); it++)
|
||||
{
|
||||
friends_scroller->addStringUUIDItem(it->first, it->second);
|
||||
friends_scroller->addStringUUIDItem(it->second, it->first);
|
||||
}
|
||||
for(it = collector.mOffline.begin(); it!=collector.mOffline.end(); it++)
|
||||
{
|
||||
friends_scroller->addStringUUIDItem(it->first, it->second);
|
||||
friends_scroller->addStringUUIDItem(it->second, it->first);
|
||||
}
|
||||
friends_scroller->sortByColumnIndex(0, TRUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,17 @@
|
|||
#include "llsd.h"
|
||||
#include "mean_collision_data.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llfloaterbump.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llpanelblockedlist.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLFloaterBump
|
||||
|
|
@ -43,6 +50,18 @@
|
|||
LLFloaterBump::LLFloaterBump(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Avatar.SendIM", boost::bind(&LLFloaterBump::startIM, this));
|
||||
mCommitCallbackRegistrar.add("Avatar.ReportAbuse", boost::bind(&LLFloaterBump::reportAbuse, this));
|
||||
mCommitCallbackRegistrar.add("ShowAgentProfile", boost::bind(&LLFloaterBump::showProfile, this));
|
||||
mCommitCallbackRegistrar.add("Avatar.InviteToGroup", boost::bind(&LLFloaterBump::inviteToGroup, this));
|
||||
mCommitCallbackRegistrar.add("Avatar.Call", boost::bind(&LLFloaterBump::startCall, this));
|
||||
mEnableCallbackRegistrar.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
|
||||
mCommitCallbackRegistrar.add("Avatar.AddFriend", boost::bind(&LLFloaterBump::addFriend, this));
|
||||
mEnableCallbackRegistrar.add("Avatar.EnableAddFriend", boost::bind(&LLFloaterBump::enableAddFriend, this));
|
||||
mCommitCallbackRegistrar.add("Avatar.Mute", boost::bind(&LLFloaterBump::muteAvatar, this));
|
||||
mEnableCallbackRegistrar.add("Avatar.EnableMute", boost::bind(&LLFloaterBump::enableMute, this));
|
||||
mCommitCallbackRegistrar.add("PayObject", boost::bind(&LLFloaterBump::payAvatar, this));
|
||||
mCommitCallbackRegistrar.add("Tools.LookAtSelection", boost::bind(&LLFloaterBump::zoomInAvatar, this));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -51,13 +70,25 @@ LLFloaterBump::~LLFloaterBump()
|
|||
{
|
||||
}
|
||||
|
||||
BOOL LLFloaterBump::postBuild()
|
||||
{
|
||||
mList = getChild<LLScrollListCtrl>("bump_list");
|
||||
mList->setAllowMultipleSelection(false);
|
||||
mList->setRightMouseDownCallback(boost::bind(&LLFloaterBump::onScrollListRightClicked, this, _1, _2, _3));
|
||||
|
||||
mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
|
||||
mPopupMenu->setItemVisible(std::string("Normal"), false);
|
||||
mPopupMenu->setItemVisible(std::string("Always use impostor"), false);
|
||||
mPopupMenu->setItemVisible(std::string("Never use impostor"), false);
|
||||
mPopupMenu->setItemVisible(std::string("Impostor seperator"), false);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
// virtual
|
||||
void LLFloaterBump::onOpen(const LLSD& key)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("bump_list");
|
||||
if (!list)
|
||||
return;
|
||||
list->deleteAllItems();
|
||||
mNames.clear();
|
||||
mList->deleteAllItems();
|
||||
|
||||
if (gMeanCollisionList.empty())
|
||||
{
|
||||
|
|
@ -65,7 +96,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
|
|||
LLSD row;
|
||||
row["columns"][0]["value"] = none_detected;
|
||||
row["columns"][0]["font"] = "SansSerifBold";
|
||||
list->addElement(row);
|
||||
mList->addElement(row);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -73,7 +104,7 @@ void LLFloaterBump::onOpen(const LLSD& key)
|
|||
iter != gMeanCollisionList.end(); ++iter)
|
||||
{
|
||||
LLMeanCollisionData *mcd = *iter;
|
||||
add(list, mcd);
|
||||
add(mList, mcd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -125,4 +156,94 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd)
|
|||
row["columns"][0]["value"] = text;
|
||||
row["columns"][0]["font"] = "SansSerifBold";
|
||||
list->addElement(row);
|
||||
|
||||
|
||||
mNames[mcd->mPerp] = mcd->mFullName;
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y)
|
||||
{
|
||||
if (!gMeanCollisionList.empty())
|
||||
{
|
||||
LLScrollListItem* item = mList->hitItem(x, y);
|
||||
if (item && mPopupMenu)
|
||||
{
|
||||
mItemUUID = item->getUUID();
|
||||
mPopupMenu->buildDrawLabels();
|
||||
mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
||||
std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar";
|
||||
mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg));
|
||||
mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID));
|
||||
|
||||
((LLContextMenu*)mPopupMenu)->show(x, y);
|
||||
LLMenuGL::showPopup(ctrl, mPopupMenu, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterBump::startIM()
|
||||
{
|
||||
LLAvatarActions::startIM(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::startCall()
|
||||
{
|
||||
LLAvatarActions::startCall(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::reportAbuse()
|
||||
{
|
||||
LLFloaterReporter::showFromAvatar(mItemUUID, "av_name");
|
||||
}
|
||||
|
||||
void LLFloaterBump::showProfile()
|
||||
{
|
||||
LLAvatarActions::showProfile(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::addFriend()
|
||||
{
|
||||
LLAvatarActions::requestFriendshipDialog(mItemUUID);
|
||||
}
|
||||
|
||||
bool LLFloaterBump::enableAddFriend()
|
||||
{
|
||||
return !LLAvatarActions::isFriend(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::muteAvatar()
|
||||
{
|
||||
LLMute mute(mItemUUID, mNames[mItemUUID], LLMute::AGENT);
|
||||
if (LLMuteList::getInstance()->isMuted(mute.mID))
|
||||
{
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
LLPanelBlockedList::showPanelAndSelect(mute.mID);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterBump::payAvatar()
|
||||
{
|
||||
LLAvatarActions::pay(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::zoomInAvatar()
|
||||
{
|
||||
handle_zoom_to_object(mItemUUID);
|
||||
}
|
||||
|
||||
bool LLFloaterBump::enableMute()
|
||||
{
|
||||
return LLAvatarActions::canBlock(mItemUUID);
|
||||
}
|
||||
|
||||
void LLFloaterBump::inviteToGroup()
|
||||
{
|
||||
LLAvatarActions::inviteToGroup(mItemUUID);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#define LL_LLFLOATERBUMP_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "llmenugl.h"
|
||||
|
||||
class LLMeanCollisionData;
|
||||
class LLScrollListCtrl;
|
||||
|
|
@ -39,14 +40,36 @@ class LLFloaterBump
|
|||
friend class LLFloaterReg;
|
||||
protected:
|
||||
void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
|
||||
void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y);
|
||||
|
||||
public:
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
void startIM();
|
||||
void startCall();
|
||||
void reportAbuse();
|
||||
void showProfile();
|
||||
void addFriend();
|
||||
void inviteToGroup();
|
||||
bool enableAddFriend();
|
||||
void muteAvatar();
|
||||
void payAvatar();
|
||||
void zoomInAvatar();
|
||||
bool enableMute();
|
||||
|
||||
private:
|
||||
|
||||
LLFloaterBump(const LLSD& key);
|
||||
virtual ~LLFloaterBump();
|
||||
|
||||
LLScrollListCtrl* mList;
|
||||
LLMenuGL* mPopupMenu;
|
||||
LLUUID mItemUUID;
|
||||
|
||||
typedef std::map<LLUUID, std::string> uuid_map_t;
|
||||
uuid_map_t mNames;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "llfloaterreg.h"
|
||||
|
||||
// Viewer includes
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "lljoystickbutton.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
|
@ -342,6 +343,8 @@ void LLFloaterCamera::onClose(bool app_quitting)
|
|||
|
||||
switchMode(CAMERA_CTRL_MODE_PAN);
|
||||
mClosed = TRUE;
|
||||
|
||||
gAgent.setMovementLocked(FALSE);
|
||||
}
|
||||
|
||||
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
|
||||
|
|
|
|||
|
|
@ -342,11 +342,6 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
|
|||
curG = curGIn;
|
||||
curB = curBIn;
|
||||
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
|
||||
// update corresponding HSL values and
|
||||
LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL);
|
||||
|
||||
|
|
@ -374,11 +369,6 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
|
|||
|
||||
// update corresponding RGB values and
|
||||
hslToRgb ( curH, curS, curL, curR, curG, curB );
|
||||
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -467,7 +457,8 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data)
|
|||
|
||||
void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te )
|
||||
{
|
||||
setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
|
||||
// Pipete
|
||||
selectCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]);
|
||||
}
|
||||
|
||||
void LLFloaterColorPicker::onMouseCaptureLost()
|
||||
|
|
@ -642,6 +633,28 @@ const LLColor4& LLFloaterColorPicker::getComplimentaryColor ( const LLColor4& ba
|
|||
return LLColor4::black;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// set current RGB and rise change event if needed.
|
||||
void LLFloaterColorPicker::selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn )
|
||||
{
|
||||
setCurRgb(curRIn, curGIn, curBIn);
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// set current HSL and rise change event if needed.
|
||||
void LLFloaterColorPicker::selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn )
|
||||
{
|
||||
setCurHsl(curHIn, curSIn, curLIn);
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// draw color palette
|
||||
void LLFloaterColorPicker::drawPalette ()
|
||||
|
|
@ -736,7 +749,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
|
|||
}
|
||||
|
||||
// update current RGB (and implicitly HSL)
|
||||
setCurRgb ( rVal, gVal, bVal );
|
||||
selectCurRgb ( rVal, gVal, bVal );
|
||||
|
||||
updateTextEntry ();
|
||||
}
|
||||
|
|
@ -759,15 +772,10 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
|
|||
lVal = (F32)ctrl->getValue().asReal() / 100.0f;
|
||||
|
||||
// update current HSL (and implicitly RGB)
|
||||
setCurHsl ( hVal, sVal, lVal );
|
||||
selectCurHsl ( hVal, sVal, lVal );
|
||||
|
||||
updateTextEntry ();
|
||||
}
|
||||
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -780,7 +788,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
|
|||
yPosIn >= mRGBViewerImageTop - mRGBViewerImageHeight )
|
||||
{
|
||||
// update HSL (and therefore RGB) based on new H & S and current L
|
||||
setCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
|
||||
selectCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth,
|
||||
( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight,
|
||||
getCurL () );
|
||||
|
||||
|
|
@ -795,7 +803,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn )
|
|||
{
|
||||
|
||||
// update HSL (and therefore RGB) based on current HS and new L
|
||||
setCurHsl ( getCurH (),
|
||||
selectCurHsl ( getCurH (),
|
||||
getCurS (),
|
||||
( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight );
|
||||
|
||||
|
|
@ -887,7 +895,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
LLColor4 selected = *mPalette [ index ];
|
||||
|
||||
setCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
|
||||
selectCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] );
|
||||
|
||||
if (mApplyImmediateCheck->get())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,6 +122,9 @@ class LLFloaterColorPicker
|
|||
static void onImmediateCheck ( LLUICtrl* ctrl, void* data );
|
||||
void onColorSelect( const class LLTextureEntry& te );
|
||||
private:
|
||||
// mutators for color values, can raise event to preview changes at object
|
||||
void selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn );
|
||||
void selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn );
|
||||
// draws color selection palette
|
||||
void drawPalette ();
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#include "lltabcontainer.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel");
|
||||
static LLPanelInjector<LLFlickrAccountPanel> t_panel_account("llflickraccountpanel");
|
||||
|
||||
|
|
@ -345,7 +345,12 @@ void LLFlickrPhotoPanel::sendPhoto()
|
|||
std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
|
||||
if (!parcel_name.empty())
|
||||
{
|
||||
photo_link_text += " at " + parcel_name;
|
||||
boost::regex pattern = boost::regex("\\S\\.[a-zA-Z]{2,}");
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
if(!boost::regex_search(parcel_name, matches, pattern))
|
||||
{
|
||||
photo_link_text += " at " + parcel_name;
|
||||
}
|
||||
}
|
||||
photo_link_text += " in Second Life";
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,157 @@
|
|||
/**
|
||||
* @file llfloaterhoverheight.cpp
|
||||
* @brief Controller for self avatar hover height
|
||||
* @author vir@lindenlab.com
|
||||
*
|
||||
* $LicenseInfo:firstyear=2014&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2014, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloaterhoverheight.h"
|
||||
#include "llsliderctrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key)
|
||||
{
|
||||
}
|
||||
|
||||
void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data)
|
||||
{
|
||||
F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
|
||||
|
||||
LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data);
|
||||
LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider");
|
||||
sldrCtrl->setValue(value,FALSE);
|
||||
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
|
||||
LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
|
||||
gAgentAvatarp->setHoverOffset(offset);
|
||||
//gAgentAvatarp->sendHoverHeight();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterHoverHeight::postBuild()
|
||||
{
|
||||
LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
|
||||
sldrCtrl->setMinValue(MIN_HOVER_Z);
|
||||
sldrCtrl->setMaxValue(MAX_HOVER_Z);
|
||||
sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
|
||||
sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
|
||||
childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL);
|
||||
|
||||
// Initialize slider from pref setting.
|
||||
syncFromPreferenceSetting(this);
|
||||
// Update slider on future pref changes.
|
||||
if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
|
||||
{
|
||||
gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL;
|
||||
}
|
||||
|
||||
updateEditEnabled();
|
||||
|
||||
if (!mRegionChangedSlot.connected())
|
||||
{
|
||||
mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this));
|
||||
}
|
||||
// Set up based on initial region.
|
||||
onRegionChanged();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterHoverHeight::onClose(bool app_quitting)
|
||||
{
|
||||
if (mRegionChangedSlot.connected())
|
||||
{
|
||||
mRegionChangedSlot.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
|
||||
{
|
||||
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
|
||||
F32 value = sldrCtrl->getValueF32();
|
||||
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
|
||||
LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
|
||||
gAgentAvatarp->setHoverOffset(offset, false);
|
||||
}
|
||||
|
||||
// Do send-to-the-server work when slider drag completes, or new
|
||||
// value entered as text.
|
||||
void LLFloaterHoverHeight::onFinalCommit()
|
||||
{
|
||||
LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
|
||||
F32 value = sldrCtrl->getValueF32();
|
||||
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value);
|
||||
|
||||
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
|
||||
LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
|
||||
gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
|
||||
}
|
||||
|
||||
void LLFloaterHoverHeight::onRegionChanged()
|
||||
{
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
if (region && region->simulatorFeaturesReceived())
|
||||
{
|
||||
updateEditEnabled();
|
||||
}
|
||||
else if (region)
|
||||
{
|
||||
region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLFloaterHoverHeight::onSimulatorFeaturesReceived,this,_1));
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterHoverHeight::onSimulatorFeaturesReceived(const LLUUID ®ion_id)
|
||||
{
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
if (region && (region->getRegionID()==region_id))
|
||||
{
|
||||
updateEditEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterHoverHeight::updateEditEnabled()
|
||||
{
|
||||
bool enabled = gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled();
|
||||
LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
|
||||
sldrCtrl->setEnabled(enabled);
|
||||
if (enabled)
|
||||
{
|
||||
syncFromPreferenceSetting(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* @file llfloaterhoverheight.h
|
||||
* @brief Controller for self avatar hover height.
|
||||
* @author vir@lindenlab.com
|
||||
*
|
||||
* $LicenseInfo:firstyear=2014&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2014, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#ifndef LL_LLFLOATERHOVERHEIGHT_H
|
||||
#define LL_LLFLOATERHOVERHEIGHT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLFloaterHoverHeight: public LLFloater
|
||||
{
|
||||
public:
|
||||
LLFloaterHoverHeight(const LLSD& key);
|
||||
BOOL postBuild();
|
||||
|
||||
static void onSliderMoved(LLUICtrl* ctrl, void* userData);
|
||||
|
||||
void onFinalCommit();
|
||||
|
||||
static void syncFromPreferenceSetting(void *user_data);
|
||||
|
||||
void onRegionChanged();
|
||||
void onSimulatorFeaturesReceived(const LLUUID ®ion_id);
|
||||
void updateEditEnabled();
|
||||
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
boost::signals2::connection mRegionChangedSlot;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -118,6 +118,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid
|
|||
else
|
||||
{
|
||||
conv = LLFloaterReg::getTypedInstance<LLFloaterIMSessionTab>("impanel", LLSD(uuid));
|
||||
conv->setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE);
|
||||
}
|
||||
|
||||
return conv;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "llfloatertools.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llselectmgr.h"
|
||||
|
|
@ -147,8 +148,17 @@ void LLFloaterInspect::onClickOwnerProfile()
|
|||
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
|
||||
if(node)
|
||||
{
|
||||
const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
if(node->mPermissions->isGroupOwned())
|
||||
{
|
||||
const LLUUID& idGroup = node->mPermissions->getGroup();
|
||||
LLGroupActions::show(idGroup);
|
||||
}
|
||||
else
|
||||
{
|
||||
const LLUUID& owner_id = node->mPermissions->getOwner();
|
||||
LLAvatarActions::showProfile(owner_id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -219,21 +229,42 @@ void LLFloaterInspect::refresh()
|
|||
const LLUUID& idCreator = obj->mPermissions->getCreator();
|
||||
LLAvatarName av_name;
|
||||
|
||||
// Only work with the names if we actually get a result
|
||||
// from the name cache. If not, defer setting the
|
||||
// actual name and set a placeholder.
|
||||
if (LLAvatarNameCache::get(idOwner, &av_name))
|
||||
if(obj->mPermissions->isGroupOwned())
|
||||
{
|
||||
owner_name = av_name.getCompleteName();
|
||||
std::string group_name;
|
||||
const LLUUID& idGroup = obj->mPermissions->getGroup();
|
||||
if(gCacheName->getGroupName(idGroup, group_name))
|
||||
{
|
||||
owner_name = "[" + group_name + "] (group)";
|
||||
}
|
||||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
if (mOwnerNameCacheConnection.connected())
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
}
|
||||
mOwnerNameCacheConnection = gCacheName->getGroup(idGroup, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
if (mOwnerNameCacheConnection.connected())
|
||||
// Only work with the names if we actually get a result
|
||||
// from the name cache. If not, defer setting the
|
||||
// actual name and set a placeholder.
|
||||
if (LLAvatarNameCache::get(idOwner, &av_name))
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
owner_name = av_name.getCompleteName();
|
||||
}
|
||||
else
|
||||
{
|
||||
owner_name = LLTrans::getString("RetrievingData");
|
||||
if (mOwnerNameCacheConnection.connected())
|
||||
{
|
||||
mOwnerNameCacheConnection.disconnect();
|
||||
}
|
||||
mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
|
||||
}
|
||||
mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(idCreator, &av_name))
|
||||
|
|
|
|||
|
|
@ -2019,6 +2019,7 @@ void LLPanelLandOptions::refresh()
|
|||
else
|
||||
{
|
||||
// something selected, hooray!
|
||||
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
|
||||
// Display options
|
||||
BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
|
||||
|
|
@ -2034,8 +2035,9 @@ void LLPanelLandOptions::refresh()
|
|||
mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry());
|
||||
mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
|
||||
|
||||
BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE;
|
||||
mCheckSafe ->set( !parcel->getAllowDamage() );
|
||||
mCheckSafe ->setEnabled( can_change_options );
|
||||
mCheckSafe ->setEnabled( can_change_options && region_damage );
|
||||
|
||||
mCheckFly ->set( parcel->getAllowFly() );
|
||||
mCheckFly ->setEnabled( can_change_options );
|
||||
|
|
@ -2115,7 +2117,6 @@ void LLPanelLandOptions::refresh()
|
|||
|
||||
// they can see the checkbox, but its disposition depends on the
|
||||
// state of the region
|
||||
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||
if (regionp)
|
||||
{
|
||||
if (regionp->getSimAccess() == SIM_ACCESS_PG)
|
||||
|
|
|
|||
|
|
@ -738,6 +738,11 @@ void LLFloaterModelPreview::toggleGenarateNormals()
|
|||
{
|
||||
bool enabled = childGetValue("gen_normals").asBoolean();
|
||||
childSetEnabled("crease_angle", enabled);
|
||||
if(enabled) {
|
||||
mModelPreview->generateNormals();
|
||||
} else {
|
||||
mModelPreview->restoreNormals();
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
|
|
@ -3840,7 +3845,6 @@ void LLModelPreview::generateNormals()
|
|||
|
||||
S32 which_lod = mPreviewLOD;
|
||||
|
||||
|
||||
if (which_lod > 4 || which_lod < 0 ||
|
||||
mModel[which_lod].empty())
|
||||
{
|
||||
|
|
@ -3855,19 +3859,81 @@ void LLModelPreview::generateNormals()
|
|||
|
||||
if (which_lod == 3 && !mBaseModel.empty())
|
||||
{
|
||||
for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)
|
||||
if(mBaseModelFacesCopy.empty())
|
||||
{
|
||||
(*iter)->generateNormals(angle_cutoff);
|
||||
mBaseModelFacesCopy.reserve(mBaseModel.size());
|
||||
for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
|
||||
{
|
||||
v_LLVolumeFace_t faces;
|
||||
(*it)->copyFacesTo(faces);
|
||||
mBaseModelFacesCopy.push_back(faces);
|
||||
}
|
||||
}
|
||||
|
||||
for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it)
|
||||
{
|
||||
(*it)->generateNormals(angle_cutoff);
|
||||
}
|
||||
|
||||
mVertexBuffer[5].clear();
|
||||
}
|
||||
|
||||
for (LLModelLoader::model_list::iterator iter = mModel[which_lod].begin(); iter != mModel[which_lod].end(); ++iter)
|
||||
{
|
||||
(*iter)->generateNormals(angle_cutoff);
|
||||
bool perform_copy = mModelFacesCopy[which_lod].empty();
|
||||
if(perform_copy) {
|
||||
mModelFacesCopy[which_lod].reserve(mModel[which_lod].size());
|
||||
}
|
||||
|
||||
for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it)
|
||||
{
|
||||
if(perform_copy)
|
||||
{
|
||||
v_LLVolumeFace_t faces;
|
||||
(*it)->copyFacesTo(faces);
|
||||
mModelFacesCopy[which_lod].push_back(faces);
|
||||
}
|
||||
|
||||
(*it)->generateNormals(angle_cutoff);
|
||||
}
|
||||
|
||||
mVertexBuffer[which_lod].clear();
|
||||
refresh();
|
||||
updateStatusMessages();
|
||||
}
|
||||
|
||||
void LLModelPreview::restoreNormals()
|
||||
{
|
||||
S32 which_lod = mPreviewLOD;
|
||||
|
||||
if (which_lod > 4 || which_lod < 0 ||
|
||||
mModel[which_lod].empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!mBaseModelFacesCopy.empty())
|
||||
{
|
||||
llassert(mBaseModelFacesCopy.size() == mBaseModel.size());
|
||||
|
||||
vv_LLVolumeFace_t::const_iterator itF = mBaseModelFacesCopy.begin();
|
||||
for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it, ++itF)
|
||||
{
|
||||
(*it)->copyFacesFrom((*itF));
|
||||
}
|
||||
|
||||
mBaseModelFacesCopy.clear();
|
||||
}
|
||||
|
||||
if(!mModelFacesCopy[which_lod].empty())
|
||||
{
|
||||
vv_LLVolumeFace_t::const_iterator itF = mModelFacesCopy[which_lod].begin();
|
||||
for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it, ++itF)
|
||||
{
|
||||
(*it)->copyFacesFrom((*itF));
|
||||
}
|
||||
|
||||
mModelFacesCopy[which_lod].clear();
|
||||
}
|
||||
|
||||
mVertexBuffer[which_lod].clear();
|
||||
refresh();
|
||||
updateStatusMessages();
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ public:
|
|||
void loadModelCallback(S32 lod);
|
||||
void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false);
|
||||
void generateNormals();
|
||||
void restoreNormals();
|
||||
U32 calcResourceCost();
|
||||
void rebuildUploadData();
|
||||
void saveUploadData(bool save_skinweights, bool save_joint_poisitions);
|
||||
|
|
@ -447,6 +448,12 @@ private:
|
|||
LLModelLoader::model_list mModel[LLModel::NUM_LODS];
|
||||
LLModelLoader::model_list mBaseModel;
|
||||
|
||||
typedef std::vector<LLVolumeFace> v_LLVolumeFace_t;
|
||||
typedef std::vector<v_LLVolumeFace_t> vv_LLVolumeFace_t;
|
||||
|
||||
vv_LLVolumeFace_t mModelFacesCopy[LLModel::NUM_LODS];
|
||||
vv_LLVolumeFace_t mBaseModelFacesCopy;
|
||||
|
||||
U32 mGroup;
|
||||
std::map<LLPointer<LLModel>, U32> mObject;
|
||||
U32 mMaxTriangleLimit;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
#include "llagent.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
|
||||
: LLFloater(seed)
|
||||
|
|
@ -171,8 +173,9 @@ public:
|
|||
private:
|
||||
static std::string sPreviousReason;
|
||||
|
||||
void error(U32 status, const std::string& reason)
|
||||
void httpFailure()
|
||||
{
|
||||
const std::string& reason = getReason();
|
||||
// Do not display the same error more than once in a row
|
||||
if (reason != sPreviousReason)
|
||||
{
|
||||
|
|
@ -182,8 +185,12 @@ private:
|
|||
LLNotificationsUtil::add("DefaultObjectPermissions", args);
|
||||
}
|
||||
}
|
||||
void result(const LLSD& content)
|
||||
|
||||
void httpSuccess()
|
||||
{
|
||||
//const LLSD& content = getContent();
|
||||
//dump_sequential_xml("perms_responder_result.xml", content);
|
||||
|
||||
// Since we have had a successful POST call be sure to display the next error message
|
||||
// even if it is the same as a previous one.
|
||||
sPreviousReason = "";
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "message.h"
|
||||
#include "llfloaterautoreplacesettings.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcolorswatch.h"
|
||||
#include "llcombobox.h"
|
||||
|
|
@ -74,6 +75,7 @@
|
|||
#include "llviewermessage.h"
|
||||
#include "llviewershadermgr.h"
|
||||
#include "llviewerthrottle.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llvotree.h"
|
||||
#include "llvosky.h"
|
||||
#include "llfloaterpathfindingconsole.h"
|
||||
|
|
@ -251,6 +253,14 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue)
|
|||
LLVOAvatar::invalidateNameTags();
|
||||
}
|
||||
|
||||
void handleAppearanceCameraMovementChanged(const LLSD& newvalue)
|
||||
{
|
||||
if(!newvalue.asBoolean() && gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
gAgentCamera.resetView();
|
||||
}
|
||||
}
|
||||
|
||||
/*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
|
||||
{
|
||||
|
|
@ -361,6 +371,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
|
||||
|
||||
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2));
|
||||
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
|
||||
|
||||
mCommitCallbackRegistrar.add("Pref.ClearLog", boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance()));
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llcombobox.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryobserver.h"
|
||||
|
|
@ -143,7 +144,7 @@ BOOL LLFloaterProperties::postBuild()
|
|||
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitPermissions, this));
|
||||
// Mark for sale or not, and sale info
|
||||
getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
|
||||
getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
|
||||
getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this));
|
||||
// "Price" label for edit
|
||||
getChild<LLUICtrl>("Edit Cost")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this));
|
||||
// The UI has been built, now fill in all the values
|
||||
|
|
@ -188,7 +189,7 @@ void LLFloaterProperties::refresh()
|
|||
"CheckNextOwnerCopy",
|
||||
"CheckNextOwnerTransfer",
|
||||
"CheckPurchase",
|
||||
"RadioSaleType",
|
||||
"ComboBoxSaleType",
|
||||
"Edit Cost"
|
||||
};
|
||||
for(size_t t=0; t<LL_ARRAY_SIZE(enableNames); ++t)
|
||||
|
|
@ -479,6 +480,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
|
||||
const LLSaleInfo& sale_info = item->getSaleInfo();
|
||||
BOOL is_for_sale = sale_info.isForSale();
|
||||
LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
|
||||
LLUICtrl* edit_cost = getChild<LLUICtrl>("Edit Cost");
|
||||
|
||||
// Check for ability to change values.
|
||||
if (is_obj_modify && can_agent_sell
|
||||
&& gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE))
|
||||
|
|
@ -491,9 +495,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions);
|
||||
getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
|
||||
|
||||
getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale);
|
||||
getChildView("TextPrice")->setEnabled(is_complete && is_for_sale);
|
||||
getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale);
|
||||
combo_sale_type->setEnabled(is_complete && is_for_sale);
|
||||
edit_cost->setEnabled(is_complete && is_for_sale);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -505,31 +509,28 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
getChildView("CheckNextOwnerCopy")->setEnabled(FALSE);
|
||||
getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE);
|
||||
|
||||
getChildView("RadioSaleType")->setEnabled(FALSE);
|
||||
getChildView("TextPrice")->setEnabled(FALSE);
|
||||
getChildView("Edit Cost")->setEnabled(FALSE);
|
||||
combo_sale_type->setEnabled(FALSE);
|
||||
edit_cost->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
// Set values.
|
||||
getChild<LLUICtrl>("CheckPurchase")->setValue(is_for_sale);
|
||||
getChildView("combobox sale copy")->setEnabled(is_for_sale);
|
||||
getChildView("Edit Cost")->setEnabled(is_for_sale);
|
||||
getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY)));
|
||||
getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY)));
|
||||
getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER)));
|
||||
|
||||
LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType");
|
||||
if (is_for_sale)
|
||||
{
|
||||
radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1);
|
||||
S32 numerical_price;
|
||||
numerical_price = sale_info.getSalePrice();
|
||||
getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price));
|
||||
edit_cost->setValue(llformat("%d",numerical_price));
|
||||
combo_sale_type->setValue(sale_info.getSaleType());
|
||||
}
|
||||
else
|
||||
{
|
||||
radioSaleType->setSelectedIndex(-1);
|
||||
getChild<LLUICtrl>("Edit Cost")->setValue(llformat("%d",0));
|
||||
edit_cost->setValue(llformat("%d",0));
|
||||
combo_sale_type->setValue(LLSaleInfo::FS_COPY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -757,25 +758,11 @@ void LLFloaterProperties::updateSaleInfo()
|
|||
{
|
||||
// turn on sale info
|
||||
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY;
|
||||
|
||||
LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("RadioSaleType");
|
||||
if(RadioSaleType)
|
||||
|
||||
LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType");
|
||||
if (combo_sale_type)
|
||||
{
|
||||
switch (RadioSaleType->getSelectedIndex())
|
||||
{
|
||||
case 0:
|
||||
sale_type = LLSaleInfo::FS_ORIGINAL;
|
||||
break;
|
||||
case 1:
|
||||
sale_type = LLSaleInfo::FS_COPY;
|
||||
break;
|
||||
case 2:
|
||||
sale_type = LLSaleInfo::FS_CONTENTS;
|
||||
break;
|
||||
default:
|
||||
sale_type = LLSaleInfo::FS_COPY;
|
||||
break;
|
||||
}
|
||||
sale_type = static_cast<LLSaleInfo::EForSale>(combo_sale_type->getValue().asInteger());
|
||||
}
|
||||
|
||||
if (sale_type == LLSaleInfo::FS_COPY
|
||||
|
|
|
|||
|
|
@ -367,8 +367,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
|
|||
LLViewerWindow::ESnapshotType layer_type = getLayerType(floater);
|
||||
|
||||
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
|
||||
enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
|
||||
setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
|
||||
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
|
||||
|
||||
LLPanelSnapshot* active_panel = getActivePanel(floater);
|
||||
|
|
@ -478,8 +476,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (previewp)
|
||||
setAspectRatioCheckboxValue(floater, !floater->impl.mAspectRatioCheckOff && gSavedSettings.getBOOL("KeepAspectForSnapshot"));
|
||||
|
||||
if (previewp)
|
||||
{
|
||||
previewp->setSnapshotType(shot_type);
|
||||
previewp->setSnapshotFormat(shot_format);
|
||||
|
|
@ -554,7 +553,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
|
|||
{
|
||||
view->impl.setStatus(Impl::STATUS_READY);
|
||||
LL_DEBUGS() << "updating snapshot" << LL_ENDL;
|
||||
previewp->updateSnapshot(TRUE);
|
||||
previewp->mForceUpdateSnapshot = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -627,6 +626,13 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
|
|||
|
||||
if (view)
|
||||
{
|
||||
LLPanelSnapshot* active_panel = getActivePanel(view);
|
||||
if (checked && active_panel)
|
||||
{
|
||||
LLComboBox* combo = view->getChild<LLComboBox>(active_panel->getImageSizeComboName());
|
||||
combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
|
||||
}
|
||||
|
||||
LLSnapshotLivePreview* previewp = getPreviewView(view) ;
|
||||
if(previewp)
|
||||
{
|
||||
|
|
@ -691,7 +697,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
|
|||
}
|
||||
|
||||
view->impl.mAspectRatioCheckOff = !enable_cb;
|
||||
enableAspectRatioCheckbox(view, enable_cb);
|
||||
|
||||
if (previewp)
|
||||
{
|
||||
previewp->mKeepAspectRatio = keep_aspect;
|
||||
|
|
@ -1193,6 +1199,22 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
|
|||
void LLFloaterSnapshot::onClose(bool app_quitting)
|
||||
{
|
||||
getParent()->setMouseOpaque(FALSE);
|
||||
|
||||
//unfreeze everything, hide fullscreen preview
|
||||
LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView(this);
|
||||
if (previewp)
|
||||
{
|
||||
previewp->setVisible(FALSE);
|
||||
previewp->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
gSavedSettings.setBOOL("FreezeTime", FALSE);
|
||||
impl.mAvatarPauseHandles.clear();
|
||||
|
||||
if (impl.mLastToolset)
|
||||
{
|
||||
LLToolMgr::getInstance()->setCurrentToolset(impl.mLastToolset);
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewertexture.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llworldmap.h"
|
||||
#include "llworldmapmessage.h"
|
||||
#include "llworldmapview.h"
|
||||
|
|
@ -890,7 +891,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
|
|||
end = collector.mMappable.end();
|
||||
for( ; it != end; ++it)
|
||||
{
|
||||
list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
|
||||
list->addSimpleElement((*it).second, ADD_BOTTOM, (*it).first);
|
||||
}
|
||||
|
||||
list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
|
||||
|
|
@ -1634,3 +1635,10 @@ void LLFloaterWorldMap::onChangeMaturity()
|
|||
gSavedSettings.setBOOL("ShowAdultEvents", FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterWorldMap::onFocusLost()
|
||||
{
|
||||
gViewerWindow->showCursor();
|
||||
LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
|
||||
map_panel->mPanning = FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ public:
|
|||
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
/*virtual*/ void onFocusLost();
|
||||
|
||||
// methods for dealing with inventory. The observe() method is
|
||||
// called during program startup. inventoryUpdated() will be
|
||||
// called by a helper object when an interesting change has
|
||||
|
|
|
|||
|
|
@ -3061,6 +3061,24 @@ void LLIMMgr::inviteToSession(
|
|||
{
|
||||
if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall)
|
||||
{
|
||||
if (!hasSession(session_id) && (type == IM_SESSION_P2P_INVITE))
|
||||
{
|
||||
std::string fixed_session_name = caller_name;
|
||||
if(!session_name.empty() && session_name.size()>1)
|
||||
{
|
||||
fixed_session_name = session_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(caller_id, &av_name))
|
||||
{
|
||||
fixed_session_name = av_name.getDisplayName();
|
||||
}
|
||||
}
|
||||
LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, false, false);
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
addSystemMessage(session_id, "you_auto_rejected_call", args);
|
||||
send_do_not_disturb_message(gMessageSystem, caller_id, session_id);
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data)
|
|||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj);
|
||||
mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
|
||||
|
||||
// Mark this as a transient selection
|
||||
struct SetTransient : public LLSelectedNodeFunctor
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
|
|||
mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1));
|
||||
|
||||
LLPanel * panel = toast->getPanel();
|
||||
if (panel == NULL)
|
||||
{
|
||||
LL_WARNS() << "Could not get toast's panel." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
panel->setVisible(TRUE);
|
||||
panel->setMouseOpaque(FALSE);
|
||||
if(mPanel != NULL && mPanel->getParent() == this)
|
||||
|
|
|
|||
|
|
@ -4462,11 +4462,11 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action)
|
|||
{
|
||||
if ("save_as" == action)
|
||||
{
|
||||
LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES);
|
||||
LLPreviewTexture* preview_texture = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
|
||||
LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID);
|
||||
if (preview_texture)
|
||||
{
|
||||
preview_texture->openToSave();
|
||||
preview_texture->saveAs();
|
||||
}
|
||||
}
|
||||
else LLItemBridge::performAction(model, action);
|
||||
|
|
|
|||
|
|
@ -424,6 +424,7 @@ void LLJoystickCameraRotate::updateSlop()
|
|||
|
||||
BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
gAgent.setMovementLocked(TRUE);
|
||||
updateSlop();
|
||||
|
||||
// Set initial offset based on initial click location
|
||||
|
|
@ -465,6 +466,11 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
return LLJoystick::handleMouseDown(x, y, mask);
|
||||
}
|
||||
|
||||
BOOL LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
gAgent.setMovementLocked(FALSE);
|
||||
return LLJoystick::handleMouseUp(x, y, mask);
|
||||
}
|
||||
|
||||
void LLJoystickCameraRotate::onHeldDown()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ public:
|
|||
virtual void setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom );
|
||||
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
|
||||
virtual void onHeldDown();
|
||||
virtual void draw();
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@
|
|||
#include "llimagedimensionsinfo.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerdisplay.h"
|
||||
|
||||
/*=======================================*/
|
||||
/* Formal declarations, constants, etc. */
|
||||
/*=======================================*/
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue