Pull merge from lindenlab/viewer-release
commit
5690becdf4
1
.hgtags
1
.hgtags
|
|
@ -475,3 +475,4 @@ d40c66e410741de7e90b1ed6dac28dd8a2d7e1f6 3.6.8-release
|
|||
5d746de933a98ca17887cde2fece80e9c7ab0b98 3.7.0-release
|
||||
dcb4981ce255841b6083d8f65444b65d5a733a17 3.7.1-release
|
||||
b842534cb4d76c9ef87676a62b1d2d19e79c015f 3.7.2-release
|
||||
962d3f98955bfc7310a7867c8cbc3df075e54aa9 3.7.3-release
|
||||
|
|
|
|||
|
|
@ -49,17 +49,11 @@ viewer_channel = "Second Life Test"
|
|||
|
||||
# Setup default packaging parameters.
|
||||
sourceid = ""
|
||||
additional_packages = "Amazon Desura A B C"
|
||||
additional_packages = "Amazon Desura"
|
||||
Amazon_sourceid = "1207v_Amazon"
|
||||
Amazon_viewer_channel_suffix = "Amazon"
|
||||
Desura_sourceid = "1208_desura"
|
||||
Desura_viewer_channel_suffix = "Desura"
|
||||
A_sourceid = "1300_A"
|
||||
A_viewer_channel_suffix = "A"
|
||||
B_sourceid = "1301_B"
|
||||
B_viewer_channel_suffix = "B"
|
||||
C_sourceid = "1302_C"
|
||||
C_viewer_channel_suffix = "C"
|
||||
|
||||
# Report changes since...
|
||||
viewer-development.show_changes_since = last_sprint
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ public:
|
|||
~LLAvatarBoneInfo()
|
||||
{
|
||||
std::for_each(mChildList.begin(), mChildList.end(), DeletePointer());
|
||||
mChildList.clear();
|
||||
}
|
||||
BOOL parseXml(LLXmlTreeNode* node);
|
||||
|
||||
|
|
@ -108,6 +109,7 @@ public:
|
|||
~LLAvatarSkeletonInfo()
|
||||
{
|
||||
std::for_each(mBoneInfoList.begin(), mBoneInfoList.end(), DeletePointer());
|
||||
mBoneInfoList.clear();
|
||||
}
|
||||
BOOL parseXml(LLXmlTreeNode* node);
|
||||
S32 getNumBones() const { return mNumBones; }
|
||||
|
|
@ -132,14 +134,26 @@ LLAvatarAppearance::LLAvatarXmlInfo::LLAvatarXmlInfo()
|
|||
LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
|
||||
{
|
||||
std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer());
|
||||
mMeshInfoList.clear();
|
||||
|
||||
std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer());
|
||||
mSkeletalDistortionInfoList.clear();
|
||||
|
||||
std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer());
|
||||
mAttachmentInfoList.clear();
|
||||
|
||||
deleteAndClear(mTexSkinColorInfo);
|
||||
deleteAndClear(mTexHairColorInfo);
|
||||
deleteAndClear(mTexEyeColorInfo);
|
||||
|
||||
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
|
||||
mLayerInfoList.clear();
|
||||
|
||||
std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer());
|
||||
mDriverInfoList.clear();
|
||||
|
||||
std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer());
|
||||
mMorphMaskInfoList.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -291,10 +305,6 @@ LLAvatarAppearance::~LLAvatarAppearance()
|
|||
clearSkeleton();
|
||||
deleteAndClearArray(mCollisionVolumes);
|
||||
|
||||
deleteAndClear(mTexSkinColor);
|
||||
deleteAndClear(mTexHairColor);
|
||||
deleteAndClear(mTexEyeColor);
|
||||
|
||||
std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer());
|
||||
mPolyMeshes.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ LLTexGlobalColorInfo::LLTexGlobalColorInfo()
|
|||
LLTexGlobalColorInfo::~LLTexGlobalColorInfo()
|
||||
{
|
||||
for_each(mParamColorInfoList.begin(), mParamColorInfoList.end(), DeletePointer());
|
||||
mParamColorInfoList.clear();
|
||||
}
|
||||
|
||||
BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ LLTexLayerSetInfo::LLTexLayerSetInfo() :
|
|||
LLTexLayerSetInfo::~LLTexLayerSetInfo( )
|
||||
{
|
||||
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
|
||||
mLayerInfoList.clear();
|
||||
}
|
||||
|
||||
BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
|
||||
|
|
@ -282,7 +283,10 @@ LLTexLayerSet::~LLTexLayerSet()
|
|||
{
|
||||
deleteCaches();
|
||||
std::for_each(mLayerList.begin(), mLayerList.end(), DeletePointer());
|
||||
mLayerList.clear();
|
||||
|
||||
std::for_each(mMaskLayerList.begin(), mMaskLayerList.end(), DeletePointer());
|
||||
mMaskLayerList.clear();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -652,7 +656,9 @@ LLTexLayerInfo::LLTexLayerInfo() :
|
|||
LLTexLayerInfo::~LLTexLayerInfo( )
|
||||
{
|
||||
std::for_each(mParamColorInfoList.begin(), mParamColorInfoList.end(), DeletePointer());
|
||||
mParamColorInfoList.clear();
|
||||
std::for_each(mParamAlphaInfoList.begin(), mParamAlphaInfoList.end(), DeletePointer());
|
||||
mParamAlphaInfoList.clear();
|
||||
}
|
||||
|
||||
BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@ void LLListener_FMODEX::orient(LLVector3 up, LLVector3 at)
|
|||
//-----------------------------------------------------------------------
|
||||
void LLListener_FMODEX::commitDeferredChanges()
|
||||
{
|
||||
if(!mSystem)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mSystem->update();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
|
|||
LLBVHLoader::~LLBVHLoader()
|
||||
{
|
||||
std::for_each(mJoints.begin(),mJoints.end(),DeletePointer());
|
||||
mJoints.clear();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ LLKeyframeMotion::JointMotionList::JointMotionList()
|
|||
LLKeyframeMotion::JointMotionList::~JointMotionList()
|
||||
{
|
||||
for_each(mConstraints.begin(), mConstraints.end(), DeletePointer());
|
||||
mConstraints.clear();
|
||||
for_each(mJointMotionArray.begin(), mJointMotionArray.end(), DeletePointer());
|
||||
mJointMotionArray.clear();
|
||||
}
|
||||
|
||||
U32 LLKeyframeMotion::JointMotionList::dumpDiagInfo()
|
||||
|
|
@ -447,6 +449,7 @@ LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id)
|
|||
LLKeyframeMotion::~LLKeyframeMotion()
|
||||
{
|
||||
for_each(mConstraints.begin(), mConstraints.end(), DeletePointer());
|
||||
mConstraints.clear();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ LLMultiGesture::LLMultiGesture()
|
|||
LLMultiGesture::~LLMultiGesture()
|
||||
{
|
||||
std::for_each(mSteps.begin(), mSteps.end(), DeletePointer());
|
||||
mSteps.clear();
|
||||
}
|
||||
|
||||
void LLMultiGesture::reset()
|
||||
|
|
|
|||
|
|
@ -461,6 +461,7 @@ LLPoseBlender::LLPoseBlender()
|
|||
LLPoseBlender::~LLPoseBlender()
|
||||
{
|
||||
for_each(mJointStateBlenderPool.begin(), mJointStateBlenderPool.end(), DeletePairedPointer());
|
||||
mJointStateBlenderPool.clear();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
|
|||
static const std::string DISPLAY_NAME_NEXT_UPDATE("display_name_next_update");
|
||||
|
||||
bool LLAvatarName::sUseDisplayNames = true;
|
||||
bool LLAvatarName::sUseUsernames = true;
|
||||
|
||||
// Minimum time-to-live (in seconds) for a name entry.
|
||||
// Avatar name should always guarantee to expire reasonably soon by default
|
||||
|
|
@ -81,6 +82,16 @@ bool LLAvatarName::useDisplayNames()
|
|||
return sUseDisplayNames;
|
||||
}
|
||||
|
||||
void LLAvatarName::setUseUsernames(bool use)
|
||||
{
|
||||
sUseUsernames = use;
|
||||
}
|
||||
|
||||
bool LLAvatarName::useUsernames()
|
||||
{
|
||||
return sUseUsernames;
|
||||
}
|
||||
|
||||
LLSD LLAvatarName::asLLSD() const
|
||||
{
|
||||
LLSD sd;
|
||||
|
|
@ -168,7 +179,11 @@ std::string LLAvatarName::getCompleteName() const
|
|||
}
|
||||
else
|
||||
{
|
||||
name = mDisplayName + " (" + mUsername + ")";
|
||||
name = mDisplayName;
|
||||
if(sUseUsernames)
|
||||
{
|
||||
name += " (" + mUsername + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ public:
|
|||
static void setUseDisplayNames(bool use);
|
||||
static bool useDisplayNames();
|
||||
|
||||
static void setUseUsernames(bool use);
|
||||
static bool useUsernames();
|
||||
|
||||
// A name object is valid if not temporary and not yet expired (default is expiration not checked)
|
||||
bool isValidName(F64 max_unrefreshed = 0.0f) const { return !mIsTemporaryName && (mExpires >= max_unrefreshed); }
|
||||
|
||||
|
|
@ -128,6 +131,9 @@ private:
|
|||
// Global flag indicating if display name should be used or not
|
||||
// This will affect the output of the high level "get" methods
|
||||
static bool sUseDisplayNames;
|
||||
|
||||
// Flag indicating if username should be shown after display name or not
|
||||
static bool sUseUsernames;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -429,8 +429,8 @@ namespace LLError
|
|||
|
||||
~Settings()
|
||||
{
|
||||
for_each(recorders.begin(), recorders.end(),
|
||||
DeletePointer());
|
||||
for_each(recorders.begin(), recorders.end(), DeletePointer());
|
||||
recorders.clear();
|
||||
}
|
||||
|
||||
static Settings*& getPtr();
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ public:
|
|||
~NamedTimerFactory()
|
||||
{
|
||||
std::for_each(mTimers.begin(), mTimers.end(), DeletePairedPointer());
|
||||
mTimers.clear();
|
||||
|
||||
delete mTimerRoot;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ struct DeletePointerArray
|
|||
// The general form is:
|
||||
//
|
||||
// std::for_each(somemap.begin(), somemap.end(), DeletePairedPointer());
|
||||
// somemap.clear(); // Don't leave dangling pointers around
|
||||
|
||||
struct DeletePairedPointer
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
#include "llsdserialize.h"
|
||||
#include "llproxy.h"
|
||||
|
||||
LLPumpIO* gServicePump;
|
||||
LLPumpIO* gServicePump = NULL;
|
||||
BOOL gBreak = false;
|
||||
BOOL gSent = false;
|
||||
|
||||
|
|
@ -80,7 +80,8 @@ LLCrashLogger::LLCrashLogger() :
|
|||
|
||||
LLCrashLogger::~LLCrashLogger()
|
||||
{
|
||||
|
||||
delete gServicePump;
|
||||
gServicePump = NULL;
|
||||
}
|
||||
|
||||
// TRIM_SIZE must remain larger than LINE_SEARCH_SIZE.
|
||||
|
|
|
|||
|
|
@ -680,6 +680,15 @@ void LLAvatarNameCache::setUseDisplayNames(bool use)
|
|||
}
|
||||
}
|
||||
|
||||
void LLAvatarNameCache::setUseUsernames(bool use)
|
||||
{
|
||||
if (use != LLAvatarName::useUsernames())
|
||||
{
|
||||
LLAvatarName::setUseUsernames(use);
|
||||
mUseDisplayNamesSignal();
|
||||
}
|
||||
}
|
||||
|
||||
void LLAvatarNameCache::erase(const LLUUID& agent_id)
|
||||
{
|
||||
sCache.erase(agent_id);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ namespace LLAvatarNameCache
|
|||
// Set display name: flips the switch and triggers the callbacks.
|
||||
void setUseDisplayNames(bool use);
|
||||
|
||||
void setUseUsernames(bool use);
|
||||
|
||||
void insert(const LLUUID& agent_id, const LLAvatarName& av_name);
|
||||
void erase(const LLUUID& agent_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ LLBufferArray::LLBufferArray() :
|
|||
LLBufferArray::~LLBufferArray()
|
||||
{
|
||||
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
|
||||
|
||||
mBuffers.clear();
|
||||
delete mMutexp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -278,7 +278,9 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg)
|
|||
LLCacheName::Impl::~Impl()
|
||||
{
|
||||
for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
|
||||
mCache.clear();
|
||||
for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
|
||||
mReplyQueue.clear();
|
||||
}
|
||||
|
||||
boost::signals2::connection LLCacheName::Impl::addPending(const LLUUID& id, const LLCacheNameCallback& callback)
|
||||
|
|
|
|||
|
|
@ -1741,6 +1741,7 @@ void LLCurl::cleanupClass()
|
|||
#if SAFE_SSL
|
||||
CRYPTO_set_locking_callback(NULL);
|
||||
for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer());
|
||||
sSSLMutex.clear();
|
||||
#endif
|
||||
|
||||
LL_CHECK_MEMORY
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ LLHTTPNode::LLHTTPNode()
|
|||
// virtual
|
||||
LLHTTPNode::~LLHTTPNode()
|
||||
{
|
||||
std::for_each(impl.mNamedChildren.begin(), impl.mNamedChildren.end(),
|
||||
DeletePairedPointer());
|
||||
std::for_each(impl.mNamedChildren.begin(), impl.mNamedChildren.end(), DeletePairedPointer());
|
||||
impl.mNamedChildren.clear();
|
||||
|
||||
delete impl.mWildcardChild;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace
|
|||
{
|
||||
typedef std::map<LLHost, LLHTTPSender*> SenderMap;
|
||||
static SenderMap senderMap;
|
||||
static LLHTTPSender* defaultSender = new LLHTTPSender();
|
||||
static LLPointer<LLHTTPSender> defaultSender(new LLHTTPSender());
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -90,6 +90,5 @@ void LLHTTPSender::clearSender(const LLHost& host)
|
|||
//static
|
||||
void LLHTTPSender::setDefaultSender(LLHTTPSender* sender)
|
||||
{
|
||||
delete defaultSender;
|
||||
defaultSender = sender;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
class LLHost;
|
||||
class LLSD;
|
||||
|
||||
class LLHTTPSender
|
||||
class LLHTTPSender : public LLThreadSafeRefCount
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ public:
|
|||
~LLMsgData()
|
||||
{
|
||||
for_each(mMemberBlocks.begin(), mMemberBlocks.end(), DeletePairedPointer());
|
||||
mMemberBlocks.clear();
|
||||
}
|
||||
|
||||
void addBlock(LLMsgBlkData *blockp)
|
||||
|
|
|
|||
|
|
@ -91,15 +91,17 @@ void LLTemplateMessageReader::getData(const char *blockname, const char *varname
|
|||
}
|
||||
|
||||
LLMsgBlkData *msg_block_data = iter->second;
|
||||
LLMsgVarData& vardata = msg_block_data->mMemberVarData[vnamep];
|
||||
LLMsgBlkData::msg_var_data_map_t &var_data_map = msg_block_data->mMemberVarData;
|
||||
|
||||
if (!vardata.getName())
|
||||
if (var_data_map.find(vnamep) == var_data_map.end())
|
||||
{
|
||||
llerrs << "Variable "<< vnamep << " not in message "
|
||||
<< mCurrentRMessageData->mName<< " block " << bnamep << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
LLMsgVarData& vardata = msg_block_data->mMemberVarData[vnamep];
|
||||
|
||||
if (size && size != vardata.getSize())
|
||||
{
|
||||
llerrs << "Msg " << mCurrentRMessageData->mName
|
||||
|
|
|
|||
|
|
@ -3032,12 +3032,23 @@ void LLMessageSystem::setExceptionFunc(EMessageException e,
|
|||
BOOL LLMessageSystem::callExceptionFunc(EMessageException exception)
|
||||
{
|
||||
callbacks_t::iterator it = mExceptionCallbacks.find(exception);
|
||||
if(it != mExceptionCallbacks.end())
|
||||
if(it == mExceptionCallbacks.end())
|
||||
{
|
||||
((*it).second.first)(this, (*it).second.second,exception);
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
exception_t& ex = it->second;
|
||||
msg_exception_callback ex_cb = ex.first;
|
||||
|
||||
if (!ex_cb)
|
||||
{
|
||||
LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
(ex_cb)(this, ex.second, exception);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data)
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ LLFontFreetype::~LLFontFreetype()
|
|||
|
||||
// Delete glyph info
|
||||
std::for_each(mCharGlyphInfoMap.begin(), mCharGlyphInfoMap.end(), DeletePairedPointer());
|
||||
mCharGlyphInfoMap.clear();
|
||||
|
||||
// mFontBitmapCachep will be cleaned up by LLPointer destructor.
|
||||
// mFallbackFonts cleaned up by LLPointer destructor
|
||||
|
|
|
|||
|
|
@ -2196,7 +2196,15 @@ void LLRender::texCoord2fv(const GLfloat* tc)
|
|||
|
||||
void LLRender::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a)
|
||||
{
|
||||
mColorsp[mCount] = LLColor4U(r,g,b,a);
|
||||
if (!LLGLSLShader::sCurBoundShaderPtr ||
|
||||
LLGLSLShader::sCurBoundShaderPtr->mAttributeMask & LLVertexBuffer::MAP_COLOR)
|
||||
{
|
||||
mColorsp[mCount] = LLColor4U(r,g,b,a);
|
||||
}
|
||||
else
|
||||
{ //not using shaders or shader reads color from a uniform
|
||||
diffuseColor4ub(r,g,b,a);
|
||||
}
|
||||
}
|
||||
void LLRender::color4ubv(const GLubyte* c)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -315,14 +315,15 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask)
|
|||
S32 delta_y = screen_y - mDragLastScreenY;
|
||||
|
||||
// if dragging a docked floater we want to undock
|
||||
if (((LLFloater*)getParent())->isDocked())
|
||||
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
|
||||
if (parent && parent->isDocked())
|
||||
{
|
||||
const S32 SLOP = 12;
|
||||
|
||||
if (delta_y <= -SLOP ||
|
||||
delta_y >= SLOP)
|
||||
{
|
||||
((LLFloater*)getParent())->setDocked(false, false);
|
||||
parent->setDocked(false, false);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -509,8 +509,8 @@ LLFloater::~LLFloater()
|
|||
|
||||
if( gFocusMgr.childHasKeyboardFocus(this))
|
||||
{
|
||||
// Just in case we might still have focus here, release it.
|
||||
releaseFocus();
|
||||
// Just in case we might still have focus here, release it.
|
||||
releaseFocus();
|
||||
}
|
||||
|
||||
// This is important so that floaters with persistent rects (i.e., those
|
||||
|
|
@ -528,7 +528,6 @@ LLFloater::~LLFloater()
|
|||
setVisible(false); // We're not visible if we're destroyed
|
||||
storeVisibilityControl();
|
||||
storeDockStateControl();
|
||||
|
||||
delete mMinimizeSignal;
|
||||
}
|
||||
|
||||
|
|
@ -1138,7 +1137,11 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
|
|||
|
||||
if (by_user && !getHost())
|
||||
{
|
||||
static_cast<LLFloaterView*>(getParent())->adjustToFitScreen(this, !isMinimized());
|
||||
LLFloaterView * floaterVp = dynamic_cast<LLFloaterView*>(getParent());
|
||||
if (floaterVp)
|
||||
{
|
||||
floaterVp->adjustToFitScreen(this, !isMinimized());
|
||||
}
|
||||
}
|
||||
|
||||
// if not minimized, adjust all snapped dependents to new shape
|
||||
|
|
@ -1349,7 +1352,8 @@ void LLFloater::setFocus( BOOL b )
|
|||
if (b)
|
||||
{
|
||||
// only push focused floaters to front of stack if not in midst of ctrl-tab cycle
|
||||
if (!getHost() && !((LLFloaterView*)getParent())->getCycleMode())
|
||||
LLFloaterView * parent = dynamic_cast<LLFloaterView *>(getParent());
|
||||
if (!getHost() && parent && !parent->getCycleMode())
|
||||
{
|
||||
if (!isFrontmost())
|
||||
{
|
||||
|
|
@ -1619,7 +1623,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
|
|||
}
|
||||
else
|
||||
{
|
||||
LLFloaterView* parent = (LLFloaterView*) getParent();
|
||||
LLFloaterView* parent = dynamic_cast<LLFloaterView*>( getParent() );
|
||||
if (parent)
|
||||
{
|
||||
parent->bringToFront( this );
|
||||
|
|
@ -1658,7 +1662,11 @@ void LLFloater::setFrontmost(BOOL take_focus)
|
|||
{
|
||||
// there are more than one floater view
|
||||
// so we need to query our parent directly
|
||||
((LLFloaterView*)getParent())->bringToFront(this, take_focus);
|
||||
LLFloaterView * parent = dynamic_cast<LLFloaterView*>( getParent() );
|
||||
if (parent)
|
||||
{
|
||||
parent->bringToFront(this, take_focus);
|
||||
}
|
||||
|
||||
// Make sure to set the appropriate transparency type (STORM-732).
|
||||
updateTransparency(hasFocus() || getIsChrome() ? TT_ACTIVE : TT_INACTIVE);
|
||||
|
|
@ -1951,6 +1959,7 @@ void LLFloater::drawShadow(LLPanel* panel)
|
|||
|
||||
void LLFloater::updateTransparency(LLView* view, ETypeTransparency transparency_type)
|
||||
{
|
||||
if (!view) return;
|
||||
child_list_t children = *view->getChildList();
|
||||
child_list_t::iterator it = children.begin();
|
||||
|
||||
|
|
@ -2387,6 +2396,9 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF
|
|||
|
||||
void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
|
||||
{
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
if (mFrontChild == child)
|
||||
{
|
||||
if (give_focus && !gFocusMgr.childHasKeyboardFocus(child))
|
||||
|
|
@ -2742,8 +2754,6 @@ void LLFloaterView::refresh()
|
|||
}
|
||||
}
|
||||
|
||||
const S32 FLOATER_MIN_VISIBLE_PIXELS = 16;
|
||||
|
||||
void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars/* = false*/)
|
||||
{
|
||||
if (floater->getParent() != this)
|
||||
|
|
@ -2796,11 +2806,29 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
|
|||
}
|
||||
}
|
||||
|
||||
const LLRect& floater_rect = floater->getRect();
|
||||
|
||||
S32 delta_left = mToolbarLeftRect.notEmpty() ? mToolbarLeftRect.mRight - floater_rect.mRight : 0;
|
||||
S32 delta_bottom = mToolbarBottomRect.notEmpty() ? mToolbarBottomRect.mTop - floater_rect.mTop : 0;
|
||||
S32 delta_right = mToolbarRightRect.notEmpty() ? mToolbarRightRect.mLeft - floater_rect.mLeft : 0;
|
||||
|
||||
// move window fully onscreen
|
||||
if (floater->translateIntoRect( snap_in_toolbars ? getSnapRect() : gFloaterView->getRect(), allow_partial_outside ? FLOATER_MIN_VISIBLE_PIXELS : S32_MAX ))
|
||||
{
|
||||
floater->clearSnapTarget();
|
||||
}
|
||||
else if (delta_left > 0 && floater_rect.mTop < mToolbarLeftRect.mTop && floater_rect.mBottom > mToolbarLeftRect.mBottom)
|
||||
{
|
||||
floater->translate(delta_left, 0);
|
||||
}
|
||||
else if (delta_bottom > 0 && floater_rect.mLeft > mToolbarBottomRect.mLeft && floater_rect.mRight < mToolbarBottomRect.mRight)
|
||||
{
|
||||
floater->translate(0, delta_bottom);
|
||||
}
|
||||
else if (delta_right < 0 && floater_rect.mTop < mToolbarRightRect.mTop && floater_rect.mBottom > mToolbarRightRect.mBottom)
|
||||
{
|
||||
floater->translate(delta_right, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterView::draw()
|
||||
|
|
@ -2846,10 +2874,13 @@ LLFloater *LLFloaterView::getFocusedFloater() const
|
|||
{
|
||||
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
|
||||
{
|
||||
LLUICtrl* ctrlp = (*child_it)->isCtrl() ? static_cast<LLUICtrl*>(*child_it) : NULL;
|
||||
if ( ctrlp && ctrlp->hasFocus() )
|
||||
if ((*child_it)->isCtrl())
|
||||
{
|
||||
return static_cast<LLFloater *>(ctrlp);
|
||||
LLFloater* ctrlp = dynamic_cast<LLFloater*>(*child_it);
|
||||
if ( ctrlp && ctrlp->hasFocus() )
|
||||
{
|
||||
return ctrlp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
|
@ -3000,6 +3031,25 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list)
|
|||
LLFloaterReg::blockShowFloaters(false);
|
||||
}
|
||||
|
||||
void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect)
|
||||
{
|
||||
switch (tb)
|
||||
{
|
||||
case LLToolBarEnums::TOOLBAR_LEFT:
|
||||
mToolbarLeftRect = toolbar_rect;
|
||||
break;
|
||||
case LLToolBarEnums::TOOLBAR_BOTTOM:
|
||||
mToolbarBottomRect = toolbar_rect;
|
||||
break;
|
||||
case LLToolBarEnums::TOOLBAR_RIGHT:
|
||||
mToolbarRightRect = toolbar_rect;
|
||||
break;
|
||||
default:
|
||||
llwarns << "setToolbarRect() passed odd toolbar number " << (S32) tb << llendl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloater::setInstanceName(const std::string& name)
|
||||
{
|
||||
if (name != mInstanceName)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#define LL_FLOATER_H
|
||||
|
||||
#include "llpanel.h"
|
||||
#include "lltoolbar.h"
|
||||
#include "lluuid.h"
|
||||
//#include "llnotificationsutil.h"
|
||||
#include <set>
|
||||
|
|
@ -514,6 +515,8 @@ private:
|
|||
// LLFloaterView
|
||||
// Parent of all floating panels
|
||||
|
||||
const S32 FLOATER_MIN_VISIBLE_PIXELS = 16;
|
||||
|
||||
class LLFloaterView : public LLUICtrl
|
||||
{
|
||||
public:
|
||||
|
|
@ -572,10 +575,15 @@ public:
|
|||
void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; }
|
||||
LLFloater* getFrontmostClosableFloater();
|
||||
|
||||
void setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LLRect& toolbar_rect);
|
||||
|
||||
private:
|
||||
void hiddenFloaterClosed(LLFloater* floater);
|
||||
|
||||
LLRect mLastSnapRect;
|
||||
LLRect mToolbarLeftRect;
|
||||
LLRect mToolbarBottomRect;
|
||||
LLRect mToolbarRightRect;
|
||||
LLHandle<LLView> mSnapView;
|
||||
BOOL mFocusCycleMode;
|
||||
S32 mSnapOffsetBottom;
|
||||
|
|
|
|||
|
|
@ -76,8 +76,11 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const
|
|||
LLKeywords::~LLKeywords()
|
||||
{
|
||||
std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer());
|
||||
mWordTokenMap.clear();
|
||||
std::for_each(mLineTokenList.begin(), mLineTokenList.end(), DeletePointer());
|
||||
mLineTokenList.clear();
|
||||
std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer());
|
||||
mDelimiterTokenList.clear();
|
||||
}
|
||||
|
||||
BOOL LLKeywords::loadFromFile( const std::string& filename )
|
||||
|
|
|
|||
|
|
@ -693,8 +693,11 @@ void LLMenuItemTearOffGL::onCommit()
|
|||
{
|
||||
if (getMenu()->getTornOff())
|
||||
{
|
||||
LLTearOffMenu* torn_off_menu = (LLTearOffMenu*)(getMenu()->getParent());
|
||||
torn_off_menu->closeFloater();
|
||||
LLTearOffMenu * torn_off_menu = dynamic_cast<LLTearOffMenu*>(getMenu()->getParent());
|
||||
if (torn_off_menu)
|
||||
{
|
||||
torn_off_menu->closeFloater();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1097,7 +1100,8 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight )
|
|||
|
||||
BOOL auto_open = getEnabled() && (!branch->getVisible() || branch->getTornOff());
|
||||
// torn off menus don't open sub menus on hover unless they have focus
|
||||
if (getMenu()->getTornOff() && !((LLFloater*)getMenu()->getParent())->hasFocus())
|
||||
LLFloater * menu_parent = dynamic_cast<LLFloater *>(getMenu()->getParent());
|
||||
if (getMenu()->getTornOff() && menu_parent && !menu_parent->hasFocus())
|
||||
{
|
||||
auto_open = FALSE;
|
||||
}
|
||||
|
|
@ -1118,7 +1122,11 @@ void LLMenuItemBranchGL::setHighlight( BOOL highlight )
|
|||
{
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
((LLFloater*)branch->getParent())->setFocus(FALSE);
|
||||
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
|
||||
if (branch_parent)
|
||||
{
|
||||
branch_parent->setFocus(FALSE);
|
||||
}
|
||||
branch->clearHoverItem();
|
||||
}
|
||||
else
|
||||
|
|
@ -1175,11 +1183,19 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
|
|||
BOOL handled = branch->clearHoverItem();
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
((LLFloater*)branch->getParent())->setFocus(FALSE);
|
||||
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
|
||||
if (branch_parent)
|
||||
{
|
||||
branch_parent->setFocus(FALSE);
|
||||
}
|
||||
}
|
||||
if (handled && getMenu()->getTornOff())
|
||||
{
|
||||
((LLFloater*)getMenu()->getParent())->setFocus(TRUE);
|
||||
LLFloater * menu_parent = dynamic_cast<LLFloater *>(getMenu()->getParent());
|
||||
if (menu_parent)
|
||||
{
|
||||
menu_parent->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
|
@ -1219,9 +1235,13 @@ void LLMenuItemBranchGL::openMenu()
|
|||
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
gFloaterView->bringToFront((LLFloater*)branch->getParent());
|
||||
// this might not be necessary, as torn off branches don't get focus and hence no highligth
|
||||
branch->highlightNextItem(NULL);
|
||||
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
|
||||
if (branch_parent)
|
||||
{
|
||||
gFloaterView->bringToFront(branch_parent);
|
||||
// this might not be necessary, as torn off branches don't get focus and hence no highligth
|
||||
branch->highlightNextItem(NULL);
|
||||
}
|
||||
}
|
||||
else if( !branch->getVisible() )
|
||||
{
|
||||
|
|
@ -1348,7 +1368,11 @@ void LLMenuItemBranchDownGL::openMenu( void )
|
|||
{
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
gFloaterView->bringToFront((LLFloater*)branch->getParent());
|
||||
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
|
||||
if (branch_parent)
|
||||
{
|
||||
gFloaterView->bringToFront(branch_parent);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1403,7 +1427,11 @@ void LLMenuItemBranchDownGL::setHighlight( BOOL highlight )
|
|||
{
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
((LLFloater*)branch->getParent())->setFocus(FALSE);
|
||||
LLFloater * branch_parent = dynamic_cast<LLFloater *>(branch->getParent());
|
||||
if (branch_parent)
|
||||
{
|
||||
branch_parent->setFocus(FALSE);
|
||||
}
|
||||
branch->clearHoverItem();
|
||||
}
|
||||
else
|
||||
|
|
@ -1826,20 +1854,28 @@ BOOL LLMenuGL::jumpKeysActive()
|
|||
{
|
||||
LLMenuItemGL* highlighted_item = getHighlightedItem();
|
||||
BOOL active = getVisible() && getEnabled();
|
||||
if (getTornOff())
|
||||
{
|
||||
// activation of jump keys on torn off menus controlled by keyboard focus
|
||||
active = active && ((LLFloater*)getParent())->hasFocus();
|
||||
|
||||
}
|
||||
else
|
||||
if (active)
|
||||
{
|
||||
// Are we the terminal active menu?
|
||||
// Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus)
|
||||
// and we don't have a highlighted menu item pointing to an active sub-menu
|
||||
active = active && (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active...
|
||||
&& (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active
|
||||
if (getTornOff())
|
||||
{
|
||||
// activation of jump keys on torn off menus controlled by keyboard focus
|
||||
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
|
||||
if (parent)
|
||||
{
|
||||
active = parent->hasFocus();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Are we the terminal active menu?
|
||||
// Yes, if parent menu item deems us to be active (just being visible is sufficient for top-level menus)
|
||||
// and we don't have a highlighted menu item pointing to an active sub-menu
|
||||
active = (!getParentMenuItem() || getParentMenuItem()->isActive()) // I have a parent that is active...
|
||||
&& (!highlighted_item || !highlighted_item->isActive()); //... but no child that is active
|
||||
}
|
||||
}
|
||||
|
||||
return active;
|
||||
}
|
||||
|
||||
|
|
@ -1855,7 +1891,12 @@ BOOL LLMenuGL::isOpen()
|
|||
return TRUE;
|
||||
}
|
||||
// otherwise we are only active if we have keyboard focus
|
||||
return ((LLFloater*)getParent())->hasFocus();
|
||||
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
|
||||
if (parent)
|
||||
{
|
||||
return parent->hasFocus();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2714,7 +2755,11 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
|
|||
// same as giving focus to it
|
||||
if (!cur_item && getTornOff())
|
||||
{
|
||||
((LLFloater*)getParent())->setFocus(TRUE);
|
||||
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
|
||||
if (parent)
|
||||
{
|
||||
parent->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// Current item position in the items list
|
||||
|
|
@ -2816,7 +2861,11 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa
|
|||
// same as giving focus to it
|
||||
if (!cur_item && getTornOff())
|
||||
{
|
||||
((LLFloater*)getParent())->setFocus(TRUE);
|
||||
LLFloater * parent = dynamic_cast<LLFloater *>(getParent());
|
||||
if (parent)
|
||||
{
|
||||
parent->setFocus(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// Current item reverse position from the end of the list
|
||||
|
|
|
|||
|
|
@ -330,17 +330,16 @@ private:
|
|||
|
||||
// local static instance for registering a particular panel class
|
||||
template<typename T>
|
||||
class LLRegisterPanelClassWrapper
|
||||
: public LLRegisterPanelClass
|
||||
class LLPanelInjector
|
||||
{
|
||||
public:
|
||||
// reigister with either the provided builder, or the generic templated builder
|
||||
LLRegisterPanelClassWrapper(const std::string& tag);
|
||||
// register with either the provided builder, or the generic templated builder
|
||||
LLPanelInjector(const std::string& tag);
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
LLRegisterPanelClassWrapper<T>::LLRegisterPanelClassWrapper(const std::string& tag)
|
||||
LLPanelInjector<T>::LLPanelInjector(const std::string& tag)
|
||||
{
|
||||
LLRegisterPanelClass::instance().addPanelClass(tag,&LLRegisterPanelClass::defaultPanelClassBuilder<T>);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,9 @@ LLScrollListCtrl::~LLScrollListCtrl()
|
|||
delete mSortCallback;
|
||||
|
||||
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
|
||||
mItemList.clear();
|
||||
std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
|
||||
mColumns.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1855,7 +1857,7 @@ void LLScrollListCtrl::showNameDetails(std::string id, bool is_group)
|
|||
// open the resident's details or the group details
|
||||
std::string sltype = is_group ? "group" : "agent";
|
||||
std::string slurl = "secondlife:///app/" + sltype + "/" + id + "/about";
|
||||
LLUrlAction::clickAction(slurl);
|
||||
LLUrlAction::clickAction(slurl, true);
|
||||
}
|
||||
|
||||
void LLScrollListCtrl::copyNameToClipboard(std::string id, bool is_group)
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ LLScrollListItem::LLScrollListItem( const Params& p )
|
|||
LLScrollListItem::~LLScrollListItem()
|
||||
{
|
||||
std::for_each(mColumns.begin(), mColumns.end(), DeletePointer());
|
||||
mColumns.clear();
|
||||
}
|
||||
|
||||
void LLScrollListItem::addColumn(const LLScrollListCell::Params& p)
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
|
|||
LLTabContainer::~LLTabContainer()
|
||||
{
|
||||
std::for_each(mTabList.begin(), mTabList.end(), DeletePointer());
|
||||
mTabList.clear();
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ LLTextBase::Params::Params()
|
|||
max_text_length("max_length", 255),
|
||||
font_shadow("font_shadow"),
|
||||
wrap("wrap"),
|
||||
trusted_content("trusted_content", true),
|
||||
use_ellipses("use_ellipses", false),
|
||||
parse_urls("parse_urls", false),
|
||||
parse_highlights("parse_highlights", false)
|
||||
|
|
@ -211,6 +212,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
|
|||
mLineSpacingPixels(p.line_spacing.pixels),
|
||||
mClip(p.clip),
|
||||
mClipPartial(p.clip_partial && !p.allow_scroll),
|
||||
mTrustedContent(p.trusted_content),
|
||||
mTrackEnd( p.track_end ),
|
||||
mScrollIndex(-1),
|
||||
mSelectionStart( 0 ),
|
||||
|
|
@ -3164,7 +3166,7 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask)
|
|||
// Only process the click if it's actually in this segment, not to the right of the end-of-line.
|
||||
if(mEditor.getSegmentAtLocalPos(x, y, false) == this)
|
||||
{
|
||||
LLUrlAction::clickAction(getStyle()->getLinkHREF());
|
||||
LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted());
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -291,7 +291,8 @@ public:
|
|||
parse_urls,
|
||||
parse_highlights,
|
||||
clip,
|
||||
clip_partial;
|
||||
clip_partial,
|
||||
trusted_content;
|
||||
|
||||
Optional<S32> v_pad,
|
||||
h_pad;
|
||||
|
|
@ -361,6 +362,7 @@ public:
|
|||
bool getWordWrap() { return mWordWrap; }
|
||||
bool getUseEllipses() { return mUseEllipses; }
|
||||
bool truncate(); // returns true of truncation occurred
|
||||
bool isContentTrusted() {return mTrustedContent;}
|
||||
|
||||
// TODO: move into LLTextSegment?
|
||||
void createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url
|
||||
|
|
@ -634,6 +636,7 @@ protected:
|
|||
bool mBGVisible; // render background?
|
||||
bool mClip; // clip text to widget rect
|
||||
bool mClipPartial; // false if we show lines that are partially inside bounding rect
|
||||
bool mTrustedContent; // if false, does not allow to execute SURL links from this editor
|
||||
bool mPlainText; // didn't use Image or Icon segments
|
||||
bool mAutoIndent;
|
||||
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ LLTextEditor::~LLTextEditor()
|
|||
|
||||
// Scrollbar is deleted by LLView
|
||||
std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer());
|
||||
|
||||
mUndoStack.clear();
|
||||
// context menu is owned by menu holder, not us
|
||||
//delete mContextMenu;
|
||||
}
|
||||
|
|
@ -1620,7 +1620,7 @@ BOOL LLTextEditor::handleControlKey(const KEY key, const MASK mask)
|
|||
}
|
||||
}
|
||||
|
||||
if (handled)
|
||||
if (handled && !gFocusMgr.getMouseCapture())
|
||||
{
|
||||
updatePrimary();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
|
|||
mButtonLeaveSignal(NULL),
|
||||
mButtonRemoveSignal(NULL),
|
||||
mDragAndDropTarget(false),
|
||||
mCaretIcon(NULL)
|
||||
mCaretIcon(NULL),
|
||||
mCenterPanel(NULL)
|
||||
{
|
||||
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
|
||||
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
|
||||
|
|
@ -200,14 +201,15 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
|
|||
center_panel_p.auto_resize = false;
|
||||
center_panel_p.user_resize = false;
|
||||
center_panel_p.mouse_opaque = false;
|
||||
LLLayoutPanel* center_panel = LLUICtrlFactory::create<LLLayoutPanel>(center_panel_p);
|
||||
mCenteringStack->addChild(center_panel);
|
||||
mCenterPanel = LLUICtrlFactory::create<LLCenterLayoutPanel>(center_panel_p);
|
||||
mCenteringStack->addChild(mCenterPanel);
|
||||
|
||||
LLPanel::Params button_panel_p(p.button_panel);
|
||||
button_panel_p.rect = center_panel->getLocalRect();
|
||||
button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_LEFT;
|
||||
button_panel_p.rect = mCenterPanel->getLocalRect();
|
||||
button_panel_p.follows.flags = FOLLOWS_BOTTOM|FOLLOWS_LEFT;
|
||||
mButtonPanel = LLUICtrlFactory::create<LLPanel>(button_panel_p);
|
||||
center_panel->addChild(mButtonPanel);
|
||||
mCenterPanel->setButtonPanel(mButtonPanel);
|
||||
mCenterPanel->addChild(mButtonPanel);
|
||||
|
||||
mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p));
|
||||
|
||||
|
|
@ -1242,3 +1244,15 @@ const std::string LLToolBarButton::getToolTip() const
|
|||
return tooltip;
|
||||
}
|
||||
|
||||
void LLToolBar::LLCenterLayoutPanel::handleReshape(const LLRect& rect, bool by_user)
|
||||
{
|
||||
LLLayoutPanel::handleReshape(rect, by_user);
|
||||
|
||||
if (!mReshapeCallback.empty())
|
||||
{
|
||||
LLRect r;
|
||||
localRectToOtherView(mButtonPanel->getRect(), &r, gFloaterView);
|
||||
r.stretch(FLOATER_MIN_VISIBLE_PIXELS);
|
||||
mReshapeCallback(mLocationId, r);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,6 +125,19 @@ namespace LLToolBarEnums
|
|||
SIDE_TOP,
|
||||
};
|
||||
|
||||
enum EToolBarLocation
|
||||
{
|
||||
TOOLBAR_NONE = 0,
|
||||
TOOLBAR_LEFT,
|
||||
TOOLBAR_RIGHT,
|
||||
TOOLBAR_BOTTOM,
|
||||
|
||||
TOOLBAR_COUNT,
|
||||
|
||||
TOOLBAR_FIRST = TOOLBAR_LEFT,
|
||||
TOOLBAR_LAST = TOOLBAR_BOTTOM,
|
||||
};
|
||||
|
||||
LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType);
|
||||
}
|
||||
|
||||
|
|
@ -150,6 +163,30 @@ class LLToolBar
|
|||
{
|
||||
friend class LLToolBarButton;
|
||||
public:
|
||||
|
||||
class LLCenterLayoutPanel : public LLLayoutPanel
|
||||
{
|
||||
public:
|
||||
typedef struct LLLayoutPanel::Params Params;
|
||||
typedef boost::function<void(LLToolBarEnums::EToolBarLocation tb, const LLRect& rect)> reshape_callback_t;
|
||||
|
||||
virtual ~LLCenterLayoutPanel() {}
|
||||
/*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
|
||||
|
||||
void setLocationId(LLToolBarEnums::EToolBarLocation id) { mLocationId = id; }
|
||||
void setReshapeCallback(reshape_callback_t cb) { mReshapeCallback = cb; }
|
||||
void setButtonPanel(LLPanel * panel) { mButtonPanel = panel; }
|
||||
|
||||
protected:
|
||||
friend class LLUICtrlFactory;
|
||||
LLCenterLayoutPanel(const Params& params) : LLLayoutPanel(params), mButtonPanel(NULL) {}
|
||||
|
||||
private:
|
||||
reshape_callback_t mReshapeCallback;
|
||||
LLToolBarEnums::EToolBarLocation mLocationId;
|
||||
LLPanel * mButtonPanel;
|
||||
};
|
||||
|
||||
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||
{
|
||||
Mandatory<LLToolBarEnums::ButtonType> button_display_mode;
|
||||
|
|
@ -198,6 +235,7 @@ public:
|
|||
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
|
||||
void setHandleDropCallback(tool_handledrop_callback_t cb) { mHandleDropCallback = cb; }
|
||||
bool isReadOnly() const { return mReadOnly; }
|
||||
LLCenterLayoutPanel * getCenterLayoutPanel() const { return mCenterPanel; }
|
||||
|
||||
LLToolBarButton* createButton(const LLCommandId& id);
|
||||
|
||||
|
|
@ -270,6 +308,7 @@ private:
|
|||
|
||||
// related widgets
|
||||
LLLayoutStack* mCenteringStack;
|
||||
LLCenterLayoutPanel* mCenterPanel;
|
||||
LLPanel* mButtonPanel;
|
||||
LLHandle<class LLContextMenu> mPopupMenuHandle;
|
||||
LLHandle<class LLView> mRemoveButtonHandle;
|
||||
|
|
|
|||
|
|
@ -87,14 +87,14 @@ void LLUrlAction::executeSLURL(std::string url)
|
|||
{
|
||||
if (sExecuteSLURLCallback)
|
||||
{
|
||||
sExecuteSLURLCallback(url);
|
||||
sExecuteSLURLCallback(url ,true);
|
||||
}
|
||||
}
|
||||
|
||||
void LLUrlAction::clickAction(std::string url)
|
||||
void LLUrlAction::clickAction(std::string url, bool trusted_content)
|
||||
{
|
||||
// Try to handle as SLURL first, then http Url
|
||||
if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url) )
|
||||
if ( (sExecuteSLURLCallback) && !sExecuteSLURLCallback(url, trusted_content) )
|
||||
{
|
||||
if (sOpenURLCallback)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
static void showLocationOnMap(std::string url);
|
||||
|
||||
/// perform the appropriate action for left-clicking on a Url
|
||||
static void clickAction(std::string url);
|
||||
static void clickAction(std::string url, bool trusted_content);
|
||||
|
||||
/// copy the label for a Url to the clipboard
|
||||
static void copyLabelToClipboard(std::string url);
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
/// specify the callbacks to enable this class's functionality
|
||||
typedef boost::function<void (const std::string&)> url_callback_t;
|
||||
typedef boost::function<bool(const std::string& url)> execute_url_callback_t;
|
||||
typedef boost::function<bool(const std::string& url, bool trusted_content)> execute_url_callback_t;
|
||||
|
||||
static void setOpenURLCallback(url_callback_t cb);
|
||||
static void setOpenURLInternalCallback(url_callback_t cb);
|
||||
|
|
|
|||
|
|
@ -1067,7 +1067,8 @@ LLUrlEntrySLLabel::LLUrlEntrySLLabel()
|
|||
|
||||
std::string LLUrlEntrySLLabel::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
{
|
||||
return getLabelFromWikiLink(url);
|
||||
std::string label = getLabelFromWikiLink(url);
|
||||
return (!LLUrlRegistry::instance().hasUrl(label)) ? label : getUrl(url);
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySLLabel::getUrl(const std::string &string) const
|
||||
|
|
|
|||
|
|
@ -645,14 +645,18 @@ void LLView::setVisible(BOOL visible)
|
|||
void LLView::handleVisibilityChange ( BOOL new_visibility )
|
||||
{
|
||||
BOOL old_visibility;
|
||||
BOOL log_visibility_change = LLViewerEventRecorder::instance().getLoggingStatus();
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
{
|
||||
// only views that are themselves visible will have their overall visibility affected by their ancestors
|
||||
old_visibility=viewp->getVisible();
|
||||
|
||||
if (old_visibility!=new_visibility)
|
||||
if(log_visibility_change)
|
||||
{
|
||||
LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget");
|
||||
if (old_visibility!=new_visibility)
|
||||
{
|
||||
LLViewerEventRecorder::instance().logVisibilityChange( viewp->getPathname(), viewp->getName(), new_visibility,"widget");
|
||||
}
|
||||
}
|
||||
|
||||
if (old_visibility)
|
||||
|
|
@ -660,11 +664,13 @@ void LLView::handleVisibilityChange ( BOOL new_visibility )
|
|||
viewp->handleVisibilityChange ( new_visibility );
|
||||
}
|
||||
|
||||
// Consider changing returns to confirm success and know which widget grabbed it
|
||||
// For now assume success and log at highest xui possible
|
||||
// NOTE we log actual state - which may differ if it somehow failed to set visibility
|
||||
lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl;
|
||||
|
||||
if(log_visibility_change)
|
||||
{
|
||||
// Consider changing returns to confirm success and know which widget grabbed it
|
||||
// For now assume success and log at highest xui possible
|
||||
// NOTE we log actual state - which may differ if it somehow failed to set visibility
|
||||
lldebugs << "LLView::handleVisibilityChange - now: " << getVisible() << " xui: " << viewp->getPathname() << " name: " << viewp->getName() << llendl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1308,52 +1314,55 @@ void LLView::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
// move child views according to reshape flags
|
||||
BOOST_FOREACH(LLView* viewp, mChildList)
|
||||
{
|
||||
LLRect child_rect( viewp->mRect );
|
||||
if (viewp != NULL)
|
||||
{
|
||||
LLRect child_rect( viewp->mRect );
|
||||
|
||||
if (viewp->followsRight() && viewp->followsLeft())
|
||||
{
|
||||
child_rect.mRight += delta_width;
|
||||
}
|
||||
else if (viewp->followsRight())
|
||||
{
|
||||
child_rect.mLeft += delta_width;
|
||||
child_rect.mRight += delta_width;
|
||||
}
|
||||
else if (viewp->followsLeft())
|
||||
{
|
||||
// left is 0, don't need to adjust coords
|
||||
}
|
||||
else
|
||||
{
|
||||
// BUG what to do when we don't follow anyone?
|
||||
// for now, same as followsLeft
|
||||
}
|
||||
if (viewp->followsRight() && viewp->followsLeft())
|
||||
{
|
||||
child_rect.mRight += delta_width;
|
||||
}
|
||||
else if (viewp->followsRight())
|
||||
{
|
||||
child_rect.mLeft += delta_width;
|
||||
child_rect.mRight += delta_width;
|
||||
}
|
||||
else if (viewp->followsLeft())
|
||||
{
|
||||
// left is 0, don't need to adjust coords
|
||||
}
|
||||
else
|
||||
{
|
||||
// BUG what to do when we don't follow anyone?
|
||||
// for now, same as followsLeft
|
||||
}
|
||||
|
||||
if (viewp->followsTop() && viewp->followsBottom())
|
||||
{
|
||||
child_rect.mTop += delta_height;
|
||||
}
|
||||
else if (viewp->followsTop())
|
||||
{
|
||||
child_rect.mTop += delta_height;
|
||||
child_rect.mBottom += delta_height;
|
||||
}
|
||||
else if (viewp->followsBottom())
|
||||
{
|
||||
// bottom is 0, so don't need to adjust coords
|
||||
}
|
||||
else
|
||||
{
|
||||
// BUG what to do when we don't follow?
|
||||
// for now, same as bottom
|
||||
}
|
||||
if (viewp->followsTop() && viewp->followsBottom())
|
||||
{
|
||||
child_rect.mTop += delta_height;
|
||||
}
|
||||
else if (viewp->followsTop())
|
||||
{
|
||||
child_rect.mTop += delta_height;
|
||||
child_rect.mBottom += delta_height;
|
||||
}
|
||||
else if (viewp->followsBottom())
|
||||
{
|
||||
// bottom is 0, so don't need to adjust coords
|
||||
}
|
||||
else
|
||||
{
|
||||
// BUG what to do when we don't follow?
|
||||
// for now, same as bottom
|
||||
}
|
||||
|
||||
S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft;
|
||||
S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom;
|
||||
viewp->translate( delta_x, delta_y );
|
||||
if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight())
|
||||
{
|
||||
viewp->reshape(child_rect.getWidth(), child_rect.getHeight());
|
||||
S32 delta_x = child_rect.mLeft - viewp->getRect().mLeft;
|
||||
S32 delta_y = child_rect.mBottom - viewp->getRect().mBottom;
|
||||
viewp->translate( delta_x, delta_y );
|
||||
if (child_rect.getWidth() != viewp->getRect().getWidth() || child_rect.getHeight() != viewp->getRect().getHeight())
|
||||
{
|
||||
viewp->reshape(child_rect.getWidth(), child_rect.getHeight());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
LLViewerEventRecorder::LLViewerEventRecorder() {
|
||||
|
||||
clear(UNDEFINED);
|
||||
|
||||
logEvents = false;
|
||||
// Remove any previous event log file
|
||||
std::string old_log_ui_events_to_llsd_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife_Events_log.old");
|
||||
LLFile::remove(old_log_ui_events_to_llsd_file);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class LLViewerEventRecorder : public LLSingleton<LLViewerEventRecorder>
|
|||
std::string get_xui();
|
||||
void update_xui(std::string xui);
|
||||
|
||||
bool getLoggingStatus();
|
||||
bool getLoggingStatus(){return logEvents;};
|
||||
void setEventLoggingOn();
|
||||
void setEventLoggingOff();
|
||||
|
||||
|
|
|
|||
|
|
@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
|||
|
||||
fs::directory_iterator end_itr; // default construction yields past-the-end
|
||||
bool found = false;
|
||||
while (mIter != end_itr && !found)
|
||||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
if (found = boost::regex_match(name, match, mFilterExp))
|
||||
{
|
||||
fname = name;
|
||||
}
|
||||
|
||||
++mIter;
|
||||
// Check if path is a directory.
|
||||
try
|
||||
{
|
||||
while (mIter != end_itr && !found)
|
||||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
if (found = boost::regex_match(name, match, mFilterExp))
|
||||
{
|
||||
fname = name;
|
||||
}
|
||||
|
||||
++mIter;
|
||||
}
|
||||
}
|
||||
catch (const fs::filesystem_error& e)
|
||||
{
|
||||
llwarns << e.what() << llendl;
|
||||
}
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -578,6 +578,7 @@ LLVFS::~LLVFS()
|
|||
mFreeBlocksByLength.clear();
|
||||
|
||||
for_each(mFreeBlocksByLocation.begin(), mFreeBlocksByLocation.end(), DeletePairedPointer());
|
||||
mFreeBlocksByLocation.clear();
|
||||
|
||||
unlockAndClose(mDataFP);
|
||||
mDataFP = NULL;
|
||||
|
|
@ -1835,6 +1836,7 @@ void LLVFS::audit()
|
|||
}
|
||||
|
||||
for_each(audit_blocks.begin(), audit_blocks.end(), DeletePointer());
|
||||
audit_blocks.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ std::string LLDXDriverFile::dump()
|
|||
LLDXDevice::~LLDXDevice()
|
||||
{
|
||||
for_each(mDriverFiles.begin(), mDriverFiles.end(), DeletePairedPointer());
|
||||
mDriverFiles.clear();
|
||||
}
|
||||
|
||||
std::string LLDXDevice::dump()
|
||||
|
|
@ -230,6 +231,7 @@ LLDXHardware::LLDXHardware()
|
|||
void LLDXHardware::cleanup()
|
||||
{
|
||||
// for_each(mDevices.begin(), mDevices.end(), DeletePairedPointer());
|
||||
// mDevices.clear();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.7.3
|
||||
3.7.4
|
||||
|
|
|
|||
|
|
@ -1203,7 +1203,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>BulkChangeShareWithGroup</key>
|
||||
<map>
|
||||
|
|
@ -3569,13 +3569,13 @@
|
|||
<key>FPSLogFrequency</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Seconds between display of FPS in log (0 for never)</string>
|
||||
<string>Seconds between display of FPS in log (0 for never)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>10.0</real>
|
||||
<real>10.0</real>
|
||||
</map>
|
||||
<key>FilterItemsMaxTimePerFrameVisible</key>
|
||||
<map>
|
||||
|
|
@ -8707,7 +8707,7 @@
|
|||
<key>RenderDepthOfField</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether to use depth of field effect when lighting and shadows are enabled</string>
|
||||
<string>Whether to use depth of field effect when Advanced Lighting Model is enabled</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -10002,7 +10002,18 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RevokePermsOnStopAnimation</key>
|
||||
<key>ReportBugURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>URL used for filing bugs from viewer</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>https://jira.secondlife.com/secure/CreateIssueDetails!init.jspa?pid=10610&issuetype=1&environment=[ENVIRONMENT]&customfield_10253=[LOCATION]</string>
|
||||
</map>
|
||||
<key>RevokePermsOnStopAnimation</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Clear animation permssions when choosing "Stop Animating Me"</string>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* @file benchmarkF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, 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$
|
||||
*/
|
||||
|
||||
#ifdef DEFINE_GL_FRAGCOLOR
|
||||
out vec4 frag_color;
|
||||
#else
|
||||
#define frag_color gl_FragColor
|
||||
#endif
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
VARYING vec2 tc0;
|
||||
|
||||
void main()
|
||||
{
|
||||
frag_color = texture2D(diffuseMap, tc0);
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* @file benchmarkV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, 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$
|
||||
*/
|
||||
|
||||
uniform mat4 modelview_projection_matrix;
|
||||
|
||||
ATTRIBUTE vec3 position;
|
||||
|
||||
VARYING vec2 tc0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(position, 1.0);
|
||||
|
||||
tc0 = (position.xy*0.5+0.5);
|
||||
}
|
||||
|
||||
|
|
@ -31,12 +31,13 @@ out vec4 frag_color;
|
|||
|
||||
uniform sampler2D tex0;
|
||||
|
||||
VARYING vec4 vertex_color;
|
||||
uniform vec4 color;
|
||||
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float alpha = texture2D(tex0, vary_texcoord0.xy).a * vertex_color.a;
|
||||
float alpha = texture2D(tex0, vary_texcoord0.xy).a * color.a;
|
||||
|
||||
frag_color = vec4(vertex_color.rgb, alpha);
|
||||
frag_color = vec4(color.rgb, alpha);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,16 +26,13 @@
|
|||
uniform mat4 modelview_projection_matrix;
|
||||
|
||||
ATTRIBUTE vec3 position;
|
||||
ATTRIBUTE vec4 diffuse_color;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
|
||||
VARYING vec4 vertex_color;
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
|
||||
vertex_color = diffuse_color;
|
||||
vary_texcoord0 = texcoord0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version 35
|
||||
version 36
|
||||
// The version number above should be implemented IF AND ONLY IF some
|
||||
// change has been made that is sufficiently important to justify
|
||||
// resetting the graphics preferences of all users to the recommended
|
||||
|
|
@ -628,3 +628,6 @@ Disregard128DefaultDrawDistance 1 0
|
|||
list NVIDIA_GeForce_Go_7400
|
||||
Disregard128DefaultDrawDistance 1 0
|
||||
|
||||
list OSX_10_6_8
|
||||
RenderDeferred 0 0
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) applicationWillFinishLaunching:(NSNotification *)notification
|
||||
{
|
||||
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||
}
|
||||
|
||||
- (void) applicationDidFinishLaunching:(NSNotification *)notification
|
||||
{
|
||||
frameTimer = nil;
|
||||
|
|
@ -55,7 +60,7 @@
|
|||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil];
|
||||
|
||||
[[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||
// [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL];
|
||||
}
|
||||
|
||||
- (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llagentlanguage.h"
|
||||
#include "llagentui.h"
|
||||
#include "llagentwearables.h"
|
||||
#include "llfloaterimcontainer.h"
|
||||
#include "llwindow.h"
|
||||
|
|
@ -60,6 +61,7 @@
|
|||
#include "llcurl.h"
|
||||
#include "llcalc.h"
|
||||
#include "llconversationlog.h"
|
||||
#include "lldxhardware.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "lltexturestats.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
|
@ -75,10 +77,10 @@
|
|||
#include "lluicolortable.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llurlhistory.h"
|
||||
//#include "llfirstuse.h"
|
||||
#include "llrender.h"
|
||||
#include "llteleporthistory.h"
|
||||
#include "lltoast.h"
|
||||
#include "llsdutil_math.h"
|
||||
#include "lllocationhistory.h"
|
||||
#include "llfasttimerview.h"
|
||||
#include "llvector4a.h"
|
||||
|
|
@ -755,7 +757,7 @@ bool LLAppViewer::init()
|
|||
initLoggingAndGetLastDuration();
|
||||
|
||||
processMarkerFiles();
|
||||
|
||||
|
||||
//
|
||||
// OK to write stuff to logs now, we've now crash reported if necessary
|
||||
//
|
||||
|
|
@ -1230,8 +1232,8 @@ void LLAppViewer::checkMemory()
|
|||
}
|
||||
mMemCheckTimer.reset() ;
|
||||
|
||||
//update the availability of memory
|
||||
LLMemory::updateMemoryInfo() ;
|
||||
//update the availability of memory
|
||||
LLMemory::updateMemoryInfo() ;
|
||||
|
||||
bool is_low = LLMemory::isMemoryPoolLow() ;
|
||||
|
||||
|
|
@ -1761,7 +1763,7 @@ bool LLAppViewer::cleanup()
|
|||
gAudiop->setStreamingAudioImpl(NULL);
|
||||
|
||||
// shut down the audio subsystem
|
||||
gAudiop->shutdown();
|
||||
gAudiop->shutdown();
|
||||
|
||||
delete gAudiop;
|
||||
gAudiop = NULL;
|
||||
|
|
@ -2574,9 +2576,9 @@ bool LLAppViewer::initConfiguration()
|
|||
{
|
||||
llwarns << "Failed --set " << name << ": setting name unknown." << llendl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (clp.hasOption("logevents")) {
|
||||
LLViewerEventRecorder::instance().setEventLoggingOn();
|
||||
|
|
@ -2584,7 +2586,7 @@ bool LLAppViewer::initConfiguration()
|
|||
|
||||
std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel"));
|
||||
if(! CmdLineChannel.empty())
|
||||
{
|
||||
{
|
||||
LLVersionInfo::resetChannel(CmdLineChannel);
|
||||
}
|
||||
|
||||
|
|
@ -2596,16 +2598,16 @@ bool LLAppViewer::initConfiguration()
|
|||
LLFastTimer::sLog = TRUE;
|
||||
LLFastTimer::sLogName = std::string("performance");
|
||||
}
|
||||
|
||||
|
||||
std::string test_name(gSavedSettings.getString("LogMetrics"));
|
||||
if (! test_name.empty())
|
||||
{
|
||||
{
|
||||
LLFastTimer::sMetricLog = TRUE ;
|
||||
// '--logmetrics' is specified with a named test metric argument so the data gathering is done only on that test
|
||||
// In the absence of argument, every metric would be gathered (makes for a rather slow run and hard to decipher report...)
|
||||
llinfos << "'--logmetrics' argument : " << test_name << llendl;
|
||||
LLFastTimer::sLogName = test_name;
|
||||
}
|
||||
}
|
||||
|
||||
if (clp.hasOption("graphicslevel"))
|
||||
{
|
||||
|
|
@ -2614,14 +2616,14 @@ bool LLAppViewer::initConfiguration()
|
|||
// that value for validity.
|
||||
U32 graphicslevel = gSavedSettings.getU32("RenderQualityPerformance");
|
||||
if (LLFeatureManager::instance().isValidGraphicsLevel(graphicslevel))
|
||||
{
|
||||
{
|
||||
// graphicslevel is valid: save it and engage it later. Capture
|
||||
// the requested value separately from the settings variable
|
||||
// because, if this is the first run, LLViewerWindow's constructor
|
||||
// will call LLFeatureManager::applyRecommendedSettings(), which
|
||||
// overwrites this settings variable!
|
||||
mForceGraphicsLevel = graphicslevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLFastTimerView::sAnalyzePerformance = gSavedSettings.getBOOL("AnalyzePerformance");
|
||||
|
|
@ -2655,14 +2657,14 @@ bool LLAppViewer::initConfiguration()
|
|||
LLSLURL start_slurl;
|
||||
std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation"));
|
||||
if(! CmdLineLoginLocation.empty())
|
||||
{
|
||||
{
|
||||
start_slurl = CmdLineLoginLocation;
|
||||
LLStartUp::setStartSLURL(start_slurl);
|
||||
if(start_slurl.getType() == LLSLURL::LOCATION)
|
||||
{
|
||||
{
|
||||
LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//RN: if we received a URL, hand it off to the existing instance.
|
||||
// don't call anotherInstanceRunning() when doing URL handoff, as
|
||||
|
|
@ -2673,11 +2675,11 @@ bool LLAppViewer::initConfiguration()
|
|||
(gSavedSettings.getBOOL("SLURLPassToOtherInstance")))
|
||||
{
|
||||
if (sendURLToOtherInstance(start_slurl.getSLURLString()))
|
||||
{
|
||||
{
|
||||
// successfully handed off URL to existing instance, exit
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
|
||||
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
|
||||
|
|
@ -2994,26 +2996,26 @@ namespace {
|
|||
{
|
||||
LL_WARNS("UpdaterService") << "no info url supplied - defaulting to hard coded release notes pattern" << LL_ENDL;
|
||||
|
||||
// truncate version at the rightmost '.'
|
||||
std::string version_short(data["version"]);
|
||||
size_t short_length = version_short.rfind('.');
|
||||
if (short_length != std::string::npos)
|
||||
{
|
||||
version_short.resize(short_length);
|
||||
}
|
||||
// truncate version at the rightmost '.'
|
||||
std::string version_short(data["version"]);
|
||||
size_t short_length = version_short.rfind('.');
|
||||
if (short_length != std::string::npos)
|
||||
{
|
||||
version_short.resize(short_length);
|
||||
}
|
||||
|
||||
LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
|
||||
relnotes_url.setArg("[VERSION_SHORT]", version_short);
|
||||
LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
|
||||
relnotes_url.setArg("[VERSION_SHORT]", version_short);
|
||||
|
||||
// *TODO thread the update service's response through to this point
|
||||
std::string const & channel = LLVersionInfo::getChannel();
|
||||
boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
|
||||
// *TODO thread the update service's response through to this point
|
||||
std::string const & channel = LLVersionInfo::getChannel();
|
||||
boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
|
||||
|
||||
relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
|
||||
relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
|
||||
relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
|
||||
relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
|
||||
substitutions["INFO_URL"] = relnotes_url.getString();
|
||||
}
|
||||
|
||||
|
||||
LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback);
|
||||
}
|
||||
|
||||
|
|
@ -3202,7 +3204,7 @@ bool LLAppViewer::initWindow()
|
|||
LLFeatureManager::getInstance()->setGraphicsLevel(*mForceGraphicsLevel, false);
|
||||
gSavedSettings.setU32("RenderQualityPerformance", *mForceGraphicsLevel);
|
||||
}
|
||||
|
||||
|
||||
// Set this flag in case we crash while initializing GL
|
||||
gSavedSettings.setBOOL("RenderInitError", TRUE);
|
||||
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
|
||||
|
|
@ -3261,6 +3263,183 @@ void LLAppViewer::writeDebugInfo()
|
|||
out_file.close();
|
||||
}
|
||||
|
||||
LLSD LLAppViewer::getViewerInfo() const
|
||||
{
|
||||
// The point of having one method build an LLSD info block and the other
|
||||
// construct the user-visible About string is to ensure that the same info
|
||||
// is available to a getInfo() caller as to the user opening
|
||||
// LLFloaterAbout.
|
||||
LLSD info;
|
||||
LLSD version;
|
||||
version.append(LLVersionInfo::getMajor());
|
||||
version.append(LLVersionInfo::getMinor());
|
||||
version.append(LLVersionInfo::getPatch());
|
||||
version.append(LLVersionInfo::getBuild());
|
||||
info["VIEWER_VERSION"] = version;
|
||||
info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion();
|
||||
info["BUILD_DATE"] = __DATE__;
|
||||
info["BUILD_TIME"] = __TIME__;
|
||||
info["CHANNEL"] = LLVersionInfo::getChannel();
|
||||
|
||||
// return a URL to the release notes for this viewer, such as:
|
||||
// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456
|
||||
std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
|
||||
if (! LLStringUtil::endsWith(url, "/"))
|
||||
url += "/";
|
||||
url += LLURI::escape(LLVersionInfo::getChannel()) + "/";
|
||||
url += LLURI::escape(LLVersionInfo::getVersion());
|
||||
|
||||
info["VIEWER_RELEASE_NOTES_URL"] = url;
|
||||
|
||||
#if LL_MSVC
|
||||
info["COMPILER"] = "MSVC";
|
||||
info["COMPILER_VERSION"] = _MSC_VER;
|
||||
#elif LL_GNUC
|
||||
info["COMPILER"] = "GCC";
|
||||
info["COMPILER_VERSION"] = GCC_VERSION;
|
||||
#endif
|
||||
|
||||
// Position
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (region)
|
||||
{
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
info["POSITION"] = ll_sd_from_vector3d(pos);
|
||||
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
|
||||
info["REGION"] = gAgent.getRegion()->getName();
|
||||
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
|
||||
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
|
||||
info["SERVER_VERSION"] = gLastVersionChannel;
|
||||
LLSLURL slurl;
|
||||
LLAgentUI::buildSLURL(slurl);
|
||||
info["SLURL"] = slurl.getSLURLString();
|
||||
}
|
||||
|
||||
// CPU
|
||||
info["CPU"] = gSysCPU.getCPUString();
|
||||
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024);
|
||||
// Moved hack adjustment to Windows memory size into llsys.cpp
|
||||
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
|
||||
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
|
||||
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
|
||||
|
||||
#if LL_WINDOWS
|
||||
LLSD driver_info = gDXHardware.getDisplayInfo();
|
||||
if (driver_info.has("DriverVersion"))
|
||||
{
|
||||
info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
|
||||
}
|
||||
#endif
|
||||
|
||||
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
|
||||
info["LIBCURL_VERSION"] = LLCurl::getVersionString();
|
||||
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
|
||||
bool want_fullname = true;
|
||||
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
|
||||
if(LLVoiceClient::getInstance()->voiceEnabled())
|
||||
{
|
||||
LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion();
|
||||
std::ostringstream version_string;
|
||||
version_string << version.serverType << " " << version.serverVersion << std::endl;
|
||||
info["VOICE_VERSION"] = version_string.str();
|
||||
}
|
||||
else
|
||||
{
|
||||
info["VOICE_VERSION"] = LLTrans::getString("NotConnected");
|
||||
}
|
||||
|
||||
// TODO: Implement media plugin version query
|
||||
info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)";
|
||||
|
||||
if (gPacketsIn > 0)
|
||||
{
|
||||
info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
|
||||
info["PACKETS_IN"] = F32(gPacketsIn);
|
||||
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
|
||||
}
|
||||
|
||||
if (mServerReleaseNotesURL.empty())
|
||||
{
|
||||
if (gAgent.getRegion())
|
||||
{
|
||||
info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("RetrievingData");
|
||||
}
|
||||
}
|
||||
else if (LLStringUtil::startsWith(mServerReleaseNotesURL, "http")) // it's an URL
|
||||
{
|
||||
info["SERVER_RELEASE_NOTES_URL"] = "[" + LLWeb::escapeURL(mServerReleaseNotesURL) + " " + LLTrans::getString("ReleaseNotes") + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
info["SERVER_RELEASE_NOTES_URL"] = mServerReleaseNotesURL;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
std::string LLAppViewer::getViewerInfoString() const
|
||||
{
|
||||
std::ostringstream support;
|
||||
|
||||
LLSD info(getViewerInfo());
|
||||
|
||||
// Render the LLSD from getInfo() as a format_map_t
|
||||
LLStringUtil::format_map_t args;
|
||||
|
||||
// allow the "Release Notes" URL label to be localized
|
||||
args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
|
||||
|
||||
for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
|
||||
ii != iend; ++ii)
|
||||
{
|
||||
if (! ii->second.isArray())
|
||||
{
|
||||
// Scalar value
|
||||
if (ii->second.isUndefined())
|
||||
{
|
||||
args[ii->first] = LLTrans::getString("none_text");
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't forget to render value asString()
|
||||
args[ii->first] = ii->second.asString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// array value: build KEY_0, KEY_1 etc. entries
|
||||
for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n)
|
||||
{
|
||||
args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now build the various pieces
|
||||
support << LLTrans::getString("AboutHeader", args);
|
||||
if (info.has("REGION"))
|
||||
{
|
||||
support << "\n\n" << LLTrans::getString("AboutPosition", args);
|
||||
}
|
||||
support << "\n\n" << LLTrans::getString("AboutSystem", args);
|
||||
support << "\n";
|
||||
if (info.has("GRAPHICS_DRIVER_VERSION"))
|
||||
{
|
||||
support << "\n" << LLTrans::getString("AboutDriver", args);
|
||||
}
|
||||
support << "\n" << LLTrans::getString("AboutLibs", args);
|
||||
if (info.has("COMPILER"))
|
||||
{
|
||||
support << "\n" << LLTrans::getString("AboutCompiler", args);
|
||||
}
|
||||
if (info.has("PACKETS_IN"))
|
||||
{
|
||||
support << '\n' << LLTrans::getString("AboutTraffic", args);
|
||||
}
|
||||
return support.str();
|
||||
}
|
||||
|
||||
|
||||
void LLAppViewer::cleanupSavedSettings()
|
||||
{
|
||||
gSavedSettings.setBOOL("MouseSun", FALSE);
|
||||
|
|
@ -3485,9 +3664,9 @@ void LLAppViewer::handleViewerCrash()
|
|||
if (gDirUtilp)
|
||||
{
|
||||
std::string crash_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
|
||||
gLLErrorActivated
|
||||
? LLERROR_MARKER_FILE_NAME
|
||||
: ERROR_MARKER_FILE_NAME);
|
||||
gLLErrorActivated
|
||||
? LLERROR_MARKER_FILE_NAME
|
||||
: ERROR_MARKER_FILE_NAME);
|
||||
LLAPRFile crash_marker_file ;
|
||||
crash_marker_file.open(crash_marker_file_name, LL_APR_WB);
|
||||
if (crash_marker_file.getFileHandle())
|
||||
|
|
@ -3498,7 +3677,7 @@ void LLAppViewer::handleViewerCrash()
|
|||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_marker_file_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3637,7 +3816,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
}
|
||||
|
||||
if (mSecondInstance)
|
||||
{
|
||||
{
|
||||
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' owned by another instance" << LL_ENDL;
|
||||
}
|
||||
else if (marker_is_same_version)
|
||||
|
|
@ -3651,7 +3830,7 @@ void LLAppViewer::processMarkerFiles()
|
|||
{
|
||||
LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found, but versions did not match" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else // marker did not exist... last exec (if any) did not freeze
|
||||
{
|
||||
// Create the marker file for this execution & lock it; it will be deleted on a clean exit
|
||||
|
|
@ -3705,12 +3884,12 @@ void LLAppViewer::processMarkerFiles()
|
|||
{
|
||||
gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
|
||||
LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
|
||||
LL_INFOS("MarkerFile") << "LLError marker '"<< llerror_marker_file << "' crashed, setting LastExecEvent to LLERROR_CRASH" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3723,20 +3902,20 @@ void LLAppViewer::processMarkerFiles()
|
|||
if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB))
|
||||
{
|
||||
if (markerIsSameVersion(error_marker_file))
|
||||
{
|
||||
{
|
||||
if (gLastExecEvent == LAST_EXEC_LOGOUT_FROZE)
|
||||
{
|
||||
{
|
||||
gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
|
||||
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to LOGOUT_CRASH" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
|
||||
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gLastExecEvent = LAST_EXEC_OTHER_CRASH;
|
||||
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("MarkerFile") << "Error marker '"<< error_marker_file << "' marker found, but versions did not match" << LL_ENDL;
|
||||
}
|
||||
LLAPRFile::remove(error_marker_file);
|
||||
|
|
@ -3748,29 +3927,29 @@ void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
|
|||
if (!mSecondInstance)
|
||||
{
|
||||
LL_DEBUGS("MarkerFile") << (leave_logout_marker?"leave":"remove") <<" logout" << LL_ENDL;
|
||||
if (mMarkerFile.getFileHandle())
|
||||
{
|
||||
if (mMarkerFile.getFileHandle())
|
||||
{
|
||||
LL_DEBUGS("MarkerFile") << "removing exec marker '"<<mMarkerFileName<<"'"<< LL_ENDL;
|
||||
mMarkerFile.close() ;
|
||||
LLAPRFile::remove( mMarkerFileName );
|
||||
LLAPRFile::remove( mMarkerFileName );
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
|
||||
}
|
||||
if (!leave_logout_marker)
|
||||
{
|
||||
if (mLogoutMarkerFile.getFileHandle())
|
||||
{
|
||||
LL_DEBUGS("MarkerFile") << "removing logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
|
||||
mLogoutMarkerFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "marker '"<<mMarkerFileName<<"' not open"<< LL_ENDL;
|
||||
}
|
||||
if (!leave_logout_marker)
|
||||
{
|
||||
if (mLogoutMarkerFile.getFileHandle())
|
||||
{
|
||||
LL_DEBUGS("MarkerFile") << "removing logout marker '"<<mLogoutMarkerFileName<<"'"<< LL_ENDL;
|
||||
mLogoutMarkerFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("MarkerFile") << "logout marker '"<<mLogoutMarkerFileName<<"' not open"<< LL_ENDL;
|
||||
}
|
||||
LLAPRFile::remove( mLogoutMarkerFileName );
|
||||
}
|
||||
LLAPRFile::remove( mLogoutMarkerFileName );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4713,7 +4892,7 @@ void LLAppViewer::idle()
|
|||
|
||||
if (!(logoutRequestSent() && hasSavedFinalSnapshot()))
|
||||
{
|
||||
gObjectList.update(gAgent, *LLWorld::getInstance());
|
||||
gObjectList.update(gAgent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5402,7 +5581,7 @@ void LLAppViewer::handleLoginComplete()
|
|||
|
||||
void LLAppViewer::launchUpdater()
|
||||
{
|
||||
LLSD query_map = LLSD::emptyMap();
|
||||
LLSD query_map = LLSD::emptyMap();
|
||||
query_map["os"] = gPlatform;
|
||||
|
||||
// *TODO change userserver to be grid on both viewer and sim, since
|
||||
|
|
@ -5599,7 +5778,7 @@ void LLAppViewer::metricsSend(bool enable_reporting)
|
|||
// Make a copy of the main stats to send into another thread.
|
||||
// Receiving thread takes ownership.
|
||||
LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStatsMain));
|
||||
|
||||
|
||||
// Send a report request into 'thread1' to get the rest of the data
|
||||
// and provide some additional parameters while here.
|
||||
LLAppViewer::sTextureFetch->commandSendMetrics(caps_url,
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@ public:
|
|||
|
||||
const LLOSInfo& getOSInfo() const { return mSysOSInfo; }
|
||||
|
||||
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
|
||||
LLSD getViewerInfo() const;
|
||||
std::string getViewerInfoString() const;
|
||||
|
||||
// Report true if under the control of a debugger. A null-op default.
|
||||
virtual bool beingDebugged() { return false; }
|
||||
|
||||
|
|
@ -246,6 +250,8 @@ private:
|
|||
LLOSInfo mSysOSInfo;
|
||||
bool mReportedCrash;
|
||||
|
||||
std::string mServerReleaseNotesURL;
|
||||
|
||||
// Thread objects.
|
||||
static LLTextureCache* sTextureCache;
|
||||
static LLImageDecodeThread* sImageDecodeThread;
|
||||
|
|
|
|||
|
|
@ -200,14 +200,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
|
|||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
#ifdef INCLUDE_VLD
|
||||
// only works for debug builds (hard coded into vld.h)
|
||||
#ifdef _DEBUG
|
||||
// start with Visual Leak Detector turned off
|
||||
VLDGlobalDisable();
|
||||
#endif // _DEBUG
|
||||
#endif // INCLUDE_VLD
|
||||
|
||||
const S32 MAX_HEAPS = 255;
|
||||
DWORD heap_enable_lfh_error[MAX_HEAPS];
|
||||
S32 num_heaps = 0;
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
|
|||
{
|
||||
llinfos << "LRI: Sending avatar render info for " << avatar->getID()
|
||||
<< ": " << info << llendl;
|
||||
llinfos << "LRI: geometry " << avatar->getAttachmentGeometryBytes()
|
||||
llinfos << "LRI: other info geometry " << avatar->getAttachmentGeometryBytes()
|
||||
<< ", area " << avatar->getAttachmentSurfaceArea()
|
||||
<< llendl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,9 @@ LLAvatarTracker::~LLAvatarTracker()
|
|||
{
|
||||
deleteTrackingData();
|
||||
std::for_each(mObservers.begin(), mObservers.end(), DeletePointer());
|
||||
mObservers.clear();
|
||||
std::for_each(mBuddyInfo.begin(), mBuddyInfo.end(), DeletePairedPointer());
|
||||
mBuddyInfo.clear();
|
||||
}
|
||||
|
||||
void LLAvatarTracker::track(const LLUUID& avatar_id, const std::string& name)
|
||||
|
|
|
|||
|
|
@ -113,29 +113,33 @@ void LLChannelManager::onLoginCompleted()
|
|||
}
|
||||
else
|
||||
{
|
||||
// create a channel for the StartUp Toast
|
||||
LLScreenChannelBase::Params p;
|
||||
p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
|
||||
p.channel_align = CA_RIGHT;
|
||||
mStartUpChannel = createChannel(p);
|
||||
// TODO: Seems this code leads to MAINT-3536 new crash in XML_ParserFree.
|
||||
// Need to investigate this and fix possible problems with notifications in startup time
|
||||
// Viewer can normally receive and show of postponed notifications about purchasing in marketplace on startup time.
|
||||
// Other types of postponed notifications did not tested.
|
||||
//// create a channel for the StartUp Toast
|
||||
//LLScreenChannelBase::Params p;
|
||||
//p.id = LLUUID(gSavedSettings.getString("StartUpChannelUUID"));
|
||||
//p.channel_align = CA_RIGHT;
|
||||
//mStartUpChannel = createChannel(p);
|
||||
|
||||
if(!mStartUpChannel)
|
||||
{
|
||||
onStartUpToastClose();
|
||||
}
|
||||
else
|
||||
{
|
||||
gViewerWindow->getRootView()->addChild(mStartUpChannel);
|
||||
//if(!mStartUpChannel)
|
||||
//{
|
||||
// onStartUpToastClose();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// gViewerWindow->getRootView()->addChild(mStartUpChannel);
|
||||
|
||||
// init channel's position and size
|
||||
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
|
||||
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
|
||||
mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
|
||||
mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
|
||||
// // init channel's position and size
|
||||
// S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
|
||||
// S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
|
||||
// mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
|
||||
// mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
|
||||
|
||||
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
|
||||
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
|
||||
}
|
||||
// mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
|
||||
// mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
|
||||
//}
|
||||
}
|
||||
|
||||
LLPersistentNotificationStorage::getInstance()->loadNotifications();
|
||||
|
|
|
|||
|
|
@ -187,6 +187,10 @@ public:
|
|||
{
|
||||
LLAvatarActions::offerTeleport(getAvatarId());
|
||||
}
|
||||
else if (level == "request_teleport")
|
||||
{
|
||||
LLAvatarActions::teleportRequest(getAvatarId());
|
||||
}
|
||||
else if (level == "voice_call")
|
||||
{
|
||||
LLAvatarActions::startCall(getAvatarId());
|
||||
|
|
@ -547,7 +551,9 @@ protected:
|
|||
menu->setItemEnabled("Send IM", false);
|
||||
menu->setItemEnabled("Remove Friend", false);
|
||||
menu->setItemEnabled("Offer Teleport",false);
|
||||
menu->setItemEnabled("Request Teleport",false);
|
||||
menu->setItemEnabled("Voice Call", false);
|
||||
menu->setItemEnabled("Chat History", false);
|
||||
menu->setItemEnabled("Invite Group", false);
|
||||
menu->setItemEnabled("Zoom In", false);
|
||||
menu->setItemEnabled("Share", false);
|
||||
|
|
@ -563,6 +569,7 @@ protected:
|
|||
menu->setItemVisible("Send IM", false);
|
||||
}
|
||||
menu->setItemEnabled("Offer Teleport", LLAvatarActions::canOfferTeleport(mAvatarID));
|
||||
menu->setItemEnabled("Request Teleport", LLAvatarActions::canOfferTeleport(mAvatarID));
|
||||
menu->setItemEnabled("Voice Call", LLAvatarActions::canCall());
|
||||
|
||||
// We should only show 'Zoom in' item in a nearby chat
|
||||
|
|
@ -570,9 +577,9 @@ protected:
|
|||
menu->setItemVisible("Zoom In", should_show_zoom && gObjectList.findObject(mAvatarID));
|
||||
menu->setItemEnabled("Block Unblock", LLAvatarActions::canBlock(mAvatarID));
|
||||
menu->setItemEnabled("Mute Text", LLAvatarActions::canBlock(mAvatarID));
|
||||
menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID));
|
||||
}
|
||||
|
||||
menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID));
|
||||
menu->setItemEnabled("Map", (LLAvatarTracker::instance().isBuddyOnline(mAvatarID) && is_agent_mappable(mAvatarID)) || gAgent.isGodlike() );
|
||||
menu->buildDrawLabels();
|
||||
menu->updateParent(LLMenuGL::sMenuContainer);
|
||||
|
|
@ -724,6 +731,7 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
|
|||
editor_params.follows.flags = FOLLOWS_ALL;
|
||||
editor_params.enabled = false; // read only
|
||||
editor_params.show_context_menu = "true";
|
||||
editor_params.trusted_content = false;
|
||||
mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);
|
||||
mEditor->setIsFriendCallback(LLAvatarActions::isFriend);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "llpaneloutfitedit.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLCOFWearables> t_cof_wearables("cof_wearables");
|
||||
static LLPanelInjector<LLCOFWearables> t_cof_wearables("cof_wearables");
|
||||
|
||||
const LLSD REARRANGE = LLSD().with("rearrange", LLSD());
|
||||
|
||||
|
|
|
|||
|
|
@ -267,7 +267,6 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
//This node (conversation) was selected and a child (participant) was not
|
||||
if(result && getRoot())
|
||||
{
|
||||
|
||||
if(getRoot()->getCurSelectedItem() == this)
|
||||
{
|
||||
LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
|
||||
|
|
@ -282,7 +281,6 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
im_container->collapseMessagesPane(false);
|
||||
}
|
||||
|
||||
}
|
||||
selectConversationItem();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@
|
|||
#include "llviewershadermgr.h"
|
||||
#include "llrender.h"
|
||||
|
||||
#define GE_FORCE_WORKAROUND LL_DARWIN
|
||||
|
||||
static LLGLSLShader* simple_shader = NULL;
|
||||
static LLGLSLShader* fullbright_shader = NULL;
|
||||
|
||||
|
|
@ -660,14 +658,6 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass)
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Work-around until we can figure out why the right shader causes
|
||||
// the GeForce driver to go tango uniform on OS X 10.6.8 only
|
||||
//
|
||||
#if GE_FORCE_WORKAROUND
|
||||
gObjectFullbrightAlphaMaskProgram.bind();
|
||||
gObjectFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f);
|
||||
#else
|
||||
if (LLPipeline::sUnderWaterRender)
|
||||
{
|
||||
gDeferredFullbrightAlphaMaskWaterProgram.bind();
|
||||
|
|
@ -678,9 +668,7 @@ void LLDrawPoolFullbrightAlphaMask::beginPostDeferredPass(S32 pass)
|
|||
gDeferredFullbrightAlphaMaskProgram.bind();
|
||||
gDeferredFullbrightAlphaMaskProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLDrawPoolFullbrightAlphaMask::renderPostDeferred(S32 pass)
|
||||
|
|
@ -699,13 +687,6 @@ void LLDrawPoolFullbrightAlphaMask::endPostDeferredPass(S32 pass)
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Work-around until we can figure out why the right shader causes
|
||||
// the GeForce driver to go tango uniform on OS X 10.6.8 only
|
||||
//
|
||||
#if GE_FORCE_WORKAROUND
|
||||
gObjectFullbrightAlphaMaskProgram.unbind();
|
||||
#else
|
||||
if (LLPipeline::sUnderWaterRender)
|
||||
{
|
||||
gDeferredFullbrightAlphaMaskWaterProgram.unbind();
|
||||
|
|
@ -714,8 +695,6 @@ void LLDrawPoolFullbrightAlphaMask::endPostDeferredPass(S32 pass)
|
|||
{
|
||||
gDeferredFullbrightAlphaMaskProgram.unbind();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
LLRenderPass::endRenderPass(pass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -925,6 +925,14 @@ void LLFeatureManager::applyBaseMasks()
|
|||
maskFeatures("VRAMGT512");
|
||||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo();
|
||||
if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7)
|
||||
{
|
||||
maskFeatures("OSX_10_6_8");
|
||||
}
|
||||
#endif
|
||||
|
||||
// now mask by gpu string
|
||||
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces
|
||||
std::string gpustr = mGPUString;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@
|
|||
extern LLMemoryInfo gSysMemory;
|
||||
extern U32 gPacketsIn;
|
||||
|
||||
static std::string get_viewer_release_notes_url();
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLServerReleaseNotesURLFetcher
|
||||
///----------------------------------------------------------------------------
|
||||
|
|
@ -108,8 +106,6 @@ public:
|
|||
static LLSD getInfo();
|
||||
void onClickCopyToClipboard();
|
||||
|
||||
void updateServerReleaseNotesURL(const std::string& url);
|
||||
|
||||
private:
|
||||
void setSupportText(const std::string& server_release_notes_url);
|
||||
};
|
||||
|
|
@ -219,107 +215,9 @@ BOOL LLFloaterAbout::postBuild()
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// static
|
||||
LLSD LLFloaterAbout::getInfo()
|
||||
{
|
||||
// The point of having one method build an LLSD info block and the other
|
||||
// construct the user-visible About string is to ensure that the same info
|
||||
// is available to a getInfo() caller as to the user opening
|
||||
// LLFloaterAbout.
|
||||
LLSD info;
|
||||
LLSD version;
|
||||
version.append(LLVersionInfo::getMajor());
|
||||
version.append(LLVersionInfo::getMinor());
|
||||
version.append(LLVersionInfo::getPatch());
|
||||
version.append(LLVersionInfo::getBuild());
|
||||
info["VIEWER_VERSION"] = version;
|
||||
info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion();
|
||||
info["BUILD_DATE"] = __DATE__;
|
||||
info["BUILD_TIME"] = __TIME__;
|
||||
info["CHANNEL"] = LLVersionInfo::getChannel();
|
||||
|
||||
info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url();
|
||||
|
||||
#if LL_MSVC
|
||||
info["COMPILER"] = "MSVC";
|
||||
info["COMPILER_VERSION"] = _MSC_VER;
|
||||
#elif LL_GNUC
|
||||
info["COMPILER"] = "GCC";
|
||||
info["COMPILER_VERSION"] = GCC_VERSION;
|
||||
#endif
|
||||
|
||||
// Position
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
if (region)
|
||||
{
|
||||
LLVector3d pos = gAgent.getPositionGlobal();
|
||||
info["POSITION"] = ll_sd_from_vector3d(pos);
|
||||
info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
|
||||
info["REGION"] = gAgent.getRegion()->getName();
|
||||
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
|
||||
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
|
||||
info["SERVER_VERSION"] = gLastVersionChannel;
|
||||
LLSLURL slurl;
|
||||
LLAgentUI::buildSLURL(slurl);
|
||||
info["SLURL"] = slurl.getSLURLString();
|
||||
}
|
||||
|
||||
// CPU
|
||||
info["CPU"] = gSysCPU.getCPUString();
|
||||
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024);
|
||||
// Moved hack adjustment to Windows memory size into llsys.cpp
|
||||
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
|
||||
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
|
||||
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
|
||||
|
||||
#if LL_WINDOWS
|
||||
LLSD driver_info = gDXHardware.getDisplayInfo();
|
||||
if (driver_info.has("DriverVersion"))
|
||||
{
|
||||
info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
|
||||
}
|
||||
#endif
|
||||
|
||||
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
|
||||
info["LIBCURL_VERSION"] = LLCurl::getVersionString();
|
||||
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
|
||||
bool want_fullname = true;
|
||||
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
|
||||
if(LLVoiceClient::getInstance()->voiceEnabled())
|
||||
{
|
||||
LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion();
|
||||
std::ostringstream version_string;
|
||||
version_string << version.serverType << " " << version.serverVersion << std::endl;
|
||||
info["VOICE_VERSION"] = version_string.str();
|
||||
}
|
||||
else
|
||||
{
|
||||
info["VOICE_VERSION"] = LLTrans::getString("NotConnected");
|
||||
}
|
||||
|
||||
// TODO: Implement media plugin version query
|
||||
info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)";
|
||||
|
||||
if (gPacketsIn > 0)
|
||||
{
|
||||
info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
|
||||
info["PACKETS_IN"] = F32(gPacketsIn);
|
||||
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static std::string get_viewer_release_notes_url()
|
||||
{
|
||||
// return a URL to the release notes for this viewer, such as:
|
||||
// http://wiki.secondlife.com/wiki/Release_Notes/Second Life Beta Viewer/2.1.0.123456
|
||||
std::string url = LLTrans::getString("RELEASE_NOTES_BASE_URL");
|
||||
if (! LLStringUtil::endsWith(url, "/"))
|
||||
url += "/";
|
||||
url += LLVersionInfo::getChannel() + "/";
|
||||
url += LLVersionInfo::getVersion();
|
||||
return LLWeb::escapeURL(url);
|
||||
return LLAppViewer::instance()->getViewerInfo();
|
||||
}
|
||||
|
||||
class LLFloaterAboutListener: public LLEventAPI
|
||||
|
|
@ -356,93 +254,22 @@ void LLFloaterAbout::onClickCopyToClipboard()
|
|||
support_widget->deselect();
|
||||
}
|
||||
|
||||
void LLFloaterAbout::updateServerReleaseNotesURL(const std::string& url)
|
||||
{
|
||||
setSupportText(url);
|
||||
}
|
||||
|
||||
void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url)
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
getWindow()->incBusyCount();
|
||||
getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
#endif
|
||||
LLSD info(getInfo());
|
||||
#if LL_WINDOWS
|
||||
getWindow()->decBusyCount();
|
||||
getWindow()->setCursor(UI_CURSOR_ARROW);
|
||||
#endif
|
||||
|
||||
if (LLStringUtil::startsWith(server_release_notes_url, "http")) // it's an URL
|
||||
{
|
||||
info["SERVER_RELEASE_NOTES_URL"] = "[" + LLWeb::escapeURL(server_release_notes_url) + " " + LLTrans::getString("ReleaseNotes") + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
info["SERVER_RELEASE_NOTES_URL"] = server_release_notes_url;
|
||||
}
|
||||
|
||||
LLViewerTextEditor *support_widget =
|
||||
getChild<LLViewerTextEditor>("support_editor", true);
|
||||
|
||||
std::ostringstream support;
|
||||
|
||||
// Render the LLSD from getInfo() as a format_map_t
|
||||
LLStringUtil::format_map_t args;
|
||||
|
||||
// allow the "Release Notes" URL label to be localized
|
||||
args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
|
||||
|
||||
for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
|
||||
ii != iend; ++ii)
|
||||
{
|
||||
if (! ii->second.isArray())
|
||||
{
|
||||
// Scalar value
|
||||
if (ii->second.isUndefined())
|
||||
{
|
||||
args[ii->first] = getString("none");
|
||||
}
|
||||
else
|
||||
{
|
||||
// don't forget to render value asString()
|
||||
args[ii->first] = ii->second.asString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// array value: build KEY_0, KEY_1 etc. entries
|
||||
for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n)
|
||||
{
|
||||
args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now build the various pieces
|
||||
support << getString("AboutHeader", args);
|
||||
if (info.has("REGION"))
|
||||
{
|
||||
support << "\n\n" << getString("AboutPosition", args);
|
||||
}
|
||||
support << "\n\n" << getString("AboutSystem", args);
|
||||
support << "\n";
|
||||
if (info.has("GRAPHICS_DRIVER_VERSION"))
|
||||
{
|
||||
support << "\n" << getString("AboutDriver", args);
|
||||
}
|
||||
support << "\n" << getString("AboutLibs", args);
|
||||
if (info.has("COMPILER"))
|
||||
{
|
||||
support << "\n" << getString("AboutCompiler", args);
|
||||
}
|
||||
if (info.has("PACKETS_IN"))
|
||||
{
|
||||
support << '\n' << getString("AboutTraffic", args);
|
||||
}
|
||||
|
||||
support_widget->clear();
|
||||
support_widget->appendText(support.str(),
|
||||
support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(),
|
||||
FALSE,
|
||||
LLStyle::Params()
|
||||
.color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor")));
|
||||
|
|
@ -489,9 +316,9 @@ void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::stri
|
|||
std::string location = content["location"].asString();
|
||||
if (location.empty())
|
||||
{
|
||||
location = floater_about->getString("ErrorFetchingServerReleaseNotesURL");
|
||||
location = LLTrans::getString("ErrorFetchingServerReleaseNotesURL");
|
||||
}
|
||||
floater_about->updateServerReleaseNotesURL(location);
|
||||
LLAppViewer::instance()->setServerReleaseNotesURL(location);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,11 @@ BOOL LLFloaterBulkPermission::postBuild()
|
|||
mBulkChangeNextOwnerCopy = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
|
||||
mBulkChangeNextOwnerTransfer = gSavedSettings.getBOOL("BulkChangeNextOwnerTransfer");
|
||||
|
||||
// fix invalid permissions case (in case initial settings were generated by a viewer affected by MAINT-3339)
|
||||
if( !mBulkChangeNextOwnerTransfer && !mBulkChangeEveryoneCopy)
|
||||
{
|
||||
mBulkChangeNextOwnerTransfer = true;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ void LLPanelCameraItem::setValue(const LLSD& value)
|
|||
getChildView("selected_picture")->setVisible( value["selected"]);
|
||||
}
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel");
|
||||
static LLPanelInjector<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel");
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// LLPanelCameraZoom
|
||||
|
|
|
|||
|
|
@ -88,12 +88,10 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param
|
|||
LLFloaterIMContainer::~LLFloaterIMContainer()
|
||||
{
|
||||
mConversationsEventStream.stopListening("ConversationsRefresh");
|
||||
|
||||
gIdleCallbacks.deleteFunction(idle, this);
|
||||
|
||||
mNewMessageConnection.disconnect();
|
||||
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
|
||||
|
||||
|
||||
if (mMicroChangedSignal.connected())
|
||||
{
|
||||
mMicroChangedSignal.disconnect();
|
||||
|
|
|
|||
|
|
@ -825,6 +825,7 @@ void LLFloaterIMSessionTab::updateCallBtnState(bool callIsActive)
|
|||
void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
|
||||
{
|
||||
LLFloaterIMContainer* host_floater = dynamic_cast<LLFloaterIMContainer*>(self->getHost());
|
||||
bool should_be_expanded = false;
|
||||
if (host_floater)
|
||||
{
|
||||
// Hide the messages pane if a floater is hosted in the Conversations
|
||||
|
|
@ -835,7 +836,7 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
|
|||
if (!self->mIsP2PChat)
|
||||
{
|
||||
// The state must toggle the collapsed state of the panel
|
||||
bool should_be_expanded = self->mParticipantListPanel->isCollapsed();
|
||||
should_be_expanded = self->mParticipantListPanel->isCollapsed();
|
||||
|
||||
// Update the expand/collapse flag of the participant list panel and save it
|
||||
gSavedSettings.setBOOL("IMShowControlPanel", should_be_expanded);
|
||||
|
|
@ -847,6 +848,10 @@ void LLFloaterIMSessionTab::onSlide(LLFloaterIMSessionTab* self)
|
|||
}
|
||||
|
||||
self->assignResizeLimits();
|
||||
if (should_be_expanded)
|
||||
{
|
||||
self->forceReshape();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMSessionTab::onCollapseToLine(LLFloaterIMSessionTab* self)
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ LLFloaterPay::LLFloaterPay(const LLSD& key)
|
|||
LLFloaterPay::~LLFloaterPay()
|
||||
{
|
||||
std::for_each(mCallbackData.begin(), mCallbackData.end(), DeletePointer());
|
||||
mCallbackData.clear();
|
||||
// Name callbacks will be automatically disconnected since LLFloater is trackable
|
||||
|
||||
// In case this floater is currently waiting for a reply.
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
|
|||
|
||||
void handleNameTagOptionChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLAvatarNameCache::setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames"));
|
||||
LLVOAvatar::invalidateNameTags();
|
||||
}
|
||||
|
||||
|
|
@ -1822,7 +1823,7 @@ private:
|
|||
callback_t mCallback;
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference");
|
||||
static LLPanelInjector<LLPanelPreference> t_places("panel_preference");
|
||||
LLPanelPreference::LLPanelPreference()
|
||||
: LLPanel(),
|
||||
mBandWidthUpdater(NULL)
|
||||
|
|
@ -2062,8 +2063,8 @@ private:
|
|||
std::list<std::string> mAccountIndependentSettings;
|
||||
};
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
|
||||
static LLRegisterPanelClassWrapper<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
|
||||
static LLPanelInjector<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics");
|
||||
static LLPanelInjector<LLPanelPreferencePrivacy> t_pref_privacy("panel_preference_privacy");
|
||||
|
||||
BOOL LLPanelPreferenceGraphics::postBuild()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@
|
|||
#include "llviewercontrol.h"
|
||||
#include "llviewermedia.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel");
|
||||
static LLRegisterPanelClassWrapper<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel");
|
||||
static LLRegisterPanelClassWrapper<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel");
|
||||
static LLRegisterPanelClassWrapper<LLSocialAccountPanel> t_panel_account("llsocialaccountpanel");
|
||||
static LLPanelInjector<LLSocialStatusPanel> t_panel_status("llsocialstatuspanel");
|
||||
static LLPanelInjector<LLSocialPhotoPanel> t_panel_photo("llsocialphotopanel");
|
||||
static LLPanelInjector<LLSocialCheckinPanel> t_panel_checkin("llsocialcheckinpanel");
|
||||
static LLPanelInjector<LLSocialAccountPanel> t_panel_account("llsocialaccountpanel");
|
||||
|
||||
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
|
||||
const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/";
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ void LLFloaterToybox::draw()
|
|||
{
|
||||
const LLCommandId& id = *it;
|
||||
|
||||
const bool command_not_present = (gToolBarView->hasCommand(id) == LLToolBarView::TOOLBAR_NONE);
|
||||
const bool command_not_present = (gToolBarView->hasCommand(id) == LLToolBarEnums::TOOLBAR_NONE);
|
||||
mToolBar->enableCommand(id, command_not_present);
|
||||
}
|
||||
|
||||
|
|
@ -175,9 +175,9 @@ void LLFloaterToybox::onToolBarButtonEnter(LLView* button)
|
|||
|
||||
switch(command_loc)
|
||||
{
|
||||
case LLToolBarView::TOOLBAR_BOTTOM: suffix = LLTrans::getString("Toolbar_Bottom_Tooltip"); break;
|
||||
case LLToolBarView::TOOLBAR_LEFT: suffix = LLTrans::getString("Toolbar_Left_Tooltip"); break;
|
||||
case LLToolBarView::TOOLBAR_RIGHT: suffix = LLTrans::getString("Toolbar_Right_Tooltip"); break;
|
||||
case LLToolBarEnums::TOOLBAR_BOTTOM: suffix = LLTrans::getString("Toolbar_Bottom_Tooltip"); break;
|
||||
case LLToolBarEnums::TOOLBAR_LEFT: suffix = LLTrans::getString("Toolbar_Left_Tooltip"); break;
|
||||
case LLToolBarEnums::TOOLBAR_RIGHT: suffix = LLTrans::getString("Toolbar_Right_Tooltip"); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "llresmgr.h"
|
||||
#include "pipeline.h"
|
||||
#include "llspatialpartition.h"
|
||||
#include "llviewershadermgr.h"
|
||||
|
||||
// Height of the yellow selection highlight posts for land
|
||||
const F32 PARCEL_POST_HEIGHT = 0.666f;
|
||||
|
|
@ -767,7 +768,6 @@ void draw_line_cube(F32 width, const LLVector3& center)
|
|||
gGL.vertex3f(center.mV[VX] + width ,center.mV[VY] - width,center.mV[VZ] - width);
|
||||
}
|
||||
|
||||
|
||||
void LLViewerObjectList::renderObjectBeacons()
|
||||
{
|
||||
if (mDebugBeacons.empty())
|
||||
|
|
@ -878,3 +878,134 @@ void LLViewerObjectList::renderObjectBeacons()
|
|||
}
|
||||
|
||||
|
||||
void gpu_benchmark()
|
||||
{
|
||||
if (!LLGLSLShader::sNoFixedFunction)
|
||||
{ //don't bother benchmarking the fixed function
|
||||
return;
|
||||
}
|
||||
|
||||
//measure memory bandwidth by:
|
||||
// - allocating a batch of textures and render targets
|
||||
// - rendering those textures to those render targets
|
||||
// - recording time taken
|
||||
// - taking the median time for a given number of samples
|
||||
|
||||
//resolution of textures/render targets
|
||||
const U32 res = 1024;
|
||||
|
||||
//number of textures
|
||||
const U32 count = 32;
|
||||
|
||||
//number of samples to take
|
||||
const S32 samples = 64;
|
||||
|
||||
LLGLSLShader::initProfile();
|
||||
|
||||
LLRenderTarget dest[count];
|
||||
U32 source[count];
|
||||
LLImageGL::generateTextures(count, source);
|
||||
std::vector<F32> results;
|
||||
|
||||
//build a random texture
|
||||
U8 pixels[res*res*4];
|
||||
|
||||
for (U32 i = 0; i < res*res*4; ++i)
|
||||
{
|
||||
pixels[i] = (U8) ll_rand(255);
|
||||
}
|
||||
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{ //allocate render targets and textures
|
||||
dest[i].allocate(res,res,GL_RGBA,false, false, LLTexUnit::TT_TEXTURE, true);
|
||||
dest[i].bindTarget();
|
||||
dest[i].clear();
|
||||
dest[i].flush();
|
||||
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]);
|
||||
LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA, res,res,GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||
}
|
||||
|
||||
//make a dummy triangle to draw with
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB);
|
||||
buff->allocateBuffer(3, 0, true);
|
||||
|
||||
LLStrider<LLVector3> v;
|
||||
LLStrider<LLVector2> tc;
|
||||
|
||||
buff->getVertexStrider(v);
|
||||
|
||||
v[0].set(-1,1,0);
|
||||
v[1].set(-1,-3,0);
|
||||
v[2].set(3,1,0);
|
||||
buff->flush();
|
||||
|
||||
gBenchmarkProgram.bind();
|
||||
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||
|
||||
//wait for any previoius GL commands to finish
|
||||
glFinish();
|
||||
|
||||
for (S32 c = -1; c < samples; ++c)
|
||||
{
|
||||
LLTimer timer;
|
||||
timer.start();
|
||||
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{
|
||||
dest[i].bindTarget();
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, source[i]);
|
||||
buff->drawArrays(LLRender::TRIANGLES, 0, 3);
|
||||
dest[i].flush();
|
||||
}
|
||||
|
||||
//wait for current batch of copies to finish
|
||||
glFinish();
|
||||
|
||||
F32 time = timer.getElapsedTimeF32();
|
||||
|
||||
if (c >= 0) // <-- ignore the first sample as it tends to be artificially slow
|
||||
{
|
||||
//store result in gigabytes per second
|
||||
F32 gb = (F32) ((F64) (res*res*8*count))/(1000000000);
|
||||
|
||||
F32 gbps = gb/time;
|
||||
|
||||
results.push_back(gbps);
|
||||
}
|
||||
}
|
||||
|
||||
gBenchmarkProgram.unbind();
|
||||
|
||||
LLGLSLShader::finishProfile();
|
||||
|
||||
LLImageGL::deleteTextures(count, source);
|
||||
|
||||
|
||||
std::sort(results.begin(), results.end());
|
||||
|
||||
F32 gbps = results[results.size()/2];
|
||||
|
||||
llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to CPU timers" << llendl;
|
||||
|
||||
F32 ms = gBenchmarkProgram.mTimeElapsed/1000000.f;
|
||||
F32 seconds = ms/1000.f;
|
||||
|
||||
F64 samples_drawn = res*res*count*samples;
|
||||
F32 samples_sec = (samples_drawn/1000000000.0)/seconds;
|
||||
gbps = samples_sec*8;
|
||||
|
||||
if (gGLManager.mHasTimerQuery)
|
||||
{
|
||||
llinfos << "Memory bandwidth is " << llformat("%.3f", gbps) << "GB/sec according to ARB_timer_query" << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "ARB_timer_query unavailable." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ LLRoleActionSet::~LLRoleActionSet()
|
|||
{
|
||||
delete mActionSetData;
|
||||
std::for_each(mActions.begin(), mActions.end(), DeletePointer());
|
||||
mActions.clear();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1959,11 +1959,11 @@ LLDockControl::DocAt LLCallDialog::getDockControlPos(const std::string& toolbarB
|
|||
|
||||
switch (toolbar_loc)
|
||||
{
|
||||
case LLToolBarView::TOOLBAR_LEFT:
|
||||
case LLToolBarEnums::TOOLBAR_LEFT:
|
||||
doc_at = LLDockControl::RIGHT;
|
||||
break;
|
||||
|
||||
case LLToolBarView::TOOLBAR_RIGHT:
|
||||
case LLToolBarEnums::TOOLBAR_RIGHT:
|
||||
doc_at = LLDockControl::LEFT;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,14 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
|
|||
{
|
||||
return passed_clipboard;
|
||||
}
|
||||
|
||||
|
||||
// show folder links
|
||||
LLViewerInventoryItem* item = gInventory.getItem(folder_id);
|
||||
if (item && item->getActualType() == LLAssetType::AT_LINK_FOLDER)
|
||||
{
|
||||
return passed_clipboard;
|
||||
}
|
||||
|
||||
if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
|
||||
{
|
||||
// Can only filter categories for items in your inventory
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ LLLandmarkList gLandmarkList;
|
|||
LLLandmarkList::~LLLandmarkList()
|
||||
{
|
||||
std::for_each(mList.begin(), mList.end(), DeletePairedPointer());
|
||||
mList.clear();
|
||||
}
|
||||
|
||||
LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t cb)
|
||||
|
|
|
|||
|
|
@ -698,14 +698,14 @@ void LLPanelStandStopFlying::updatePosition()
|
|||
|
||||
S32 y_pos = 0;
|
||||
S32 bottom_tb_center = 0;
|
||||
if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_BOTTOM))
|
||||
if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_BOTTOM))
|
||||
{
|
||||
y_pos = toolbar_bottom->getRect().getHeight();
|
||||
bottom_tb_center = toolbar_bottom->getRect().getCenterX();
|
||||
}
|
||||
|
||||
S32 left_tb_width = 0;
|
||||
if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_LEFT))
|
||||
if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_LEFT))
|
||||
{
|
||||
left_tb_width = toolbar_left->getRect().getWidth();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ private:
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLOutfitsList> t_outfits_list("outfits_list");
|
||||
static LLPanelInjector<LLOutfitsList> t_outfits_list("outfits_list");
|
||||
|
||||
LLOutfitsList::LLOutfitsList()
|
||||
: LLPanelAppearanceTab()
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
#include "llsidetraypanelcontainer.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray");
|
||||
static LLPanelInjector<LLPanelBlockedList> t_panel_blocked_list("panel_block_list_sidetray");
|
||||
|
||||
//
|
||||
// Constants
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
#include "llappearancemgr.h"
|
||||
|
||||
// register panel with appropriate XML
|
||||
static LLRegisterPanelClassWrapper<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");
|
||||
static LLPanelInjector<LLPanelEditWearable> t_edit_wearable("panel_edit_wearable");
|
||||
|
||||
// subparts of the UI for focus, camera position, etc.
|
||||
enum ESubpart {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#include "lltrans.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroup> t_panel_group("panel_group_info_sidetray");
|
||||
static LLPanelInjector<LLPanelGroup> t_panel_group("panel_group_info_sidetray");
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
#include "lltrans.h"
|
||||
#include "llviewerwindow.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupGeneral> t_panel_group_general("panel_group_general");
|
||||
static LLPanelInjector<LLPanelGroupGeneral> t_panel_group_general("panel_group_general");
|
||||
|
||||
// consts
|
||||
const S32 MATURE_CONTENT = 1;
|
||||
|
|
@ -63,14 +63,12 @@ const S32 DECLINE_TO_STATE = 0;
|
|||
|
||||
LLPanelGroupGeneral::LLPanelGroupGeneral()
|
||||
: LLPanelGroupTab(),
|
||||
mPendingMemberUpdate(FALSE),
|
||||
mChanged(FALSE),
|
||||
mFirstUse(TRUE),
|
||||
mGroupNameEditor(NULL),
|
||||
mFounderName(NULL),
|
||||
mInsignia(NULL),
|
||||
mEditCharter(NULL),
|
||||
mListVisibleMembers(NULL),
|
||||
mCtrlShowInGroupList(NULL),
|
||||
mComboMature(NULL),
|
||||
mCtrlOpenEnrollment(NULL),
|
||||
|
|
@ -79,18 +77,13 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
|
|||
mCtrlReceiveNotices(NULL),
|
||||
mCtrlListGroup(NULL),
|
||||
mActiveTitleLabel(NULL),
|
||||
mComboActiveTitle(NULL),
|
||||
mAvatarNameCacheConnection()
|
||||
mComboActiveTitle(NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LLPanelGroupGeneral::~LLPanelGroupGeneral()
|
||||
{
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPanelGroupGeneral::postBuild()
|
||||
|
|
@ -105,17 +98,6 @@ BOOL LLPanelGroupGeneral::postBuild()
|
|||
mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
|
||||
if (mListVisibleMembers)
|
||||
{
|
||||
mListVisibleMembers->setDoubleClickCallback(openProfile, this);
|
||||
mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
|
||||
|
||||
mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3));
|
||||
}
|
||||
|
||||
// Options
|
||||
mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);
|
||||
if (mCtrlShowInGroupList)
|
||||
|
|
@ -290,21 +272,6 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata)
|
|||
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelGroupGeneral::openProfile(void* data)
|
||||
{
|
||||
LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
|
||||
|
||||
if (self && self->mListVisibleMembers)
|
||||
{
|
||||
LLScrollListItem* selected = self->mListVisibleMembers->getFirstSelected();
|
||||
if (selected)
|
||||
{
|
||||
LLAvatarActions::showProfile(selected->getUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LLPanelGroupGeneral::needsApply(std::string& mesg)
|
||||
{
|
||||
updateChanged();
|
||||
|
|
@ -336,11 +303,6 @@ void LLPanelGroupGeneral::activate()
|
|||
void LLPanelGroupGeneral::draw()
|
||||
{
|
||||
LLPanelGroupTab::draw();
|
||||
|
||||
if (mPendingMemberUpdate)
|
||||
{
|
||||
updateMembers();
|
||||
}
|
||||
}
|
||||
|
||||
bool LLPanelGroupGeneral::apply(std::string& mesg)
|
||||
|
|
@ -522,10 +484,6 @@ bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LL
|
|||
return false;
|
||||
}
|
||||
|
||||
static F32 sSDTime = 0.0f;
|
||||
static F32 sElementTime = 0.0f;
|
||||
static F32 sAllTime = 0.0f;
|
||||
|
||||
// virtual
|
||||
void LLPanelGroupGeneral::update(LLGroupChange gc)
|
||||
{
|
||||
|
|
@ -666,132 +624,10 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
|
|||
{
|
||||
mEditCharter->setText(gdatap->mCharter);
|
||||
}
|
||||
|
||||
if (mListVisibleMembers)
|
||||
{
|
||||
mListVisibleMembers->deleteAllItems();
|
||||
|
||||
if (gdatap->isMemberDataComplete())
|
||||
{
|
||||
mMemberProgress = gdatap->mMembers.begin();
|
||||
mPendingMemberUpdate = TRUE;
|
||||
|
||||
sSDTime = 0.0f;
|
||||
sElementTime = 0.0f;
|
||||
sAllTime = 0.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::stringstream pending;
|
||||
pending << "Retrieving member list (" << gdatap->mMembers.size() << "\\" << gdatap->mMemberCount << ")";
|
||||
|
||||
LLSD row;
|
||||
row["columns"][0]["value"] = pending.str();
|
||||
row["columns"][0]["column"] = "name";
|
||||
|
||||
mListVisibleMembers->setEnabled(FALSE);
|
||||
mListVisibleMembers->addElement(row);
|
||||
}
|
||||
}
|
||||
|
||||
resetDirty();
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::updateMembers()
|
||||
{
|
||||
mPendingMemberUpdate = FALSE;
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!mListVisibleMembers
|
||||
|| !gdatap
|
||||
|| !gdatap->isMemberDataComplete()
|
||||
|| gdatap->mMembers.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLTimer update_time;
|
||||
update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME);
|
||||
|
||||
LLAvatarName av_name;
|
||||
|
||||
for( ; mMemberProgress != gdatap->mMembers.end() && !update_time.hasExpired();
|
||||
++mMemberProgress)
|
||||
{
|
||||
LLGroupMemberData* member = mMemberProgress->second;
|
||||
if (!member)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (LLAvatarNameCache::get(mMemberProgress->first, &av_name))
|
||||
{
|
||||
addMember(mMemberProgress->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If name is not cached, onNameCache() should be called when it is cached and add this member to list.
|
||||
// *TODO : Use a callback per member, not for the panel group.
|
||||
if (mAvatarNameCacheConnection.connected())
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2));
|
||||
}
|
||||
}
|
||||
|
||||
if (mMemberProgress == gdatap->mMembers.end())
|
||||
{
|
||||
lldebugs << " member list completed." << llendl;
|
||||
mListVisibleMembers->setEnabled(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
mPendingMemberUpdate = TRUE;
|
||||
mListVisibleMembers->setEnabled(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
|
||||
{
|
||||
LLNameListCtrl::NameItem item_params;
|
||||
item_params.value = member->getID();
|
||||
|
||||
LLScrollListCell::Params column;
|
||||
item_params.columns.add().column("name").font.name("SANSSERIF_SMALL");
|
||||
|
||||
item_params.columns.add().column("title").value(member->getTitle()).font.name("SANSSERIF_SMALL");
|
||||
|
||||
item_params.columns.add().column("status").value(member->getOnlineStatus()).font.name("SANSSERIF_SMALL");
|
||||
|
||||
LLScrollListItem* member_row = mListVisibleMembers->addNameItemRow(item_params);
|
||||
|
||||
if ( member->isOwner() )
|
||||
{
|
||||
LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(member_row->getColumn(0));
|
||||
if (name_textp)
|
||||
name_textp->setFontStyle(LLFontGL::BOLD);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
|
||||
{
|
||||
mAvatarNameCacheConnection.disconnect();
|
||||
|
||||
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
|
||||
|
||||
if (!gdatap
|
||||
|| !gdatap->isMemberDataComplete()
|
||||
|| gdatap->getMemberVersion() != update_id)
|
||||
{
|
||||
// Stale data
|
||||
return;
|
||||
}
|
||||
|
||||
addMember(member);
|
||||
}
|
||||
|
||||
void LLPanelGroupGeneral::updateChanged()
|
||||
{
|
||||
// List all the controls we want to check for changes...
|
||||
|
|
@ -867,17 +703,6 @@ void LLPanelGroupGeneral::reset()
|
|||
mEditCharter->setText(empty_str);
|
||||
mGroupNameEditor->setText(empty_str);
|
||||
}
|
||||
|
||||
{
|
||||
LLSD row;
|
||||
row["columns"][0]["value"] = "no members yet";
|
||||
row["columns"][0]["column"] = "name";
|
||||
|
||||
mListVisibleMembers->deleteAllItems();
|
||||
mListVisibleMembers->setEnabled(FALSE);
|
||||
mListVisibleMembers->addElement(row);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
mComboMature->setEnabled(true);
|
||||
|
|
@ -964,18 +789,3 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
|
|||
|
||||
activate();
|
||||
}
|
||||
S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,const LLScrollListItem* i2)
|
||||
{
|
||||
const LLScrollListCell *cell1 = i1->getColumn(col_idx);
|
||||
const LLScrollListCell *cell2 = i2->getColumn(col_idx);
|
||||
|
||||
if(col_idx == 2)
|
||||
{
|
||||
if(LLStringUtil::compareDict(cell1->getValue().asString(),"Online") == 0 )
|
||||
return 1;
|
||||
if(LLStringUtil::compareDict(cell2->getValue().asString(),"Online") == 0 )
|
||||
return -1;
|
||||
}
|
||||
|
||||
return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ public:
|
|||
virtual void setGroupID(const LLUUID& id);
|
||||
|
||||
virtual void setupCtrls (LLPanel* parent);
|
||||
|
||||
void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
|
||||
private:
|
||||
void reset();
|
||||
|
||||
|
|
@ -75,18 +73,12 @@ private:
|
|||
static void onCommitEnrollment(LLUICtrl* ctrl, void* data);
|
||||
static void onClickInfo(void* userdata);
|
||||
static void onReceiveNotices(LLUICtrl* ctrl, void* data);
|
||||
static void openProfile(void* data);
|
||||
|
||||
S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*);
|
||||
void addMember(LLGroupMemberData* member);
|
||||
|
||||
static bool joinDlgCB(const LLSD& notification, const LLSD& response);
|
||||
|
||||
void updateMembers();
|
||||
void updateChanged();
|
||||
bool confirmMatureApply(const LLSD& notification, const LLSD& response);
|
||||
|
||||
BOOL mPendingMemberUpdate;
|
||||
BOOL mChanged;
|
||||
BOOL mFirstUse;
|
||||
std::string mIncompleteMemberDataStr;
|
||||
|
|
@ -97,8 +89,6 @@ private:
|
|||
LLTextureCtrl *mInsignia;
|
||||
LLTextEditor *mEditCharter;
|
||||
|
||||
LLNameListCtrl *mListVisibleMembers;
|
||||
|
||||
// Options (include any updates in updateChanged)
|
||||
LLCheckBoxCtrl *mCtrlShowInGroupList;
|
||||
LLCheckBoxCtrl *mCtrlOpenEnrollment;
|
||||
|
|
@ -109,9 +99,6 @@ private:
|
|||
LLTextBox *mActiveTitleLabel;
|
||||
LLComboBox *mComboActiveTitle;
|
||||
LLComboBox *mComboMature;
|
||||
|
||||
LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
#include "llfloaterworldmap.h"
|
||||
#include "llviewermessage.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupLandMoney> t_panel_group_money("panel_group_land_money");
|
||||
static LLPanelInjector<LLPanelGroupLandMoney> t_panel_group_money("panel_group_land_money");
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "llgiveinventory.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
|
||||
static LLPanelInjector<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
|
||||
|
||||
|
||||
/////////////////////////
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
#include "roles_constants.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupRoles> t_panel_group_roles("panel_group_roles");
|
||||
static LLPanelInjector<LLPanelGroupRoles> t_panel_group_roles("panel_group_roles");
|
||||
|
||||
bool agentCanRemoveFromRole(const LLUUID& group_id,
|
||||
const LLUUID& role_id)
|
||||
|
|
@ -733,7 +733,7 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable)
|
|||
////////////////////////////
|
||||
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupMembersSubTab> t_panel_group_members_subtab("panel_group_members_subtab");
|
||||
static LLPanelInjector<LLPanelGroupMembersSubTab> t_panel_group_members_subtab("panel_group_members_subtab");
|
||||
|
||||
LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab()
|
||||
: LLPanelGroupSubTab(),
|
||||
|
|
@ -1636,6 +1636,9 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
|
|||
|
||||
item_params.columns.add().column("online").value(data->getOnlineStatus())
|
||||
.font.name("SANSSERIF_SMALL").style("NORMAL");
|
||||
|
||||
item_params.columns.add().column("title").value(data->getTitle()).font.name("SANSSERIF_SMALL").style("NORMAL");;
|
||||
|
||||
mMembersList->addNameItemRow(item_params);
|
||||
|
||||
mHasMatch = TRUE;
|
||||
|
|
@ -1752,7 +1755,7 @@ void LLPanelGroupMembersSubTab::updateMembers()
|
|||
// LLPanelGroupRolesSubTab
|
||||
////////////////////////////
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupRolesSubTab> t_panel_group_roles_subtab("panel_group_roles_subtab");
|
||||
static LLPanelInjector<LLPanelGroupRolesSubTab> t_panel_group_roles_subtab("panel_group_roles_subtab");
|
||||
|
||||
LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab()
|
||||
: LLPanelGroupSubTab(),
|
||||
|
|
@ -2466,7 +2469,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role)
|
|||
// LLPanelGroupActionsSubTab
|
||||
////////////////////////////
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelGroupActionsSubTab> t_panel_group_actions_subtab("panel_group_actions_subtab");
|
||||
static LLPanelInjector<LLPanelGroupActionsSubTab> t_panel_group_actions_subtab("panel_group_actions_subtab");
|
||||
|
||||
|
||||
LLPanelGroupActionsSubTab::LLPanelGroupActionsSubTab()
|
||||
|
|
@ -2658,7 +2661,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id)
|
|||
button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
|
||||
|
||||
if(mSubTabContainer)
|
||||
mSubTabContainer->selectTab(0);
|
||||
mSubTabContainer->selectTab(1);
|
||||
|
||||
activate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "llmediactrl.h"
|
||||
#include "llviewerhome.h"
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelHome> t_home("panel_sidetray_home");
|
||||
static LLPanelInjector<LLPanelHome> t_home("panel_sidetray_home");
|
||||
|
||||
LLPanelHome::LLPanelHome() :
|
||||
LLPanel(),
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ typedef std::pair<LLUUID, std::string> folder_pair_t;
|
|||
static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right);
|
||||
static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");
|
||||
static LLPanelInjector<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");
|
||||
|
||||
// Statics for textures filenames
|
||||
static std::string icon_pg;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
const std::string FILTERS_FILENAME("filters.xml");
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelMainInventory> t_inventory("panel_main_inventory");
|
||||
static LLPanelInjector<LLPanelMainInventory> t_inventory("panel_main_inventory");
|
||||
|
||||
void on_file_loaded_for_save(BOOL success,
|
||||
LLViewerFetchedTexture *src_vi,
|
||||
|
|
@ -574,13 +574,16 @@ void LLPanelMainInventory::draw()
|
|||
|
||||
void LLPanelMainInventory::updateItemcountText()
|
||||
{
|
||||
// *TODO: Calling setlocale() on each frame may be inefficient.
|
||||
//LLLocale locale(LLStringUtil::getLocale());
|
||||
std::string item_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||
if(mItemCount != gInventory.getItemCount())
|
||||
{
|
||||
mItemCount = gInventory.getItemCount();
|
||||
mItemCountString = "";
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
|
||||
}
|
||||
|
||||
LLStringUtil::format_map_t string_args;
|
||||
string_args["[ITEM_COUNT]"] = item_count_string;
|
||||
string_args["[ITEM_COUNT]"] = mItemCountString;
|
||||
string_args["[FILTER]"] = getFilterText();
|
||||
|
||||
std::string text = "";
|
||||
|
|
|
|||
|
|
@ -131,6 +131,8 @@ private:
|
|||
LLSaveFolderState* mSavedFolderState;
|
||||
std::string mFilterText;
|
||||
std::string mFilterSubString;
|
||||
S32 mItemCount;
|
||||
std::string mItemCountString;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "llviewercontrol.h"
|
||||
|
||||
|
||||
static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
|
||||
static LLPanelInjector<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
|
||||
|
||||
const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue