1.19.1 Viewer merge: QAR_367, QAR-374, QAR-408, QAR-426

QAR_367 (RC1) - merge Branch_1-19-1-Viewer -r 81609 : 81993 -> release
QAR-374 (RC2) - merge Branch_1-19-1-Viewer -r 81993 : 82589 -> release
QAR-408 (RC3) - merge Branch_1-19-1-Viewer -r 82589 : 83128 -> release
QAR-426 (rc4) - merge Branch_1-19-1-Viewer -r 83125 : 83719 -> release
(Actual merge: release@83793 Branch_1-19-1-Viewer-merge@83953 -> release)
master
Steven Bennetts 2008-04-03 19:21:14 +00:00
parent 55c25229b7
commit b5936a4b1d
130 changed files with 874 additions and 426 deletions

View File

@ -12,7 +12,7 @@ Adam Marker
VWR-2755
Aimee Trescothick
VWR-3903
VWR-4803
VWR-4083
Alejandro Rosenthal
VWR-1184
Alissa Sabre
@ -253,6 +253,7 @@ Nicholaz Beresford
VWR-2614
VWR-2411
VWR-2412
VWR-2682
VWR-2684
Nounouch Hapmouche
VWR-238

View File

@ -103,7 +103,7 @@ BOOL LLGesture::trigger(KEY key, MASK mask)
}
BOOL LLGesture::trigger(const LLString &trigger_string)
BOOL LLGesture::trigger(const std::string& trigger_string)
{
llwarns << "Parent class trigger called: you probably didn't mean this." << llendl;
return FALSE;

View File

@ -64,7 +64,7 @@ public:
virtual BOOL trigger(KEY key, MASK mask);
// Triggers if case-insensitive substring matches (assumes string is lowercase)
virtual BOOL trigger(const LLString &string);
virtual BOOL trigger(const std::string &string);
// non-endian-neutral serialization
U8 *serialize(U8 *buffer) const;

View File

@ -36,6 +36,8 @@
#include <sys/time.h>
#endif
#include "stdtypes.h"
// units conversions
#ifndef USEC_PER_SEC
const U32 USEC_PER_SEC = 1000000;

View File

@ -35,7 +35,7 @@
const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 19;
const S32 LL_VERSION_PATCH = 1;
const S32 LL_VERSION_BUILD = 0;
const S32 LL_VERSION_BUILD = 4;
const char * const LL_CHANNEL = "Second Life Release";

View File

@ -85,7 +85,8 @@ void LLCrashLoggerText::updateApplication(LLString message)
LLCrashLogger::LLCrashLogger() :
mCrashBehavior(CRASH_BEHAVIOR_ASK),
mCrashInPreviousExec(false),
mSentCrashLogs(false)
mSentCrashLogs(false),
mCrashHost("")
{
}
@ -145,21 +146,14 @@ void LLCrashLogger::gatherFiles()
gatherPlatformSpecificFiles();
//Use the debug log to reconstruct the URL to send the crash report to
mCrashHost = "https://";
mCrashHost += mDebugLog["CurrentSimHost"].asString();
mCrashHost += ":12043/crash/report";
if(mDebugLog.has("CurrentSimHost"))
{
mCrashHost = "https://";
mCrashHost += mDebugLog["CurrentSimHost"].asString();
mCrashHost += ":12043/crash/report";
}
// Use login servers as the alternate, since they are already load balanced and have a known name
// First, check to see if we have a valid grid name. If not, use agni.
mAltCrashHost = "https://login.";
if(mDebugLog["GridName"].asString() != "")
{
mAltCrashHost += mDebugLog["GridName"].asString();
}
else
{
mAltCrashHost += "agni";
}
mAltCrashHost += ".lindenlab.com:12043/crash/report";
mAltCrashHost = "https://login.agni.lindenlab.com:12043/crash/report";
mCrashInfo["DebugLog"] = mDebugLog;
mFileMap["StatsLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"stats.log");
@ -218,6 +212,26 @@ bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
return true;
}
bool LLCrashLogger::runCrashLogPost(LLString host, LLSD data, LLString msg, int retries, int timeout)
{
gBreak = false;
LLString status_message;
for(int i = 0; i < retries; ++i)
{
status_message = llformat("%s, try %d...", msg.c_str(), i+1);
LLHTTPClient::post(host, data, new LLCrashLoggerResponder(), timeout);
while(!gBreak)
{
updateApplication(status_message);
}
if(gSent)
{
return gSent;
}
}
return gSent;
}
bool LLCrashLogger::sendCrashLogs()
{
gatherFiles();
@ -234,27 +248,20 @@ bool LLCrashLogger::sendCrashLogs()
std::ofstream out_file(report_file.c_str());
LLSDSerialize::toPrettyXML(post_data, out_file);
out_file.close();
LLHTTPClient::post(mCrashHost, post_data, new LLCrashLoggerResponder(), 5);
gBreak = false;
while(!gBreak)
bool sent = false;
if(mCrashHost != "")
{
updateApplication("Sending logs...");
sent = runCrashLogPost(mCrashHost, post_data, "Sending to server", 3, 5);
}
if(!gSent)
if(!sent)
{
gBreak = false;
LLHTTPClient::post(mAltCrashHost, post_data, new LLCrashLoggerResponder(), 5);
while(!gBreak)
{
updateApplication("Sending logs to Alternate Server...");
}
sent = runCrashLogPost(mAltCrashHost, post_data, "Sending to alternate server", 3, 5);
}
mSentCrashLogs = gSent;
mSentCrashLogs = sent;
return true;
}

View File

@ -56,11 +56,11 @@ public:
virtual bool cleanup() { return true; }
void setUserText(LLString& text) { mCrashInfo["UserNotes"] = text; }
S32 getCrashBehavior() { return mCrashBehavior; }
bool runCrashLogPost(LLString host, LLSD data, LLString msg, int retries, int timeout);
protected:
S32 mCrashBehavior;
BOOL mCrashInPreviousExec;
std::map<LLString, LLString> mFileMap;
static const int mMaxSendSize = 200000;
LLString mGridName;
LLControlGroup mCrashSettings;
LLString mProductName;

View File

@ -58,6 +58,7 @@ LLImageBase::LLImageBase()
mComponents(0),
mMemType(LLMemType::MTYPE_IMAGEBASE)
{
mBadBufferAllocation = FALSE ;
}
// virtual
@ -142,10 +143,15 @@ U8* LLImageBase::allocateData(S32 size)
if (!mData || size != mDataSize)
{
deleteData(); // virtual
mBadBufferAllocation = FALSE ;
mData = new U8[size];
if (!mData)
{
llerrs << "allocate image data: " << size << llendl;
//llerrs << "allocate image data: " << size << llendl;
llwarns << "allocate image data: " << size << llendl;
size = 0 ;
mWidth = mHeight = 0 ;
mBadBufferAllocation = TRUE ;
}
mDataSize = size;
}
@ -174,6 +180,30 @@ U8* LLImageBase::reallocateData(S32 size)
return mData;
}
const U8* LLImageBase::getData() const
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
}
return mData;
} // read only
U8* LLImageBase::getData()
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
}
return mData;
}
BOOL LLImageBase::isBufferInvalid()
{
return mBadBufferAllocation || mData == NULL ;
}
void LLImageBase::setSize(S32 width, S32 height, S32 ncomponents)
{
@ -1339,7 +1369,7 @@ S32 LLImageFormatted::calcDiscardLevelBytes(S32 bytes)
//----------------------------------------------------------------------------
// Subclasses that can handle more than 4 channels should override this function.
BOOL LLImageFormatted::decode(LLImageRaw* raw_image,F32 decode_time, S32 first_channel, S32 max_channel)
BOOL LLImageFormatted::decodeChannels(LLImageRaw* raw_image,F32 decode_time, S32 first_channel, S32 max_channel)
{
llassert( (first_channel == 0) && (max_channel == 4) );
return decode( raw_image, decode_time ); // Loads first 4 channels by default.

View File

@ -101,9 +101,10 @@ public:
S8 getComponents() const { return mComponents; }
S32 getDataSize() const { return mDataSize; }
const U8 *getData() const { return mData; } // read only
U8 *getData() { return mData; }
const U8 *getData() const ;
U8 *getData() ;
BOOL isBufferInvalid() ;
void setSize(S32 width, S32 height, S32 ncomponents);
U8* allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 size = -1); // setSize() + allocateData()
@ -135,6 +136,8 @@ private:
S8 mComponents;
BOOL mBadBufferAllocation ;
public:
S16 mMemType; // debug
@ -270,11 +273,11 @@ public:
void appendData(U8 *data, S32 size);
// Loads first 4 channels.
virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time=0.0) = 0;
virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time) = 0;
// Subclasses that can handle more than 4 channels should override this function.
virtual BOOL decode(LLImageRaw* raw_image, F32 decode_time, S32 first_channel, S32 max_channel);
virtual BOOL decodeChannels(LLImageRaw* raw_image, F32 decode_time, S32 first_channel, S32 max_channel);
virtual BOOL encode(const LLImageRaw* raw_image, F32 encode_time=0.0) = 0;
virtual BOOL encode(const LLImageRaw* raw_image, F32 encode_time) = 0;
S8 getCodec() const;
BOOL isDecoding() const { return mDecoding ? TRUE : FALSE; }

View File

@ -45,8 +45,8 @@ public:
LLImageBMP();
/*virtual*/ BOOL updateData();
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
protected:
BOOL decodeColorTable8( U8* dst, U8* src );

View File

@ -308,7 +308,7 @@ BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard)
return TRUE;
}
BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time, bool explicit_mips)
BOOL LLImageDXT::encodeDXT(const LLImageRaw* raw_image, F32 time, bool explicit_mips)
{
llassert_always(raw_image);
@ -396,7 +396,7 @@ BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time, bool explicit_mip
// virtual
BOOL LLImageDXT::encode(const LLImageRaw* raw_image, F32 time)
{
return encode(raw_image, time, false);
return encodeDXT(raw_image, time, false);
}
// virtual

View File

@ -95,15 +95,17 @@ public:
protected:
/*virtual*/ ~LLImageDXT();
private:
BOOL encodeDXT(const LLImageRaw* raw_image, F32 decode_time, bool explicit_mips);
public:
LLImageDXT();
/*virtual*/ BOOL updateData();
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
BOOL encode(const LLImageRaw* raw_image, F32 time, bool explicit_mips);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
/*virtual*/ S32 calcHeaderSize();
/*virtual*/ S32 calcDataSize(S32 discard_level = 0);

View File

@ -250,11 +250,11 @@ BOOL LLImageJ2C::updateData()
BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
{
return decode(raw_imagep, decode_time, 0, 4);
return decodeChannels(raw_imagep, decode_time, 0, 4);
}
BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
LLMemType mt1((LLMemType::EMemType)mMemType);

View File

@ -46,9 +46,9 @@ public:
// Base class overrides
/*virtual*/ BOOL updateData();
/*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time=0.0);
/*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count);
/*virtual*/ BOOL encode(const LLImageRaw *raw_imagep, F32 encode_time=0.0);
/*virtual*/ BOOL decode(LLImageRaw *raw_imagep, F32 decode_time);
/*virtual*/ BOOL decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count);
/*virtual*/ BOOL encode(const LLImageRaw *raw_imagep, F32 encode_time);
/*virtual*/ S32 calcHeaderSize();
/*virtual*/ S32 calcDataSize(S32 discard_level = 0);
/*virtual*/ S32 calcDiscardLevelBytes(S32 bytes);

View File

@ -55,8 +55,8 @@ public:
LLImageJPEG();
/*virtual*/ BOOL updateData();
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 decode_time);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
void setEncodeQuality( S32 q ) { mEncodeQuality = q; } // on a scale from 1 to 100
S32 getEncodeQuality() { return mEncodeQuality; }

View File

@ -43,8 +43,8 @@ public:
LLImagePNG();
BOOL updateData();
BOOL decode(LLImageRaw* raw_image, F32 decode_time = 0.0);
BOOL encode(const LLImageRaw* raw_image, F32 encode_time = 0.0);
BOOL decode(LLImageRaw* raw_image, F32 decode_time);
BOOL encode(const LLImageRaw* raw_image, F32 encode_time);
private:
U8* mTmpWriteBuffer;

View File

@ -115,7 +115,7 @@ bool LLImageWorker::doWork(S32 param)
else
{
// Decode aux channel
decoded = mFormattedImage->decode(mDecodedImage, .1f, param, param); // 1ms
decoded = mFormattedImage->decodeChannels(mDecodedImage, .1f, param, param); // 1ms
}
}
if (decoded)

View File

@ -99,7 +99,7 @@ LLInventoryObject::~LLInventoryObject( void )
{
}
void LLInventoryObject::copy(const LLInventoryObject* other)
void LLInventoryObject::copyObject(const LLInventoryObject* other)
{
mUUID = other->mUUID;
mParentUUID = other->mParentUUID;
@ -309,7 +309,7 @@ LLInventoryItem::LLInventoryItem() :
LLInventoryItem::LLInventoryItem(const LLInventoryItem* other) :
LLInventoryObject()
{
copy(other);
copyItem(other);
}
LLInventoryItem::~LLInventoryItem()
@ -317,9 +317,9 @@ LLInventoryItem::~LLInventoryItem()
}
// virtual
void LLInventoryItem::copy(const LLInventoryItem* other)
void LLInventoryItem::copyItem(const LLInventoryItem* other)
{
LLInventoryObject::copy(other);
copyObject(other);
mPermissions = other->mPermissions;
mAssetUUID = other->mAssetUUID;
mDescription = other->mDescription;
@ -331,10 +331,10 @@ void LLInventoryItem::copy(const LLInventoryItem* other)
// As a constructor alternative, the clone() method works like a
// copy constructor, but gens a new UUID.
void LLInventoryItem::clone(LLPointer<LLInventoryItem>& newitem) const
void LLInventoryItem::cloneItem(LLPointer<LLInventoryItem>& newitem) const
{
newitem = new LLInventoryItem;
newitem->copy(this);
newitem->copyItem(this);
newitem->mUUID.generate();
}
@ -1335,7 +1335,7 @@ LLInventoryCategory::LLInventoryCategory() :
LLInventoryCategory::LLInventoryCategory(const LLInventoryCategory* other) :
LLInventoryObject()
{
copy(other);
copyCategory(other);
}
LLInventoryCategory::~LLInventoryCategory()
@ -1343,9 +1343,9 @@ LLInventoryCategory::~LLInventoryCategory()
}
// virtual
void LLInventoryCategory::copy(const LLInventoryCategory* other)
void LLInventoryCategory::copyCategory(const LLInventoryCategory* other)
{
LLInventoryObject::copy(other);
copyObject(other);
mPreferredType = other->mPreferredType;
}

View File

@ -85,7 +85,7 @@ public:
LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
LLAssetType::EType type, const LLString& name);
LLInventoryObject();
virtual void copy(const LLInventoryObject* other); // LLRefCount requires custom copy
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
// accessors
const LLUUID& getUUID() const;
@ -222,12 +222,12 @@ public:
// Note: Because InventoryItems are ref counted, reference copy (a = b)
// is prohibited
LLInventoryItem(const LLInventoryItem* other);
virtual void copy(const LLInventoryItem* other); // LLRefCount requires custom copy
virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
// As a constructor alternative, the clone() method works like a
// copy constructor, but gens a new UUID.
// It is up to the caller to delete (unref) the item.
virtual void clone(LLPointer<LLInventoryItem>& newitem) const;
virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
// accessors
const LLPermissions& getPermissions() const;
@ -306,7 +306,7 @@ public:
const LLString& name);
LLInventoryCategory();
LLInventoryCategory(const LLInventoryCategory* other);
virtual void copy(const LLInventoryCategory* other); // LLRefCount requires custom copy
void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
// accessors and mutators
LLAssetType::EType getPreferredType() const;

View File

@ -567,8 +567,6 @@ public:
{
}
bool isLeaf() { return false; }
bool balance()
{
if (this->getChildCount() == 1 &&

View File

@ -2075,6 +2075,14 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
}
mSculptLevel = sculpt_level;
// Delete any existing faces so that they get regenerated
if (mVolumeFaces)
{
delete[] mVolumeFaces;
mVolumeFaces = NULL;
}
createVolumeFaces();
}
@ -4817,29 +4825,33 @@ BOOL LLVolumeFace::createSide(BOOL partial_build)
}
}
//generate normals
for (U32 i = 0; i < mIndices.size()/3; i++) { //for each triangle
const VertexData& v0 = mVertices[mIndices[i*3+0]];
const VertexData& v1 = mVertices[mIndices[i*3+1]];
const VertexData& v2 = mVertices[mIndices[i*3+2]];
//generate normals
for (U32 i = 0; i < mIndices.size()/3; i++) //for each triangle
{
const S32 i0 = mIndices[i*3+0];
const S32 i1 = mIndices[i*3+1];
const S32 i2 = mIndices[i*3+2];
const VertexData& v0 = mVertices[i0];
const VertexData& v1 = mVertices[i1];
const VertexData& v2 = mVertices[i2];
//calculate triangle normal
LLVector3 norm = (v0.mPosition-v1.mPosition)%
(v0.mPosition-v2.mPosition);
LLVector3 norm = (v0.mPosition-v1.mPosition) % (v0.mPosition-v2.mPosition);
for (U32 j = 0; j < 3; j++)
{ //add triangle normal to vertices
mVertices[mIndices[i*3+j]].mNormal += norm; // * (weight_sum - d[j])/weight_sum;
const S32 idx = mIndices[i*3+j];
mVertices[idx].mNormal += norm; // * (weight_sum - d[j])/weight_sum;
}
//even out quad contributions
if (i % 2 == 0)
if ((i & 1) == 0)
{
mVertices[mIndices[i*3+2]].mNormal += norm;
mVertices[i2].mNormal += norm;
}
else
{
mVertices[mIndices[i*3+1]].mNormal += norm;
mVertices[i1].mNormal += norm;
}
}

View File

@ -229,12 +229,6 @@ LLVolumeLODGroup::LLVolumeLODGroup(const LLVolumeParams &params)
LLVolumeLODGroup::~LLVolumeLODGroup()
{
S32 i;
for (i = 0; i < NUM_LODS; i++)
{
delete mVolumeLODs[i];
mVolumeLODs[i] = NULL;
}
}
@ -242,11 +236,12 @@ LLVolume * LLVolumeLODGroup::getLOD(const S32 detail)
{
llassert(detail >=0 && detail < NUM_LODS);
mAccessCount[detail]++;
mLODRefs[detail]++;
if (!mVolumeLODs[detail])
if (!mLODRefs[detail])
{
mVolumeLODs[detail] = new LLVolume(mParams, mDetailScales[detail]);
}
mLODRefs[detail]++;
return mVolumeLODs[detail];
}

View File

@ -69,7 +69,7 @@ protected:
LLVolumeParams mParams;
S32 mLODRefs[NUM_LODS];
LLVolume *mVolumeLODs[NUM_LODS];
LLPointer<LLVolume> mVolumeLODs[NUM_LODS];
static F32 mDetailThresholds[NUM_LODS];
static F32 mDetailScales[NUM_LODS];
S32 mAccessCount[NUM_LODS];

View File

@ -2,9 +2,6 @@
* @file llblowfishcipher.cpp
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
*
* We do not have OpenSSL headers or libraries on Windows, so this
* class only works on Linux.
*
* $LicenseInfo:firstyear=2007&license=viewergpl$
*
* Copyright (c) 2007, Linden Research, Inc.

View File

@ -121,7 +121,6 @@ void LLCurl::Responder::error(U32 status, const std::string& reason)
// virtual
void LLCurl::Responder::result(const LLSD& content)
{
llwarns << "Virtual Function not implemented" << llendl;
}
// virtual

View File

@ -150,13 +150,10 @@ public:
static std::vector<LLMutex*> sSSLMutex;
// OpenSSL callbacks
static void LLCurl::ssl_locking_callback(int mode, int type, const char *file, int line);
static unsigned long LLCurl::ssl_thread_id(void);
private:
static void ssl_locking_callback(int mode, int type, const char *file, int line);
static unsigned long ssl_thread_id(void);
private:
static std::string sCAPath;
static std::string sCAFile;
};

View File

@ -168,16 +168,10 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
}
// virtual
LLSD LLHTTPNode::del() const
{
throw NotImplemented();
}
// virtual
LLSD LLHTTPNode::del(const LLSD&) const
{
return del();
throw NotImplemented();
}

View File

@ -86,7 +86,6 @@ public:
virtual LLSD put(const LLSD& input) const;
virtual LLSD post(const LLSD& input) const;
virtual LLSD del() const;
virtual LLSD del(const LLSD& context) const;
class Response : public LLRefCount

View File

@ -46,6 +46,7 @@
// SitObject STRING
// SitPosition VEC3
#include "string_table.h"
#include "llmath.h"
#include "v3math.h"
#include "lldbstrings.h"

View File

@ -155,6 +155,8 @@ void LLPartData::setEndAlpha(const F32 alpha)
LLPartSysData::LLPartSysData()
{
mCRC = 0;
mFlags = 0;
mPartData.mFlags = 0;
mPartData.mStartColor = LLColor4(1.f, 1.f, 1.f, 1.f);
mPartData.mEndColor = LLColor4(1.f, 1.f, 1.f, 1.f);
@ -172,6 +174,8 @@ LLPartSysData::LLPartSysData()
mBurstSpeedMin = 1.f; // Minimum particle velocity
mBurstSpeedMax = 1.f; // Maximum particle velocity
mBurstRadius = 0.f;
mNumParticles = 0;
}

View File

@ -84,7 +84,8 @@ class LLPartData
public:
LLPartData() :
mFlags(0),
mMaxAge(0)
mMaxAge(0.f),
mParameter(0.f)
{
}
BOOL unpack(LLDataPacker &dp);
@ -108,7 +109,7 @@ public:
LL_PART_BEAM_MASK = 0x200, // Particle is a "beam" connecting source and target
// Not implemented yet!
//LL_PART_RANDOM_ACCEL_MASK = 0x100, // Patricles have random accelearation
//LL_PART_RANDOM_ACCEL_MASK = 0x100, // Particles have random acceleration
//LL_PART_RANDOM_VEL_MASK = 0x200, // Particles have random velocity shifts"
//LL_PART_TRAIL_MASK = 0x400, // Particles have historical "trails"

View File

@ -235,10 +235,10 @@ bool LLFontGL::loadFaceFallback(LLFontList *fontlistp, const LLString& fontname,
{
LLFont *fontp = new LLFont();
LLString font_path = local_path + *token_iter;
if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI, 2, TRUE))
if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, TRUE))
{
font_path = sys_path + *token_iter;
if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI, 2, TRUE))
if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, TRUE))
{
llwarns << "Couldn't load font " << *token_iter << llendl;
delete fontp;
@ -261,11 +261,11 @@ bool LLFontGL::loadFace(LLFontGL *fontp, const LLString& fontname, const F32 poi
{
LLString local_path = getFontPathLocal();
LLString font_path = local_path + fontname;
if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI))
if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, FALSE))
{
LLString sys_path = getFontPathSystem();
font_path = sys_path + fontname;
if (!fontp->loadFace(font_path.c_str(), point_size, sVertDPI, sHorizDPI))
if (!fontp->loadFace(font_path, point_size, sVertDPI, sHorizDPI, 2, FALSE))
{
llwarns << "Couldn't load font " << fontname << llendl;
return false;
@ -506,9 +506,11 @@ LLFontGL &LLFontGL::operator=(const LLFontGL &source)
return *this;
}
BOOL LLFontGL::loadFace(const LLString& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi)
BOOL LLFontGL::loadFace(const std::string& filename,
const F32 point_size, const F32 vert_dpi, const F32 horz_dpi,
const S32 components, BOOL is_fallback)
{
if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, 2, FALSE))
if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback))
{
return FALSE;
}

View File

@ -97,7 +97,9 @@ public:
static bool loadFaceFallback(LLFontList *fontp, const LLString& fontname, const F32 point_size);
static bool loadFace(LLFontGL *fontp, const LLString& fontname, const F32 point_size, LLFontList *fallback_fontp);
BOOL loadFace(const LLString& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi);
/* virtual*/ BOOL loadFace(const std::string& filename,
const F32 point_size, const F32 vert_dpi, const F32 horz_dpi,
const S32 components, BOOL is_fallback);
S32 renderUTF8(const LLString &text, const S32 begin_offset,

View File

@ -82,7 +82,7 @@ public:
virtual void setEnabled( BOOL b );
virtual void draw();
virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// LLUICtrl interface
virtual void setValue(const LLSD& value );

View File

@ -57,7 +57,6 @@ public:
virtual void setTitle( const LLString& title ) = 0;
virtual const LLString& getTitle() const = 0;
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) = 0;
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);

View File

@ -154,7 +154,7 @@ LLFloater::LLFloater(const LLString& name)
mButtons[i] = NULL;
}
LLString title; // null string
init(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults
initFloater(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults
}
@ -173,7 +173,7 @@ LLFloater::LLFloater(const LLString& name, const LLRect& rect, const LLString& t
mButtonsEnabled[i] = FALSE;
mButtons[i] = NULL;
}
init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
}
LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const LLString& title,
@ -191,12 +191,12 @@ LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const L
mButtonsEnabled[i] = FALSE;
mButtons[i] = NULL;
}
init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
}
// Note: Floaters constructed from XML call init() twice!
void LLFloater::init(const LLString& title,
void LLFloater::initFloater(const LLString& title,
BOOL resizable, S32 min_width, S32 min_height,
BOOL drag_on_left, BOOL minimizable, BOOL close_btn)
{
@ -576,6 +576,11 @@ void LLFloater::close(bool app_quitting)
}
}
/*virtual*/
void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPanel::reshape(width, height, called_from_parent);
}
void LLFloater::releaseFocus()
{
@ -777,8 +782,6 @@ void LLFloater::setMinimized(BOOL minimize)
{
mExpandedRect = getRect();
reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE);
// If the floater has been dragged while minimized in the
// past, then locate it at its previous minimized location.
// Otherwise, ask the view for a minimize position.
@ -833,6 +836,9 @@ void LLFloater::setMinimized(BOOL minimize)
}
mMinimized = TRUE;
// Reshape *after* setting mMinimized
reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE);
}
else
{
@ -845,7 +851,6 @@ void LLFloater::setMinimized(BOOL minimize)
mPreviousMinimizedBottom = currentRect.mBottom;
}
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom );
if (mButtonsEnabled[BUTTON_RESTORE])
@ -874,6 +879,9 @@ void LLFloater::setMinimized(BOOL minimize)
}
mMinimized = FALSE;
// Reshape *after* setting mMinimized
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
}
make_ui_sound("UISndWindowClose");
updateButtons();
@ -1639,11 +1647,11 @@ LLFloaterView::LLFloaterView( const LLString& name, const LLRect& rect )
// By default, adjust vertical.
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
reshape(width, height, called_from_parent, ADJUST_VERTICAL_YES);
reshapeFloater(width, height, called_from_parent, ADJUST_VERTICAL_YES);
}
// When reshaping this view, make the floaters follow their closest edge.
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical)
void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical)
{
S32 old_width = getRect().getWidth();
S32 old_height = getRect().getHeight();
@ -2910,7 +2918,7 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor
setRect(rect);
setName(name);
init(title,
initFloater(title,
resizable,
min_width,
min_height,

View File

@ -119,7 +119,7 @@ public:
// Can be called multiple times to reset floater parameters.
// Deletes all children of the floater.
virtual void init(const LLString& title, BOOL resizable,
virtual void initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn);
@ -128,6 +128,8 @@ public:
// If allowed, close the floater cleanly, releasing focus.
// app_quitting is passed to onClose() below.
virtual void close(bool app_quitting = false);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// Release keyboard and mouse focus
void releaseFocus();
@ -300,8 +302,8 @@ class LLFloaterView : public LLUICtrl
public:
LLFloaterView( const LLString& name, const LLRect& rect );
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
void reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
/*virtual*/ void draw();
/*virtual*/ LLRect getSnapRect() const;

View File

@ -2965,8 +2965,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
class LLPieMenuBranch : public LLMenuItemGL
{
public:
LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch,
enabled_callback ecb, void* user_data);
LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch);
// called to rebuild the draw label
virtual void buildDrawLabel( void );
@ -2978,19 +2977,13 @@ public:
protected:
LLPieMenu* mBranch;
enabled_callback mEnabledCallback;
void* mUserData;
};
LLPieMenuBranch::LLPieMenuBranch(const LLString& name,
const LLString& label,
LLPieMenu* branch,
enabled_callback ecb,
void* user_data)
LLPieMenu* branch)
: LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ),
mBranch( branch ),
mEnabledCallback( ecb ),
mUserData(user_data)
mBranch( branch )
{
mBranch->hide(FALSE);
mBranch->setParentMenuItem(this);
@ -2999,12 +2992,6 @@ LLPieMenuBranch::LLPieMenuBranch(const LLString& name,
// called to rebuild the draw label
void LLPieMenuBranch::buildDrawLabel( void )
{
if(mEnabledCallback)
{
setEnabled(mEnabledCallback(mUserData));
setDrawTextDisabled(FALSE);
}
else
{
// default enablement is this -- if any of the subitems are
// enabled, this item is enabled. JC
@ -3097,7 +3084,7 @@ void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *fac
child->getAttributeString("label", label);
LLPieMenu *submenu = new LLPieMenu(name, label);
appendMenu(submenu);
appendPieMenu(submenu);
submenu->initXML(child, context, factory);
}
else
@ -3479,17 +3466,14 @@ BOOL LLPieMenu::appendSeparator(const LLString &separator_name)
}
// virtual
BOOL LLPieMenu::appendMenu(LLPieMenu *menu,
enabled_callback enabled_cb,
void* user_data)
BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu)
{
if (menu == this)
{
llerrs << "Can't attach a pie menu to itself" << llendl;
}
LLPieMenuBranch *item;
item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu, enabled_cb, user_data);
item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu);
getParent()->addChild(item->getBranch());
item->setFont( LLFontGL::sSansSerifSmall );
return append( item );

View File

@ -512,8 +512,6 @@ public:
static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; }
static BOOL getKeyboardMode() { return sKeyboardMode; }
static void onFocusLost(LLView* old_focus);
static class LLMenuHolderGL* sMenuContainer;
protected:
@ -646,12 +644,8 @@ public:
virtual BOOL append(LLMenuItemGL* item);
virtual BOOL appendSeparator( const LLString &separator_name = "separator" );
// the enabled callback is meant for the submenu. The api works
// this way because the menu branch item responsible for the pie
// submenu is constructed here.
virtual BOOL appendMenu(LLPieMenu *menu,
enabled_callback enabled_cb = NULL,
void* user_data = NULL );
BOOL appendPieMenu(LLPieMenu *menu);
virtual void arrange( void );
// Display the menu centered on this point on the screen.
@ -737,7 +731,7 @@ public:
virtual ~LLMenuHolderGL() {}
virtual BOOL hideMenus();
void reshape(S32 width, S32 height, BOOL called_from_parent);
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void setCanHide(BOOL can_hide) { mCanHide = can_hide; }
// LLView functionality

View File

@ -49,7 +49,7 @@ public:
/*virtual*/ void open(); /* Flawfinder: ignore */
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = 1);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void startModal();
/*virtual*/ void stopModal();

View File

@ -185,7 +185,7 @@ void LLMultiSliderCtrl::setCurSlider(const LLString& name)
mCurValue = mMultiSlider->getCurSliderValue();
}
BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLString& text )
BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text )
{
BOOL res = FALSE;
if (mLabelBox)

View File

@ -79,7 +79,7 @@ public:
virtual void setValue(const LLSD& value );
virtual LLSD getValue() const { return mMultiSlider->getValue(); }
virtual BOOL setLabelArg( const LLString& key, const LLString& text );
virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text );
const LLString& getCurSlider() const { return mMultiSlider->getCurSlider(); }
F32 getCurSliderValue() const { return mCurValue; }

View File

@ -618,7 +618,17 @@ LLString LLPanel::getString(const LLString& name, const LLString::format_map_t&
formatted_string.setArgList(args);
return formatted_string.getString();
}
llerrs << "Failed to find string " << name << " in panel " << getName() << llendl;
LLString err_str("Failed to find string " + name + " in panel " + getName());
// *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be
//if(LLUI::sConfigGroup->getBOOL("QAMode"))
if(LLUI::sQAMode)
{
llerrs << err_str << llendl;
}
else
{
llwarns << err_str << llendl;
}
return LLString::null;
}

View File

@ -87,7 +87,7 @@ public:
BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis) const;
// LLView functionality
virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,

View File

@ -901,6 +901,9 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
return not_too_big;
}
// NOTE: This is *very* expensive for large lists, especially when we are dirtying the list every frame
// while receiving a long list of names.
// *TODO: Use bookkeeping to make this an incramental cost with item additions
void LLScrollListCtrl::calcColumnWidths()
{
const S32 HEADING_TEXT_PADDING = 30;

View File

@ -63,7 +63,7 @@ public:
// from LLView
/*virtual*/ void setValue(const LLSD& value);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void draw();
/*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
/*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );

View File

@ -92,7 +92,7 @@ public:
virtual void onMouseCaptureLost();
// view overrides
virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual void draw();
virtual void onFocusReceived();
virtual void onFocusLost();

View File

@ -81,6 +81,7 @@ LLWindow* LLUI::sWindow = NULL;
LLHtmlHelp* LLUI::sHtmlHelp = NULL;
BOOL LLUI::sShowXUINames = FALSE;
std::stack<LLRect> LLScreenClipRect::sClipRectStack;
BOOL LLUI::sQAMode = FALSE;
//
// Functions
@ -1747,6 +1748,12 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help)
LLUI::sHtmlHelp = html_help;
}
//static
void LLUI::setQAMode(BOOL b)
{
LLUI::sQAMode = b;
}
LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled)
{
if (mEnabled)

View File

@ -198,6 +198,12 @@ public:
static BOOL sShowXUINames;
static LLHtmlHelp* sHtmlHelp;
// *TODO: remove the following when QAR-369 settings clean-up work is in.
// Also remove the call to this method which will then be obsolete.
// Search for QAR-369 below to enable the proper accessing of this feature. -MG
static void setQAMode(BOOL b);
static BOOL sQAMode;
};
// FactoryPolicy is a static class that controls the creation and lookup of UI elements,

View File

@ -644,13 +644,13 @@ void LLView::translate(S32 x, S32 y)
}
// virtual
BOOL LLView::canSnapTo(const LLView* other_view) const
BOOL LLView::canSnapTo(const LLView* other_view)
{
return other_view != this && other_view->getVisible();
}
// virtual
void LLView::snappedTo(LLView* snap_view)
void LLView::snappedTo(const LLView* snap_view)
{
}

View File

@ -106,9 +106,9 @@ virtual void userSetShape(const LLRect& new_rect);
virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
LLScrollListCtrl
virtual BOOL canSnapTo(const LLView* other_view) const { return other_view != this && other_view->getVisible(); }
virtual BOOL canSnapTo(const LLView* other_view) { return other_view != this && other_view->getVisible(); }
LLFloater
virtual void snappedTo(LLView* snap_view) {}
virtual void snappedTo(const LLView* snap_view) {}
LLFloater
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
*
@ -393,9 +393,9 @@ public:
virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);
virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0);
virtual BOOL canSnapTo(const LLView* other_view) const;
virtual BOOL canSnapTo(const LLView* other_view);
virtual void snappedTo(LLView* snap_view);
virtual void snappedTo(const LLView* snap_view);
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);

View File

@ -2880,7 +2880,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
mCurrentCursor = cursor;
}
ECursorType LLWindowMacOSX::getCursor()
ECursorType LLWindowMacOSX::getCursor() const
{
return mCurrentCursor;
}

View File

@ -68,7 +68,7 @@ public:
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
/*virtual*/ void setCursor(ECursorType cursor);
/*virtual*/ ECursorType getCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
@ -114,7 +114,6 @@ public:
/*virtual*/ void bringToFront() {};
/*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
/*virtual*/ void updateLanguageTextInputArea(const LLCoordGL& caret, const LLRect& bounds);
/*virtual*/ void interruptLanguageTextInput();
protected:

View File

@ -48,6 +48,7 @@
extern "C" {
# include "gtk/gtk.h"
}
#include <locale.h>
#endif // LL_GTK
#if LL_LINUX || LL_SOLARIS
@ -137,11 +138,11 @@ BOOL ll_try_gtk_init(void)
<< gtk_major_version << "."
<< gtk_minor_version << "."
<< gtk_micro_version << llendl;
gchar *gtk_warning;
maybe_lock_display();
gtk_warning = gtk_check_version(GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION);
const gchar* gtk_warning = gtk_check_version(
GTK_MAJOR_VERSION,
GTK_MINOR_VERSION,
GTK_MICRO_VERSION);
maybe_unlock_display();
if (gtk_warning)
{
@ -2028,12 +2029,16 @@ void LLWindowSDL::gatherInput()
// and crashness. (SL-35450)
std::string saved_locale = setlocale(LC_ALL, NULL);
// Do a limited number of pumps so SL doesn't starve!
// *TODO: this should ideally be time-limited, not count-limited.
gtk_main_iteration_do(0); // Always do one non-blocking pump
for (int iter=0; iter<10; ++iter)
if (gtk_events_pending())
gtk_main_iteration();
// Pump until we've nothing left to do or passed 1/15th of a
// second pumping for this frame.
static LLTimer pump_timer;
pump_timer.reset();
pump_timer.setTimerExpirySec(1.0f / 15.0f);
do {
// Always do at least one non-blocking pump
gtk_main_iteration_do(0);
} while (gtk_events_pending() &&
!pump_timer.hasExpired());
setlocale(LC_ALL, saved_locale.c_str() );
}

View File

@ -3038,10 +3038,29 @@ void spawn_web_browser(const char* escaped_url )
llinfos << "Opening URL " << escaped_url << llendl;
// replaced ShellExecute code with ShellExecuteEx since ShellExecute doesn't work
// reliablly on Vista.
// this is madness.. no, this is..
LLWString url_wstring = utf8str_to_wstring( escaped_url );
llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
// let the OS decide what to use to open the URL
SHELLEXECUTEINFO sei = { sizeof( sei ) };
sei.fMask = SEE_MASK_FLAG_DDEWAIT;
sei.nShow = SW_SHOWNORMAL;
sei.lpVerb = L"open";
sei.lpFile = url_utf16.c_str();
ShellExecuteEx( &sei );
//// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
//// DELETE THIS ONCE THE MERGES ARE DONE
// Figure out the user's default web browser
// HKEY_CLASSES_ROOT\http\shell\open\command
char reg_path_str[256]; /* Flawfinder: ignore */
snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); /* Flawfinder: ignore */
/*
char reg_path_str[256]; // Flawfinder: ignore
snprintf(reg_path_str, sizeof(reg_path_str), "%s\\shell\\open\\command", gURLProtocolWhitelistHandler[i]); // Flawfinder: ignore
WCHAR reg_path_wstr[256];
mbstowcs(reg_path_wstr, reg_path_str, sizeof(reg_path_wstr)/sizeof(reg_path_wstr[0]));
@ -3092,7 +3111,7 @@ void spawn_web_browser(const char* escaped_url )
// MS docs say to cast to int and compare to 32.
HWND our_window = NULL;
LPCWSTR directory_wstr = NULL;
int retval = (int) ShellExecute(our_window, /* Flawfinder: ignore */
int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
L"open",
browser_exec_utf16.c_str(),
url_utf16.c_str(),
@ -3106,6 +3125,7 @@ void spawn_web_browser(const char* escaped_url )
{
llinfos << "load_url failure with " << retval << llendl;
}
*/
}

View File

@ -39,7 +39,6 @@
#include "llstl.h"
#include "linked_lists.h"
#include "llstring.h"
#include "v3math.h"
#include "v3dmath.h"

View File

@ -734,7 +734,7 @@ void *updatethreadproc(void*)
FSRef targetRef;
FSRef targetParentRef;
FSVolumeRefNum targetVol;
FSRef trashFolderRef, tempFolderRef;
FSRef trashFolderRef;
Boolean replacingTarget = false;
memset(&tempDirRef, 0, sizeof(tempDirRef));
@ -893,6 +893,10 @@ void *updatethreadproc(void*)
if(err != noErr)
throw 0;
#if 0 // *HACK for DEV-11935 see below for details.
FSRef tempFolderRef;
err = FSFindFolder(
targetVol,
kTemporaryFolderType,
@ -906,6 +910,17 @@ void *updatethreadproc(void*)
if(err != noErr)
throw 0;
#else
// *HACK for DEV-11935 the above kTemporaryFolderType query was giving
// back results with path names that seem to be too long to be used as
// mount points. I suspect this incompatibility was introduced in the
// Leopard 10.5.2 update, but I have not verified this.
char const HARDCODED_TMP[] = "/tmp";
strncpy(temp, HARDCODED_TMP, sizeof(HARDCODED_TMP));
#endif // 0 *HACK for DEV-11935
strncat(temp, "/SecondLifeUpdate_XXXXXX", (sizeof(temp) - strlen(temp)) - 1);
if(mkdtemp(temp) == NULL)

View File

@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
CFBundleShortVersionString = "Second Life version 1.19.1.0";
CFBundleGetInfoString = "Second Life version 1.19.1.0, Copyright 2004-2008 Linden Research, Inc.";
CFBundleShortVersionString = "Second Life version 1.19.1.4";
CFBundleGetInfoString = "Second Life version 1.19.1.4, Copyright 2004-2008 Linden Research, Inc.";

View File

@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.19.1.0</string>
<string>1.19.1.4</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>

View File

@ -2608,10 +2608,10 @@
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>400</integer>
<integer>400</integer>
<integer>0</integer>
<integer>16</integer>
<integer>650</integer>
<integer>600</integer>
<integer>128</integer>
</array>
</map>
<key>FloaterMiniMapRect</key>
@ -5859,6 +5859,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>SaveMinidump</key>
<map>
<key>Comment</key>
<string>Save minidump for developer debugging on crash</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ScaleShowAxes</key>
<map>
<key>Comment</key>
@ -8689,6 +8700,17 @@
<key>Value</key>
<string />
</map>
<key>UseStartScreen</key>
<map>
<key>Comment</key>
<string>Whether to load a start screen image or not.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>VFSOldSize</key>
<map>
<key>Comment</key>
@ -9669,7 +9691,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>RenderDeferred</key>
<map>

View File

@ -2,10 +2,10 @@
<map>
<key>ambient</key>
<array>
<real>0.14840038120746613</real>
<real>0.17633917927742004</real>
<real>0.23999999463558197</real>
<real>0.079999998211860657</real>
<real>1.0199999809265137</real>
<real>0.80999994277954102</real>
<real>0.80999994277954102</real>
<real>1.0199999809265137</real>
</array>
<key>blue_density</key>
<array>
@ -70,7 +70,7 @@
</array>
<key>distance_multiplier</key>
<array>
<real>2.7000000476837158</real>
<real>1</real>
<real>0</real>
<real>0</real>
<real>1</real>
@ -139,3 +139,4 @@
</array>
</map>
</llsd>

View File

@ -1,4 +1,4 @@
version 15
version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table
@ -45,6 +45,7 @@ RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVolumeLODFactor 1 2.0
RenderWaterReflections 1 1
UseStartScreen 1 1
UseOcclusion 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
@ -319,7 +320,9 @@ list Intel_Springdale
RenderTerrainDetail 1 0
RenderVBOEnable 1 0
list ATI_FireGL_5200
RenderVBOEnable 1 0
WindLightUseAtmosShaders 0 0
list ATI_Mobility_Radeon_9800
RenderAvatarCloth 0 0
@ -363,10 +366,12 @@ list ATI_Radeon_X700
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1300
Disregard128DefaultDrawDistance 1 0
UseStartScreen 0 0
list ATI_Radeon_X1400
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1500
Disregard128DefaultDrawDistance 1 0
UseStartScreen 0 0
list ATI_Radeon_X1600
Disregard128DefaultDrawDistance 1 0
list ATI_Radeon_X1700

View File

@ -1,4 +1,4 @@
version 15
version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table

View File

@ -1,4 +1,4 @@
version 15
version 16
// NOTE: This is mostly identical to featuretable_mac.txt with a few differences
// Should be combined into one table

View File

@ -24,6 +24,7 @@
ATI 3D-Analyze .*ATI.*3D-Analyze.* 0 0
ATI All-in-Wonder PCI-E .*ATI.*All-in-Wonder.*PCI-E.* 1 1
ATI All-in-Wonder 9xxx .*ATI.*All-in-Wonder 9.* 1 1
ATI All-in-Wonder X600 .*ATI.*All-in-Wonder X6.* 1 1
ATI All-in-Wonder X800 .*ATI.*All-in-Wonder X8.* 2 1
ATI All-in-Wonder X1800 .*ATI.*All-in-Wonder X18.* 3 1
ATI All-in-Wonder X1900 .*ATI.*All-in-Wonder X19.* 3 1
@ -33,19 +34,24 @@ ATI ASUS AH26xx .*ATI.*ASUS.*AH26.* 3 1
ATI ASUS AX3xx .*ATI.*ASUS.*AX3.* 1 1
ATI ASUS AX5xx .*ATI.*ASUS.*AX5.* 1 1
ATI ASUS AX8xx .*ATI.*ASUS.*AX8.* 2 1
ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
ATI ASUS EAH24xx .*ATI.*ASUS.*EAH24.* 2 1
ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1
ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1
ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1
ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1
ATI ASUS X1xxx .*ATI.*ASUS.*X1.* 2 1
ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3 1
ATI Diamond X550 .*ATI.*Diamond X550.* 1 1
ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 0
ATI FireGL .*ATI.*Fire.*GL.* 0 0
ATI FireGL 5200 .*ATI.*FireGL V52.* 0 1
ATI FireGL 5xxx .*ATI.*FireGL V5.* 1 1
ATI FireGL .*ATI.*Fire.*GL.* 0 1
ATI FireMV .*ATI.*FireMV.* 0 0
ATI Generic .*ATI.*Generic.* 0 0
ATI Hercules 9800 .*ATI.*Hercules.*9800.* 1 1
ATI IGP 340M .*ATI.*IGP.*340M.* 0 0
ATI M52 .*ATI.*M52.* 1 1
ATI M54 .*ATI.*M54.* 1 1
ATI M56 .*ATI.*M56.* 1 1
ATI M76 .*ATI.*M76.* 3 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
@ -57,9 +63,11 @@ ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1 1
ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1 1
ATI Mobility Radeon .*ATI.*Mobility.* 0 1
ATI Radeon HD 2300 .*ATI.*Radeon HD 23.* 1 1
ATI Radeon HD 2400 .*ATI.*Radeon HD 24.* 1 1
ATI Radeon HD 2400 .*ATI.*Radeon HD.*24.* 1 1
ATI Radeon HD 2600 .*ATI.*Radeon HD 26.* 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD 29.* 3 1
ATI Radeon HD 3400 .*ATI.*Radeon HD 34.* 1 1
ATI Radeon HD 3600 .*ATI.*Radeon HD 36.* 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD 38.* 3 1
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0
ATI Radeon 7000 .*ATI.*Radeon 7.* 0 1
@ -72,6 +80,7 @@ ATI Radeon 9600 .*ATI.*Radeon 96.* 0 1
ATI Radeon 9700 .*ATI.*Radeon 97.* 1 1
ATI Radeon 9800 .*ATI.*Radeon 98.* 1 1
ATI Radeon RV250 .*ATI.*RV250.* 0 1
ATI Radeon RV600 .*ATI.*RV6.* 1 1
ATI Radeon RX700 .*ATI.*RX70.* 1 1
ATI Radeon RX800 .*ATI.*Radeon *RX80.* 2 1
ATI Radeon VE .*ATI.*Radeon.*VE.* 0 0
@ -144,6 +153,10 @@ NVIDIA GeForce 8500 .*NVIDIA.*GeForce 85.* 3 1
NVIDIA GeForce 8600 .*NVIDIA.*GeForce 86.* 3 1
NVIDIA GeForce 8700 .*NVIDIA.*GeForce 87.* 3 1
NVIDIA GeForce 8800 .*NVIDIA.*GeForce 88.* 3 1
NVIDIA GeForce 9300M .*NVIDIA.*GeForce 9300M.* 1 1
NVIDIA GeForce 9500M .*NVIDIA.*GeForce 9500M.* 2 1
NVIDIA GeForce 9600 .*NVIDIA.*GeForce 96.* 3 1
NVIDIA GeForce 9800 .*NVIDIA.*GeForce 98.* 3 1
NVIDIA GeForce FX 5100 .*NVIDIA.*GeForce FX 51.* 0 1
NVIDIA GeForce FX 5200 .*NVIDIA.*GeForce FX 52.* 0 1
NVIDIA GeForce FX 5500 .*NVIDIA.*GeForce FX 55.* 0 1
@ -176,11 +189,12 @@ NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1
NVIDIA GeForce PCX .*GeForce PCX.* 0 1
NVIDIA Generic .*NVIDIA.*Unknown.* 0 0
NVIDIA NV43 .*NVIDIA.*NV43.* 1 1
NVIDIA Quadro2 .*Quadro2.* 0 0
NVIDIA Quadro4 .*Quadro4.* 0 0
NVIDIA Quadro DCC .*Quadro DCC.* 0 0
NVIDIA Quadro FX .*Quadro FX.* 1 0
NVIDIA Quadro NVS .*Quadro NVS.* 0 0
NVIDIA Quadro2 .*Quadro2.* 0 1
NVIDIA Quadro4 .*Quadro4.* 0 1
NVIDIA Quadro DCC .*Quadro DCC.* 0 1
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 3 1
NVIDIA Quadro FX .*Quadro FX.* 1 1
NVIDIA Quadro NVS .*Quadro NVS.* 0 1
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
S3 .*S3 Graphics.* 0 0
SiS SiS.* 0 0

View File

@ -372,7 +372,7 @@ FunctionEnd
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.CheckIfAdministrator
DetailPrint $(CheckAdministratorUnInstDP)
DetailPrint $(CheckAdministratorUnInstDP)
UserInfo::GetAccountType
Pop $R0
StrCmp $R0 "Admin" is_admin
@ -575,6 +575,22 @@ Function un.CloseSecondLife
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Delete the stored password for the current Windows user
; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled
;
Function un.RemovePassword
DetailPrint "Removing Second Life password"
SetShellVarContext current
Delete "$APPDATA\SecondLife\user_settings\password.dat"
SetShellVarContext all
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed files
;;; This deletes the uninstall executable, but it works
@ -674,6 +690,9 @@ Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk"
Call un.DocumentsAndSettingsFolder
!endif
; remove stored password on uninstall
Call un.RemovePassword
Call un.ProgramFiles
SectionEnd ; end of uninstall section

View File

@ -287,6 +287,7 @@ BOOL gRandomizeFramerate = FALSE;
BOOL gPeriodicSlowFrame = FALSE;
BOOL gLLErrorActivated = FALSE;
BOOL gLogoutInProgress = FALSE;
////////////////////////////////////////////////////////////
// Internal globals... that should be removed.
static LLString gArgs;
@ -294,6 +295,7 @@ static LLString gArgs;
const char* MARKER_FILE_NAME = "SecondLife.exec_marker";
const char* ERROR_MARKER_FILE_NAME = "SecondLife.error_marker";
const char* LLERROR_MARKER_FILE_NAME = "SecondLife.llerror_marker";
const char* LOGOUT_MARKER_FILE_NAME = "SecondLife.logout_marker";
static BOOL gDoDisconnect = FALSE;
static LLString gLaunchFileOnQuit;
@ -441,7 +443,7 @@ static void settings_modify()
#endif
// propagate push to talk preference to current status
gSavedSettings.setBOOL("PTTCurrentlyEnabled", gSavedSettings.getBOOL("EnablePushToTalk"));
gSavedSettings.setBOOL("PTTCurrentlyEnabled", TRUE); //gSavedSettings.getBOOL("EnablePushToTalk"));
}
void initGridChoice()
@ -882,9 +884,10 @@ bool LLAppViewer::mainLoop()
while (!LLApp::isExiting())
{
LLFastTimer::reset(); // Should be outside of any timer instances
try
{
LLFastTimer t(LLFastTimer::FTM_FRAME);
{
LLFastTimer t2(LLFastTimer::FTM_MESSAGES);
#if LL_WINDOWS
@ -1040,12 +1043,23 @@ bool LLAppViewer::mainLoop()
}
}
catch(std::bad_alloc)
{
llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
}
}
// Save snapshot for next time, if we made it through initialization
if (STATE_STARTED == LLStartUp::getStartupState())
{
saveFinalSnapshot();
try
{
saveFinalSnapshot();
}
catch(std::bad_alloc)
{
llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ;
}
}
delete gServicePump;
@ -2073,6 +2087,7 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz();
gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec();
@ -2118,11 +2133,33 @@ void LLAppViewer::handleViewerCrash()
}
pApp->mReportedCrash = TRUE;
//We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version
//to check against no matter what
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile");
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName().c_str();
gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str();
gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
if(gLogoutInProgress)
{
gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH;
}
else
{
gDebugInfo["LastExecEvent"] = gLLErrorActivated ? LAST_EXEC_LLERROR_CRASH : LAST_EXEC_OTHER_CRASH;
}
if(gAgent.getRegion())
{
gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName();
gDebugInfo["CurrentRegion"] = gAgent.getRegion()->getName();
}
//Write out the crash status file
//Use marker file style setup, as that's the simplest, especially since
@ -2170,7 +2207,14 @@ void LLAppViewer::handleViewerCrash()
LLError::logToFile("");
// Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
pApp->removeMarkerFile();
if(gDebugInfo["LastExecEvent"].asInteger() == LAST_EXEC_LOGOUT_CRASH)
{
pApp->removeMarkerFile(true);
}
else
{
pApp->removeMarkerFile(false);
}
// Call to pure virtual, handled by platform specifc llappviewer instance.
pApp->handleCrashReporting();
@ -2235,24 +2279,35 @@ void LLAppViewer::initMarkerFile()
// These checks should also remove these files for the last 2 cases if they currently exist
//LLError/Error checks. Only one of these should ever happen at a time.
LLString logout_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOGOUT_MARKER_FILE_NAME);
LLString llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME);
LLString error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
apr_file_t* fMarker = ll_apr_file_open(llerror_marker_file, LL_APR_RB);
apr_file_t* fMarker = ll_apr_file_open(logout_marker_file, LL_APR_RB);
if(fMarker != NULL)
{
apr_file_close(fMarker);
llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
}
fMarker = ll_apr_file_open(llerror_marker_file, LL_APR_RB);
if(fMarker != NULL)
{
apr_file_close(fMarker);
llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
else gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
}
fMarker = ll_apr_file_open(error_marker_file, LL_APR_RB);
if(fMarker != NULL)
{
apr_file_close(fMarker);
llinfos << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << llendl;
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
}
ll_apr_file_remove(logout_marker_file);
ll_apr_file_remove(llerror_marker_file);
ll_apr_file_remove(error_marker_file);
@ -2279,6 +2334,7 @@ void LLAppViewer::initMarkerFile()
else
{
llinfos << "Failed to create marker file." << llendl;
return;
}
if (apr_file_lock(mMarkerFile, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
{
@ -2291,7 +2347,7 @@ void LLAppViewer::initMarkerFile()
llinfos << "Exiting initMarkerFile()." << llendl;
}
void LLAppViewer::removeMarkerFile()
void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
{
llinfos << "removeMarkerFile()" << llendl;
if (mMarkerFile != NULL)
@ -2299,6 +2355,11 @@ void LLAppViewer::removeMarkerFile()
ll_apr_file_remove( mMarkerFileName );
mMarkerFile = NULL;
}
if (mLogoutMarkerFile != NULL && !leave_logout_marker)
{
ll_apr_file_remove( mLogoutMarkerFileName );
mLogoutMarkerFile = NULL;
}
}
void LLAppViewer::forceQuit()
@ -3277,6 +3338,20 @@ void LLAppViewer::sendLogoutRequest()
mLogoutRequestSent = TRUE;
gVoiceClient->leaveChannel();
//Set internal status variables and marker files
gLogoutInProgress = TRUE;
mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
mLogoutMarkerFile = ll_apr_file_open(mLogoutMarkerFileName, LL_APR_W);
if (mLogoutMarkerFile)
{
llinfos << "Created logout marker file " << mLogoutMarkerFileName << llendl;
}
else
{
llwarns << "Cannot create logout marker file " << mLogoutMarkerFileName << llendl;
}
apr_file_close(mLogoutMarkerFile);
}
}

View File

@ -112,7 +112,7 @@ public:
bool isInProductionGrid();
void removeMarkerFile();
void removeMarkerFile(bool leave_logout_marker = false);
// LLAppViewer testing helpers.
// *NOTE: These will potentially crash the viewer. Only for debugging.
@ -167,6 +167,10 @@ private:
LLString mMarkerFileName;
apr_file_t* mMarkerFile; // A file created to indicate the app is running.
LLString mLogoutMarkerFileName;
apr_file_t* mLogoutMarkerFile; // A file created to indicate the app is running.
LLOSInfo mSysOSInfo;
S32 mCrashBehavior;
bool mReportedCrash;
@ -217,7 +221,9 @@ typedef enum
LAST_EXEC_NORMAL = 0,
LAST_EXEC_FROZE,
LAST_EXEC_LLERROR_CRASH,
LAST_EXEC_OTHER_CRASH
LAST_EXEC_OTHER_CRASH,
LAST_EXEC_LOGOUT_FROZE,
LAST_EXEC_LOGOUT_CRASH
} eLastExecEvent;
extern eLastExecEvent gLastExecEvent; // llstartup

View File

@ -409,14 +409,14 @@ void LLDrawable::makeActive()
}
void LLDrawable::makeStatic()
void LLDrawable::makeStatic(BOOL warning_enabled)
{
if (isState(ACTIVE))
{
clearState(ACTIVE);
gPipeline.setActive(this, FALSE);
if (mParent.notNull() && mParent->isActive())
if (mParent.notNull() && mParent->isActive() && warning_enabled)
{
llwarns << "Drawable becamse static with active parent!" << llendl;
}
@ -431,7 +431,7 @@ void LLDrawable::makeStatic()
{
llwarns << "Child drawable has unknown parent." << llendl;
}
child_drawable->makeStatic();
child_drawable->makeStatic(warning_enabled);
}
}

View File

@ -140,7 +140,7 @@ public:
F32 updateXform(BOOL undamped);
virtual void makeActive();
virtual void makeStatic();
/*virtual*/ void makeStatic(BOOL warning_enabled = TRUE);
BOOL isActive() const { return isState(ACTIVE); }
BOOL isStatic() const { return !isActive(); }

View File

@ -73,7 +73,7 @@ const U32 VERTEX_MASK_SHINY = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_N
const U32 VERTEX_MASK_BUMP = LLVertexBuffer::MAP_VERTEX |LLVertexBuffer::MAP_TEXCOORD | LLVertexBuffer::MAP_TEXCOORD2;
U32 LLDrawPoolBump::sVertexMask = VERTEX_MASK_SHINY;
static LLCubeMap* sCubeMap = NULL;
static LLPointer<LLCubeMap> sCubeMap;
static LLGLSLShader* shader = NULL;
static S32 cube_channel = -1;
@ -597,7 +597,7 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
{
sCubeMap->bind();
}
else
else if (gSky.mVOSkyp->getCubeMap())
{
gSky.mVOSkyp->getCubeMap()->bind();
}

View File

@ -68,7 +68,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
sCloudNoiseRawImage = new LLImageRaw();
cloudNoiseFile->decode(sCloudNoiseRawImage);
cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f);
LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);

View File

@ -185,8 +185,8 @@ static struct ft_display_info ft_display_table[] =
{ LLFastTimer::FTM_RENDER_BLOOM_FBO, " First FBO", &LLColor4::blue, 0 },
{ LLFastTimer::FTM_RENDER_UI, " UI", &LLColor4::cyan4, 1 },
{ LLFastTimer::FTM_RENDER_TIMER, " Timers", &LLColor4::cyan5, 1, 0 },
// { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 },
{ LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 },
{ LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 },
{ LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink2, 0 },
{ LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1},
#if 0 || !LL_RELEASE_FOR_DOWNLOAD

View File

@ -1348,7 +1348,6 @@ const char* LLFilePicker::getDirname()
void LLFilePicker::reset()
{
llinfos << "GTK LLFilePicker::reset()" << llendl;
mNextFileIndex = 0;
mStoreFilenames.win = NULL;
mStoreFilenames.fileVector.clear();

View File

@ -197,7 +197,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
llinfos << "Writing J2C..." << llendl;
LLPointer<LLImageJ2C> j2c = new LLImageJ2C;
j2c->encode(raw);
j2c->encode(raw, 0.0f);
LLVFile::writeFile(j2c->getData(), j2c->getDataSize(), gVFS, self->mImageID, LLAssetType::AT_TEXTURE);
self->mImage = new LLImageGL((LLImageRaw*)raw, FALSE);

View File

@ -353,7 +353,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
if (!bmp_image->decode(raw_image))
if (!bmp_image->decode(raw_image, 0.0f))
{
return false;
}
@ -390,7 +390,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
if (!jpeg_image->decode(raw_image))
if (!jpeg_image->decode(raw_image, 0.0f))
{
return false;
}
@ -405,7 +405,7 @@ bool LLFloaterImagePreview::loadImage(const char *src_filename)
return false;
}
if (!png_image->decode(raw_image))
if (!png_image->decode(raw_image, 0.0f))
{
return false;
}
@ -589,7 +589,8 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
//-----------------------------------------------------------------------------
// onMouseCaptureLost()
//-----------------------------------------------------------------------------
void LLFloaterImagePreview::onMouseCaptureLost(LLMouseHandler* handler)
// static
void LLFloaterImagePreview::onMouseCaptureLostImagePreview(LLMouseHandler* handler)
{
gViewerWindow->showCursor();
}

View File

@ -112,7 +112,7 @@ public:
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
static void onMouseCaptureLost(LLMouseHandler*);
static void onMouseCaptureLostImagePreview(LLMouseHandler*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
protected:

View File

@ -181,11 +181,11 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLUUID& object_id)
addChild(mHistoryEditor);
}
void LLFloaterScriptDebugOutput::init(const LLString& title, BOOL resizable,
void LLFloaterScriptDebugOutput::initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn)
{
LLFloater::init(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
LLFloater::initFloater(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn);
S32 y = getRect().getHeight() - LLFLOATER_HEADER_SIZE - LLFLOATER_VPAD;
S32 x = LLFLOATER_HPAD;
// History editor

View File

@ -62,7 +62,7 @@ public:
LLFloaterScriptDebugOutput(const LLUUID& object_id);
~LLFloaterScriptDebugOutput();
virtual void init(const LLString& title, BOOL resizable,
virtual void initFloater(const LLString& title, BOOL resizable,
S32 min_width, S32 min_height, BOOL drag_on_left,
BOOL minimizable, BOOL close_btn);

View File

@ -770,10 +770,10 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mJPEGImage = NULL; // deletes image
previewp->mJPEGImage = new LLImageJPEG();
previewp->mJPEGImage->setEncodeQuality(llclamp(previewp->mSnapshotQuality, 0, 100));
if (previewp->mJPEGImage->encode(previewp->mRawImage))
if (previewp->mJPEGImage->encode(previewp->mRawImage, 0.0f))
{
previewp->mDataSize = previewp->mJPEGImage->getDataSize();
previewp->mJPEGImage->decode(previewp->mRawImageEncoded);
previewp->mJPEGImage->decode(previewp->mRawImageEncoded, 0.0f);
}
}
else if (previewp->getSnapshotType() == SNAPSHOT_TEXTURE)
@ -786,10 +786,10 @@ void LLSnapshotLivePreview::onIdle( void* snapshot_preview )
scaled->biasedScaleToPowerOfTwo(512);
previewp->mImageScaled[previewp->mCurImageIndex] = TRUE;
if (formatted->encode(scaled))
if (formatted->encode(scaled, 0.0f))
{
previewp->mDataSize = formatted->getDataSize();
formatted->decode(previewp->mRawImageEncoded);
formatted->decode(previewp->mRawImageEncoded, 0.0f);
}
}
else
@ -885,7 +885,7 @@ void LLSnapshotLivePreview::saveTexture()
scaled->biasedScaleToPowerOfTwo(512);
if (formatted->encode(scaled))
if (formatted->encode(scaled, 0.0f))
{
LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
std::string pos_string;

View File

@ -4509,6 +4509,9 @@ LLInventoryFilter::LLInventoryFilter(const LLString& name) :
mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff");
mFilterBehavior = FILTER_NONE;
// copy mFilterOps into mDefaultFilterOps
markDefault();
}
LLInventoryFilter::~LLInventoryFilter()

View File

@ -286,7 +286,10 @@ class LLInventorySort
{
public:
LLInventorySort()
: mSortOrder(0) { }
: mSortOrder(0),
mByDate(false),
mSystemToTop(false),
mFoldersByName(false) { }
// Returns true if order has changed
bool updateSort(U32 order);

View File

@ -420,6 +420,8 @@ void LLIMMgr::addMessage(
other_participant_id = LLUUID::null;
}
LLFloaterIMPanel* floater;
LLUUID new_session_id = session_id;
if (new_session_id.isNull())
@ -875,19 +877,14 @@ public:
if ( floaterp )
{
std::string error_string;
if ( 404 == statusNum )
{
std::string error_string;
error_string = "does not exist";
}
else
{
error_string = "generic";
}
floaterp->showSessionStartError(
error_string);
floaterp->showSessionStartError(
error_string);
}
}
}
}

View File

@ -3280,7 +3280,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
{
if (iter->second == attachment)
{
rez_action->mAttachPt = iter->first;
attach_pt = iter->first;
break;
}
}

View File

@ -538,7 +538,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
{
mask |= LLInventoryObserver::LABEL;
}
old_item->copy(item);
old_item->copyViewerItem(item);
mask |= LLInventoryObserver::INTERNAL;
}
else
@ -654,14 +654,14 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat)
{
mask |= LLInventoryObserver::LABEL;
}
old_cat->copy(cat);
old_cat->copyViewerCategory(cat);
addChangedMask(mask, cat->getUUID());
}
else
{
// add this category
LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getParentUUID());
new_cat->copy(cat);
new_cat->copyViewerCategory(cat);
addCategory(new_cat);
// make sure this category is correctly referenced by it's parent.
@ -1158,7 +1158,13 @@ void LLInventoryModel::fetchDescendentsResponder::onClickRetry(S32 option, void*
{
if (option == 0)
{
std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents");
std::string url;
LLViewerRegion * agent_region = gAgent.getRegion();
if (agent_region)
{
url = agent_region->getCapability("FetchInventoryDescendents");
}
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
@ -1351,7 +1357,14 @@ void LLInventoryModel::backgroundFetch(void*)
if (sBackgroundFetchActive)
{
//If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents");
std::string url;
LLViewerRegion * agent_region = gAgent.getRegion();
if (agent_region)
{
url = agent_region->getCapability("FetchInventoryDescendents");
}
if (!url.empty())
{
bulkFetch(url);

View File

@ -131,11 +131,15 @@ bool LLMIMETypes::parseMIMETypes(const LLString& xml_filename)
}
if (child->hasName("allow_resize"))
{
child->getBoolValue( 1, (BOOL*)&( info.mAllowResize ) );
BOOL allow_resize = FALSE;
child->getBoolValue( 1, &allow_resize );
info.mAllowResize = (bool)allow_resize;
}
if (child->hasName("allow_looping"))
{
child->getBoolValue( 1, (BOOL*)&( info.mAllowLooping ) );
BOOL allow_looping = FALSE;
child->getBoolValue( 1, &allow_looping );
info.mAllowLooping = (bool)allow_looping;
}
}
sWidgetMap[set_name] = info;

View File

@ -68,7 +68,7 @@ public:
static bool findAllowResize(const LLString& mime_type);
// accessor for flag to enable/disable media size edit fields
static bool LLMIMETypes::findAllowLooping(const LLString& mime_type);
static bool findAllowLooping(const LLString& mime_type);
// accessor for flag to enable/disable media looping checkbox
public:

View File

@ -130,7 +130,7 @@ void LLNameEditor::refreshAll(const LLUUID& id, const char* firstname,
}
}
void LLNameEditor::setValue( LLSD value )
void LLNameEditor::setValue( const LLSD& value )
{
setNameID(value.asUUID(), FALSE);
}

View File

@ -73,7 +73,7 @@ public:
// Take/return agent UUIDs
virtual void setValue( LLSD value );
virtual void setValue( const LLSD& value );
virtual LLSD getValue() const;
private:

View File

@ -58,7 +58,7 @@ public:
~LLOverlayBar();
/*virtual*/ void refresh();
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ BOOL postBuild();
void layoutButtons();

View File

@ -231,14 +231,14 @@ BOOL LLPanelClassified::postBuild()
mNameEditor = getChild<LLLineEditor>("given_name_editor");
mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN);
mNameEditor->setCommitOnFocusLost(TRUE);
mNameEditor->setFocusReceivedCallback(onFocusReceived, this);
mNameEditor->setFocusReceivedCallback(focusReceived, this);
mNameEditor->setCommitCallback(onCommitAny);
mNameEditor->setCallbackUserData(this);
mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
mDescEditor = getChild<LLTextEditor>("desc_editor");
mDescEditor->setCommitOnFocusLost(TRUE);
mDescEditor->setFocusReceivedCallback(onFocusReceived, this);
mDescEditor->setFocusReceivedCallback(focusReceived, this);
mDescEditor->setCommitCallback(onCommitAny);
mDescEditor->setCallbackUserData(this);
mDescEditor->setTabsToNextField(TRUE);
@ -965,7 +965,7 @@ void LLPanelClassified::onCommitAny(LLUICtrl* ctrl, void* data)
}
// static
void LLPanelClassified::onFocusReceived(LLFocusableElement* ctrl, void* data)
void LLPanelClassified::focusReceived(LLFocusableElement* ctrl, void* data)
{
// allow the data to be saved
onCommitAny((LLUICtrl*)ctrl, data);

View File

@ -113,7 +113,7 @@ protected:
static void onClickProfile(void* data);
static void onClickSet(void* data);
static void onFocusReceived(LLFocusableElement* ctrl, void* data);
static void focusReceived(LLFocusableElement* ctrl, void* data);
static void onCommitAny(LLUICtrl* ctrl, void* data);
BOOL checkDirty(); // Update and return mDirty

View File

@ -496,8 +496,10 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
row["columns"][4]["column"] = "sort";
row["columns"][4]["value"] = buffer;
mNoticesList->addElement(row, ADD_SORTED);
mNoticesList->addElement(row, ADD_BOTTOM);
}
mNoticesList->sortItems();
}
void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data)

View File

@ -117,7 +117,6 @@ BOOL LLPanelLandMedia::postBuild()
mMediaTypeCombo = getChild<LLComboBox>("media type");
childSetCommitCallback("media type", onCommitType, this);
populateMIMECombo();
mMediaTypeCombo->sortByName();
mMediaWidthCtrl = getChild<LLSpinCtrl>("media_size_width");
childSetCommitCallback("media_size_width", onCommitAny, this);
@ -268,14 +267,28 @@ void LLPanelLandMedia::refresh()
void LLPanelLandMedia::populateMIMECombo()
{
LLString default_mime_type = "none/none";
LLString default_label;
LLMIMETypes::mime_widget_set_map_t::const_iterator it;
for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it)
{
const LLString& mime_type = it->first;
const LLMIMETypes::LLMIMEWidgetSet& info = it->second;
mMediaTypeCombo->add(info.mLabel, mime_type);
if (info.mDefaultMimeType == default_mime_type)
{
// Add this label at the end to make UI look cleaner
default_label = info.mLabel;
}
else
{
mMediaTypeCombo->add(info.mLabel, mime_type);
}
}
// *TODO: The sort order is based on std::map key, which is
// ASCII-sorted and is wrong in other languages. TRANSLATE
mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM );
}
void LLPanelLandMedia::setMediaType(const LLString& mime_type)
{
LLParcel *parcel = mParcel->getParcel();
@ -291,7 +304,11 @@ void LLPanelLandMedia::setMediaURL(const LLString& media_url)
{
mMediaURLEdit->setText(media_url);
mMediaURLEdit->onCommit();
}
LLString LLPanelLandMedia::getMediaURL()
{
return mMediaURLEdit->getText();
}
// static
@ -307,8 +324,9 @@ void LLPanelLandMedia::onCommitType(LLUICtrl *ctrl, void *userdata)
onCommitAny(ctrl, userdata);
}
// static
void LLPanelLandMedia::onCommitAny(LLUICtrl *ctrl, void *userdata)
void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandMedia *self = (LLPanelLandMedia *)userdata;

View File

@ -48,7 +48,7 @@ public:
void refresh();
void setMediaType(const LLString& media_type);
void setMediaURL(const LLString& media_type);
const LLString& getMediaURL() { return mMediaURLEdit->getText(); }
LLString getMediaURL();
private:
void populateMIMECombo();

View File

@ -100,7 +100,7 @@ public:
void setAuxItem( const LLInventoryItem* item )
{
if ( mAuxItem )
mAuxItem->copy(item);
mAuxItem->copyItem(item);
}
static void onBtnCopyToInv(void* userdata);

View File

@ -2036,7 +2036,7 @@ void LLLiveLSLEditor::saveIfNeeded()
LLInventoryItem* inv_item = (LLInventoryItem*)object->getInventoryObject(mItemID);
if(inv_item)
{
mItem->copy(inv_item);
mItem->copyItem(inv_item);
}
// Don't need to save if we're pristine

View File

@ -288,7 +288,7 @@ void LLPreviewTexture::draw()
// virtual
BOOL LLPreviewTexture::canSaveAs()
BOOL LLPreviewTexture::canSaveAs() const
{
return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset();
}
@ -421,6 +421,9 @@ void LLPreviewTexture::updateDimensions()
view_height += BTN_HEIGHT + CLIENT_RECT_VPAD;
button_height = BTN_HEIGHT + PREVIEW_PAD;
}
view_width = llmax(view_width, getMinWidth());
view_height = llmax(view_height, getMinHeight());
if (client_height != mLastHeight || client_width != mLastWidth)
{

View File

@ -59,7 +59,7 @@ public:
virtual void draw();
virtual BOOL canSaveAs();
virtual BOOL canSaveAs() const;
virtual void saveAs();
virtual void loadAsset();

View File

@ -83,6 +83,7 @@
#include "llglheaders.h"
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
//
// Consts
//
@ -259,7 +260,7 @@ void LLSelectMgr::overrideObjectUpdates()
virtual bool apply(LLSelectNode* selectNode)
{
LLViewerObject* object = selectNode->getObject();
if (object->permMove())
if (object && object->permMove())
{
if (!selectNode->mLastPositionLocal.isExactlyZero())
{
@ -1035,10 +1036,19 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
if (mGridMode == GRID_MODE_LOCAL && mSelectedObjects->getObjectCount())
{
LLViewerObject* root = getSelectedParentObject(mSelectedObjects->getFirstObject());
LLBBox bbox = mSavedSelectionBBox;
mGridOrigin = mSavedSelectionBBox.getCenterAgent();
mGridRotation = mSavedSelectionBBox.getRotation();
mGridScale = mSavedSelectionBBox.getExtentLocal() * 0.5f;
if(mSelectedObjects->getObjectCount() < 2 || !root || root->mDrawable.isNull())
{
mGridRotation = mSavedSelectionBBox.getRotation();
}
else //set to the root object
{
mGridRotation = root->getRenderRotation();
}
}
else if (mGridMode == GRID_MODE_REF_OBJECT && first_grid_object && first_grid_object->mDrawable.notNull())
{
@ -1314,6 +1324,8 @@ void LLSelectMgr::dump()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
for (S32 te = 0; te < objectp->getNumTEs(); ++te )
{
if (node->isTESelected(te))
@ -2096,6 +2108,11 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch)
LLSelectNode* selectNode = *iter;
LLViewerObject* object = selectNode->getObject();
if (!object)
{
continue;
}
if (!object->permModify())
{
continue;
@ -2196,7 +2213,7 @@ BOOL LLSelectMgr::selectGetModify()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if( !node->mValid )
if( !object || !node->mValid )
{
return FALSE;
}
@ -3256,7 +3273,7 @@ void LLSelectMgr::packBuyObjectIDs(LLSelectNode* node, void* data)
{
buy->mObjectsSent.push_back(object);
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, node->getObject()->getLocalID() );
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID() );
gMessageSystem->addU8Fast(_PREHASH_SaleType, buy->mSaleInfo.getSaleType());
gMessageSystem->addS32Fast(_PREHASH_SalePrice, buy->mSaleInfo.getSalePrice());
}
@ -3717,6 +3734,10 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type)
virtual bool apply(LLSelectNode* selectNode)
{
LLViewerObject* object = selectNode->getObject();
if (!object)
{
return true; // skip
}
selectNode->mSavedPositionLocal = object->getPosition();
if (object->isAttachment())
{
@ -4047,7 +4068,10 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
push_all(std::queue<LLSelectNode*>& n) : nodes_to_send(n) {}
virtual bool apply(LLSelectNode* node)
{
nodes_to_send.push(node);
if (node->getObject())
{
nodes_to_send.push(node);
}
return true;
}
};
@ -4058,29 +4082,20 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
push_some(std::queue<LLSelectNode*>& n, bool roots) : nodes_to_send(n), mRoots(roots) {}
virtual bool apply(LLSelectNode* node)
{
BOOL is_root = node->getObject()->isRootEdit();
if ((mRoots && is_root) || (!mRoots && !is_root))
if (node->getObject())
{
nodes_to_send.push(node);
BOOL is_root = node->getObject()->isRootEdit();
if ((mRoots && is_root) || (!mRoots && !is_root))
{
nodes_to_send.push(node);
}
}
return true;
}
};
struct push_editable : public LLSelectedNodeFunctor
{
std::queue<LLSelectNode*>& nodes_to_send;
push_editable(std::queue<LLSelectNode*>& n) : nodes_to_send(n) {}
virtual bool apply(LLSelectNode* node)
{
nodes_to_send.push(node);
return true;
}
};
struct push_all pushall(nodes_to_send);
struct push_some pushroots(nodes_to_send, TRUE);
struct push_some pushnonroots(nodes_to_send, FALSE);
struct push_editable pusheditable(nodes_to_send);
switch(send_type)
{
@ -4088,7 +4103,7 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
if(message_name == "ObjectBuy")
getSelection()->applyToRootNodes(&pushroots);
else
getSelection()->applyToRootNodes(&pusheditable);
getSelection()->applyToRootNodes(&pushall);
break;
case SEND_INDIVIDUALS:
@ -4152,7 +4167,7 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name,
}
else
{
node = nodes_to_send.front();
node = nodes_to_send.front();
nodes_to_send.pop();
}
}
@ -4292,7 +4307,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
f(const LLUUID& id) : mID(id) {}
virtual bool apply(LLSelectNode* node)
{
return (node->getObject()->mID == mID);
return (node->getObject() && node->getObject()->mID == mID);
}
} func(id);
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func);
@ -4435,7 +4450,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use
f(const LLUUID& id) : mID(id) {}
virtual bool apply(LLSelectNode* node)
{
return (node->getObject()->mID == mID);
return (node->getObject() && node->getObject()->mID == mID);
}
} func(id);
LLSelectNode* node = LLSelectMgr::getInstance()->getHoverObjects()->getFirstNode(&func);
@ -4541,7 +4556,8 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
// do roots first, then children so that root flags are cleared ASAP
BOOL roots_only = (pass == 0);
BOOL is_root = (objectp->isRootEdit());
@ -4614,6 +4630,8 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
if (objectp->isRoot() || !select_linked_set)
{
if (roots.count(objectp) == 0)
@ -4657,14 +4675,14 @@ void LLSelectMgr::updateSilhouettes()
iter != roots.end(); iter++)
{
LLViewerObject* objectp = *iter;
LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE);
rect_select_root_node->selectAllTEs(TRUE);
if (!canSelectObject(objectp))
{
continue;
}
LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE);
rect_select_root_node->selectAllTEs(TRUE);
if (!select_linked_set)
{
rect_select_root_node->mIndividualSelection = TRUE;
@ -4702,7 +4720,9 @@ void LLSelectMgr::updateSilhouettes()
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
// do roots first, then children so that root flags are cleared ASAP
BOOL roots_only = (pass == 0);
BOOL is_root = objectp->isRootEdit();
@ -4806,6 +4826,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
if (objectp->isHUDAttachment() != for_hud)
{
continue;
@ -4844,6 +4866,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
{
LLSelectNode* node = *iter;
LLViewerObject* objectp = node->getObject();
if (!objectp)
continue;
if (objectp->isHUDAttachment() != for_hud)
{
continue;
@ -5439,6 +5463,8 @@ void LLSelectMgr::updateSelectionCenter()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object)
continue;
LLViewerObject *myAvatar = gAgent.getAvatarObject();
LLViewerObject *root = object->getRootEdit();
if (mSelectedObjects->mSelectType == SELECT_TYPE_WORLD && // not an attachment
@ -5665,6 +5691,12 @@ void LLSelectMgr::validateSelection()
BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
{
// Never select dead objects
if (!object || object->isDead())
{
return FALSE;
}
if (mForceSelection)
{
return TRUE;
@ -5677,9 +5709,6 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
return FALSE;
}
// Can't select dead objects
if (object->isDead()) return FALSE;
// Can't select orphans
if (object->isOrphaned()) return FALSE;
@ -5851,6 +5880,8 @@ S32 LLObjectSelection::getTECount()
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if (!object)
continue;
S32 num_tes = object->getNumTEs();
for (S32 te = 0; te < num_tes; te++)
{
@ -5883,6 +5914,8 @@ bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool first
{
iterator nextiter = iter++;
LLViewerObject* object = (*nextiter)->getObject();
if (!object)
continue;
bool r = func->apply(object);
if (firstonly && r)
return true;
@ -5899,6 +5932,8 @@ bool LLObjectSelection::applyToRootObjects(LLSelectedObjectFunctor* func, bool f
{
root_iterator nextiter = iter++;
LLViewerObject* object = (*nextiter)->getObject();
if (!object)
continue;
bool r = func->apply(object);
if (firstonly && r)
return true;
@ -5916,6 +5951,8 @@ bool LLObjectSelection::applyToTEs(LLSelectedTEFunctor* func, bool firstonly)
iterator nextiter = iter++;
LLSelectNode* node = *nextiter;
LLViewerObject* object = (*nextiter)->getObject();
if (!object)
continue;
S32 num_tes = llmin((S32)object->getNumTEs(), (S32)object->getNumFaces()); // avatars have TEs but no faces
for (S32 te = 0; te < num_tes; ++te)
{
@ -6118,7 +6155,7 @@ LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
return obj->permMove();
return obj && obj->permMove();
}
} func;
LLSelectNode* res = get_root_first ? getFirstRootNode(&func, TRUE) : getFirstNode(&func);
@ -6135,7 +6172,7 @@ LLViewerObject* LLObjectSelection::getFirstCopyableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
return obj->permCopy() && !obj->isAttachment();
return obj && obj->permCopy() && !obj->isAttachment();
}
} func;
return getFirstSelectedObject(&func, get_parent);
@ -6156,10 +6193,9 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject()
LLViewerObject* obj = node->getObject();
// you can delete an object if you are the owner
// or you have permission to modify it.
if( (obj->permModify())
|| (obj->permYouOwner())
|| (!obj->permAnyOwner()) // public
)
if( obj && ( (obj->permModify()) ||
(obj->permYouOwner()) ||
(!obj->permAnyOwner()) )) // public
{
if( !obj->isAttachment() )
{
@ -6183,7 +6219,7 @@ LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
return obj->permModify();
return obj && obj->permModify();
}
} func;
return getFirstSelectedObject(&func, get_parent);
@ -6199,7 +6235,7 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent)
bool apply(LLSelectNode* node)
{
LLViewerObject* obj = node->getObject();
return obj->permMove();
return obj && obj->permMove();
}
} func;
return getFirstSelectedObject(&func, get_parent);

Some files were not shown because too many files have changed in this diff Show More