Merge viewer-neko

master
Ansariel 2017-07-18 21:37:09 +02:00
commit e07d6bc4f1
18 changed files with 182 additions and 172 deletions

View File

@ -830,6 +830,7 @@ Kitty Barnett
MAINT-6154
MAINT-6568
STORM-2149
MAINT-7581
Kolor Fall
Komiko Okamoto
Korvel Noh
@ -1045,9 +1046,9 @@ Nicholaz Beresford
VWR-2682
VWR-2684
Nick Rhodes
NickyD
MAINT-873
Nicky Dasmijn
MAINT-873
MAINT-7541
VWR-29228
MAINT-1392
MAINT-873

View File

@ -139,7 +139,8 @@ LLMotionController::LLMotionController()
mTimeStep(0.f),
mTimeStepCount(0),
mLastInterp(0.f),
mIsSelf(FALSE)
mIsSelf(FALSE),
mLastCountAfterPurge(0)
{
}
@ -238,10 +239,12 @@ void LLMotionController::purgeExcessMotions()
}
}
if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
U32 loaded_count = mLoadedMotions.size();
if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge)
{
LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL;
LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL;
}
mLastCountAfterPurge = loaded_count;
}
//-----------------------------------------------------------------------------

View File

@ -224,6 +224,8 @@ protected:
F32 mLastInterp;
U8 mJointSignature[2][LL_CHARACTER_MAX_ANIMATED_JOINTS];
private:
U32 mLastCountAfterPurge; //for logging and debugging purposes
};
//-----------------------------------------------------------------------------

View File

@ -193,12 +193,7 @@ namespace LLInitParam
{
if (!silent)
{
std::string file_name = p.getCurrentFileName();
if(!file_name.empty())
{
file_name = "in file: " + file_name;
}
p.parserWarning(llformat("Failed to parse parameter \"%s\" %s", p.getCurrentElementName().c_str(), file_name.c_str()));
p.parserWarning(llformat("Failed to parse parameter \"%s\"", p.getCurrentElementName().c_str()));
}
return false;
}

View File

@ -72,6 +72,7 @@ LLScrollContainer::Params::Params()
hide_scrollbar("hide_scrollbar"),
min_auto_scroll_rate("min_auto_scroll_rate", 100),
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
max_auto_scroll_zone("max_auto_scroll_zone", 16),
reserve_scroll_corner("reserve_scroll_corner", false),
size("size", -1)
{}
@ -88,6 +89,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mReserveScrollCorner(p.reserve_scroll_corner),
mMinAutoScrollRate(p.min_auto_scroll_rate),
mMaxAutoScrollRate(p.max_auto_scroll_rate),
mMaxAutoScrollZone(p.max_auto_scroll_zone),
mScrolledView(NULL),
mSize(p.size)
{
@ -290,7 +292,21 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
return TRUE;
}
bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
{
if (mAutoScrolling)
{
return true; // already scrolling
}
return autoScroll(x, y, false);
}
bool LLScrollContainer::autoScroll(S32 x, S32 y)
{
return autoScroll(x, y, true);
}
bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
{
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
S32 scrollbar_size = (mSize == -1 ? scrollbar_size_control : mSize);
@ -302,6 +318,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
// Note: Will also include scrollers as scroll zones, so opposite
// scroll zones might have different size due to visible scrollers
if( mScrollbar[HORIZONTAL]->getVisible() )
{
inner_rect_local.mBottom += scrollbar_size;
@ -316,8 +334,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
// autoscroll region should take up no more than one third of visible scroller area
S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10);
S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10);
S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, (S32)mMaxAutoScrollZone);
S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, (S32)mMaxAutoScrollZone);
if( mScrollbar[HORIZONTAL]->getVisible() )
{
@ -325,8 +343,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
left_scroll_rect.mRight = inner_rect_local.mLeft + auto_scroll_region_width;
if( left_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() > 0) )
{
mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed );
mAutoScrolling = TRUE;
if (do_scroll)
{
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
mAutoScrolling = TRUE;
}
scrolling = true;
}
@ -334,8 +355,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
right_scroll_rect.mLeft = inner_rect_local.mRight - auto_scroll_region_width;
if( right_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() < mScrollbar[HORIZONTAL]->getDocPosMax()) )
{
mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed );
mAutoScrolling = TRUE;
if (do_scroll)
{
mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
mAutoScrolling = TRUE;
}
scrolling = true;
}
}
@ -345,8 +369,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
bottom_scroll_rect.mTop = inner_rect_local.mBottom + auto_scroll_region_height;
if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() < mScrollbar[VERTICAL]->getDocPosMax()) )
{
mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed );
mAutoScrolling = TRUE;
if (do_scroll)
{
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
mAutoScrolling = TRUE;
}
scrolling = true;
}
@ -354,8 +381,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
top_scroll_rect.mBottom = inner_rect_local.mTop - auto_scroll_region_height;
if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() > 0) )
{
mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed );
mAutoScrolling = TRUE;
if (do_scroll)
{
mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
mAutoScrolling = TRUE;
}
scrolling = true;
}
}

View File

@ -67,6 +67,7 @@ public:
hide_scrollbar;
Optional<F32> min_auto_scroll_rate,
max_auto_scroll_rate;
Optional<U32> max_auto_scroll_zone;
Optional<LLUIColor> bg_color;
Optional<LLScrollbar::callback_t> scroll_callback;
Optional<S32> size;
@ -117,7 +118,8 @@ public:
virtual void draw();
virtual bool addChild(LLView* view, S32 tab_group = 0);
bool canAutoScroll(S32 x, S32 y);
bool autoScroll(S32 x, S32 y);
S32 getSize() const { return mSize; }
@ -131,6 +133,7 @@ private:
virtual void scrollHorizontal( S32 new_pos );
virtual void scrollVertical( S32 new_pos );
void updateScroll();
bool autoScroll(S32 x, S32 y, bool do_scroll);
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
@ -144,6 +147,7 @@ private:
F32 mAutoScrollRate;
F32 mMinAutoScrollRate;
F32 mMaxAutoScrollRate;
U32 mMaxAutoScrollZone;
bool mHideScrollbar;
};

View File

@ -58,10 +58,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
const char* NO_VALUE_MARKER = "no_value";
#ifdef LL_WINDOWS
const S32 LINE_NUMBER_HERE = 0;
#endif
struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
{
static void declareValues()
@ -1313,22 +1309,14 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
void LLXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
#else
Parser::parserWarning(message);
#endif
std::string warning_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
Parser::parserWarning(warning_msg);
}
void LLXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
#else
Parser::parserError(message);
#endif
std::string error_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
Parser::parserError(error_msg);
}
@ -1641,22 +1629,14 @@ bool LLSimpleXUIParser::processText()
void LLSimpleXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
#else
Parser::parserWarning(message);
#endif
std::string warning_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
Parser::parserWarning(warning_msg);
}
void LLSimpleXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studio friendly formatting of output message for easy access to originating xml
LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
#else
Parser::parserError(message);
#endif
std::string error_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
Parser::parserError(error_msg);
}
bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)

View File

@ -6585,11 +6585,11 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;sid=[SESSION_ID]</string>
<string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;sid=[SESSION_ID]</string>
<key>Backup</key>
<integer>0</integer>
<!-- LL, possibly privacy leaking search string
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
<string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
-->
</map>
<key>HighResSnapshot</key>

View File

@ -1684,11 +1684,10 @@ bool LLAppViewer::frame()
static U64 last_call = 0;
// <FS:Ansariel> MaxFPS improvement
//if (LLStartUp::getStartupState() == STATE_STARTED
//if (!gTeleportDisplay)
static LLCachedControl<bool> fsLimitFramerate(gSavedSettings, "FSLimitFramerate");
if (fsLimitFramerate && LLStartUp::getStartupState() == STATE_STARTED
if (fsLimitFramerate && !gTeleportDisplay)
// </FS:Ansariel>
&& !gTeleportDisplay)
{
// Frame/draw throttling
U64 elapsed_time = LLTimer::getTotalTime() - last_call;
@ -5222,23 +5221,15 @@ bool LLAppViewer::initCache()
// Init the texture cache
// Allocate 80% of the cache size for textures
const S32 MB = 1024 * 1024;
const S64 MIN_CACHE_SIZE = 64 * MB;
const S64 MIN_CACHE_SIZE = 256 * MB;
const S64 MAX_CACHE_SIZE = 9984ll * MB;
const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB
S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB;
cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
S64 texture_cache_size = ((cache_size * 8) / 10);
S64 vfs_size = cache_size - texture_cache_size;
if (vfs_size > MAX_VFS_SIZE)
{
// Give the texture cache more space, since the VFS can't be bigger than 1GB.
// This happens when the user's CacheSize setting is greater than 5GB.
vfs_size = MAX_VFS_SIZE;
texture_cache_size = cache_size - MAX_VFS_SIZE;
}
S64 vfs_size = llmin((S64)((cache_size * 2) / 10), MAX_VFS_SIZE);
S64 texture_cache_size = cache_size - vfs_size;
S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
texture_cache_size -= extra;

View File

@ -43,9 +43,9 @@
#include "llworld.h"
#include "llvoavatar.h"
static const F32 SEC_PER_FLEXI_FRAME = 1.f / 60.f; // 60 flexi updates per second
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
@ -56,7 +56,10 @@ static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// constructor
//-----------------------------------------------
LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectData* attributes) :
mVO(vo), mAttributes(attributes)
mVO(vo),
mAttributes(attributes),
mLastFrameNum(0),
mLastUpdatePeriod(0)
{
static U32 seed = 0;
mID = seed++;
@ -64,7 +67,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mUpdated = FALSE;
mInitializedRes = -1;
mSimulateRes = 0;
mFrameNum = 0;
mCollisionSphereRadius = 0.f;
mRenderRes = -1;
@ -75,7 +77,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mInstanceIndex = sInstanceList.size();
sInstanceList.push_back(this);
sUpdateDelay.push_back(0);
}//-----------------------------------------------
LLVolumeImplFlexible::~LLVolumeImplFlexible()
@ -86,28 +87,28 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible()
{
sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
}
sInstanceList.pop_back();
sUpdateDelay.pop_back();
}
//static
void LLVolumeImplFlexible::updateClass()
{
std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
iter != sInstanceList.end();
++iter)
{
--(*delay_iter);
if (*delay_iter <= 0)
// Note: by now update period might have changed
if ((*iter)->mRenderRes == -1
|| (*iter)->mLastFrameNum + (*iter)->mLastUpdatePeriod <= virtual_frame_num
|| (*iter)->mLastFrameNum > virtual_frame_num) //time issues, overflow
{
(*iter)->doIdleUpdate();
}
++delay_iter;
}
}
@ -334,15 +335,12 @@ void LLVolumeImplFlexible::updateRenderRes()
// updated every time step. In the future, perhaps there could be an
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
//LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
//ensure drawable is active
drawablep->makeActive();
@ -354,15 +352,20 @@ void LLVolumeImplFlexible::doIdleUpdate()
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
sUpdateDelay[mInstanceIndex] = 0;
}
else
{
F32 pixel_area = mVO->getPixelArea();
// Note: Flexies afar will be rarely updated, closer ones will be updated more frequently.
// But frequency differences are extremely noticeable, so consider modifying update factor,
// or at least clamping value a bit more from both sides.
U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
update_period = llclamp(update_period, 0U, 32U);
update_period = llclamp(update_period, 1U, 32U);
// We control how fast flexies update, buy splitting updates among frames
U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
if (visible)
{
@ -370,42 +373,44 @@ void LLVolumeImplFlexible::doIdleUpdate()
pixel_area > 256.f)
{
U32 id;
if (mVO->isRootEdit())
{
id = mID;
}
else
{
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
LLVOVolume* parent = (LLVOVolume*)mVO->getParent();
id = parent->getVolumeInterfaceID();
}
if (mVO->isRootEdit())
{
id = mID;
// Throttle flexies and spread load by preventing flexies from updating in same frame
// Shows how many frames we need to wait before next update
U64 throttling_delay = (virtual_frame_num + id) % update_period;
if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
|| (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
{
// We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
// If happened too late, subtract throttling_delay (it is zero otherwise)
mLastFrameNum = virtual_frame_num - throttling_delay;
// Store update period for updateClass()
// Note: Consider substituting update_period with mLastUpdatePeriod everywhere.
mLastUpdatePeriod = update_period;
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
}
}
}
else
{
LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
id = parent->getVolumeInterfaceID();
}
if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
{
sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
mLastFrameNum = virtual_frame_num;
mLastUpdatePeriod = update_period;
}
}
}
else
{
sUpdateDelay[mInstanceIndex] = (S32) update_period;
}
}
}
}

View File

@ -72,7 +72,6 @@ class LLVolumeImplFlexible : public LLVolumeInterface
{
private:
static std::vector<LLVolumeImplFlexible*> sInstanceList;
static std::vector<S32> sUpdateDelay;
S32 mInstanceIndex;
public:
@ -133,7 +132,8 @@ private:
S32 mInitializedRes;
S32 mSimulateRes;
S32 mRenderRes;
U32 mFrameNum;
U64 mLastFrameNum;
U32 mLastUpdatePeriod;
LLVector3 mCollisionSpherePosition;
F32 mCollisionSphereRadius;
U32 mID;

View File

@ -41,16 +41,13 @@ LLFloaterLinkReplace::LLFloaterLinkReplace(const LLSD& key)
mRemainingItems(0),
mSourceUUID(LLUUID::null),
mTargetUUID(LLUUID::null),
mInstance(NULL),
mBatchSize(gSavedSettings.getU32("LinkReplaceBatchSize"))
{
mEventTimer.stop();
mInstance = this;
}
LLFloaterLinkReplace::~LLFloaterLinkReplace()
{
mInstance = NULL;
}
BOOL LLFloaterLinkReplace::postBuild()
@ -180,11 +177,9 @@ void LLFloaterLinkReplace::onStartClicked()
}
}
void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
const LLUUID& target_item_id,
bool needs_wearable_ordering_update,
bool needs_description_update,
const LLUUID& outfit_folder_id)
// static
void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id)
{
LL_DEBUGS() << "Inventory link replace:" << LL_NEWLINE
<< " - old_item_id = " << old_item_id.asString() << LL_NEWLINE
@ -239,20 +234,21 @@ void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
outfit_update_folder = outfit_folder_id;
}
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, floater_handle, outfit_update_folder));
remove_inventory_object(old_item_id, cb);
}
void LLFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
// static
void LLFloaterLinkReplace::itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id)
{
if (outfit_folder_id.notNull())
{
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
}
if (mInstance)
if (!floater_handle.isDead())
{
decreaseOpenItemCount();
floater_handle.get()->decreaseOpenItemCount();
}
}
@ -324,7 +320,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
LLInventoryObject::const_object_list_t obj_array;
obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item));
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::linkCreatedCallback,
this,
getDerivedHandle<LLFloaterLinkReplace>(),
source_item->getUUID(),
target_item->getUUID(),
needs_wearable_ordering_update,

View File

@ -98,12 +98,9 @@ private:
void updateFoundLinks();
void processBatch(LLInventoryModel::item_array_t items);
void linkCreatedCallback(const LLUUID& old_item_id,
const LLUUID& target_item_id,
bool needs_wearable_ordering_update,
bool needs_description_update,
const LLUUID& outfit_folder_id);
void itemRemovedCallback(const LLUUID& outfit_folder_id);
static void linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id);
static void itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id);
void onSourceItemDrop(const LLUUID& source_item_id);
void onTargetItemDrop(const LLUUID& target_item_id);
@ -120,8 +117,6 @@ private:
U32 mBatchSize;
LLInventoryModel::item_array_t mRemainingInventoryItems;
LLFloaterLinkReplace* mInstance;
};
#endif // LL_FLOATERLINKREPLACE_H

View File

@ -37,25 +37,28 @@ using namespace std;
unsigned char static_unique_id[] = {0,0,0,0,0,0};
bool static has_static_unique_id = false;
#if LL_WINDOWS
class FSComInitialize
{
HRESULT mHR;
public:
FSComInitialize()
{
mHR = CoInitializeEx( 0, COINIT_MULTITHREADED );
if( FAILED( mHR ) )
LL_DEBUGS( "AppInit" ) << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
}
#if LL_WINDOWS
~FSComInitialize()
{
if( SUCCEEDED( mHR ) )
CoUninitialize();
}
class LLComInitialize
{
HRESULT mHR;
public:
LLComInitialize()
{
mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
if (FAILED(mHR))
LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
}
~LLComInitialize()
{
if (SUCCEEDED(mHR))
CoUninitialize();
}
};
#endif
#endif //LL_WINDOWS
// get an unique machine id.
// NOT THREAD SAFE - do before setting up threads.
// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
@ -78,18 +81,7 @@ S32 LLMachineID::init()
// Step 1: --------------------------------------------------
// Initialize COM. ------------------------------------------
// <FS:ND> Do not fail in case CoInitialize fails as it can be harmless
//hres = CoInitializeEx(0, COINIT_MULTITHREADED);
//if (FAILED(hres))
//{
// LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL;
// return 1; // Program has failed.
//}
FSComInitialize comInit;
// </FS:ND>
LLComInitialize comInit;
// Step 2: --------------------------------------------------
// Set general COM security levels --------------------------
@ -114,7 +106,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
return 1; // Program has failed.
}
@ -132,7 +123,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
return 1; // Program has failed.
}
@ -159,7 +149,6 @@ S32 LLMachineID::init()
{
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
pLoc->Release();
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
return 1; // Program has failed.
}
@ -185,7 +174,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
return 1; // Program has failed.
}
@ -206,7 +194,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
return 1; // Program has failed.
}
@ -261,7 +248,6 @@ S32 LLMachineID::init()
pLoc->Release();
if (pEnumerator)
pEnumerator->Release();
// CoUninitialize(); <FS:ND/> Counitialize will be handled by RAII class
ret_code=0;
#else
unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);

View File

@ -843,7 +843,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Check to see if we are auto scrolling from the last frame
// LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
// BOOL needsToScroll = panel->getScrollableContainer()->autoScroll(x, y);
// BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
// if(mFilterTabs)
// {
// if(needsToScroll)

View File

@ -4531,7 +4531,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLAvatarName av_name;
if (LLAvatarNameCache::get(from_id, &av_name))
{
chat.mFromName = av_name.getDisplayName();
chat.mFromName = av_name.getCompleteName();
}
else
{
@ -8857,14 +8857,10 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
// Get the message ID
msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id);
big_reason = LLAgent::sTeleportErrorMessages[message_id];
if ( big_reason.size() > 0 )
{ // Substitute verbose reason from the local map
args["REASON"] = big_reason;
}
else
{ // Nothing found in the map - use what the server returned in the original message block
if ( big_reason.size() <= 0 )
{
// Nothing found in the map - use what the server returned in the original message block
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason);
args["REASON"] = big_reason;
}
LLSD llsd_block;
@ -8879,6 +8875,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
else
{
if(llsd_block.has("REGION_NAME"))
{
std::string region_name = llsd_block["REGION_NAME"].asString();
if(!region_name.empty())
{
LLStringUtil::format_map_t name_args;
name_args["[REGION_NAME]"] = region_name;
LLStringUtil::format(big_reason, name_args);
}
}
// change notification name in this special case
if (handle_teleport_access_blocked(llsd_block, message_id, args["REASON"]))
{
@ -8890,7 +8896,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
}
}
args["REASON"] = big_reason;
}
else
{ // Extra message payload not found - use what the simulator sent

View File

@ -228,6 +228,22 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["SLURL_TYPE"] = "hop"; // <FS:AW provide SLURL_TYPE url substitution>
#endif // </FS:AW optional opensim support>
// find the grid
std::string current_grid = LLGridManager::getInstance()->getGridId();
std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower);
if (current_grid == "agni")
{
substitution["GRID"] = "secondlife.com";
}
else if (current_grid == "damballah")
{
// Staging grid has its own naming scheme.
substitution["GRID"] = "secondlife-staging.com";
}
else
{
substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str());
}
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);

View File

@ -418,7 +418,7 @@
initial_value="1024"
layout="topleft"
max_val="9984"
min_val="64"
min_val="256"
top_pad="10"
name="cache_size"
width="279" />