Merge viewer-bear
commit
df4205dc46
|
|
@ -83,7 +83,12 @@ void LLIconCtrl::draw()
|
|||
|
||||
// virtual
|
||||
// value might be a string or a UUID
|
||||
void LLIconCtrl::setValue(const LLSD& value )
|
||||
void LLIconCtrl::setValue(const LLSD& value)
|
||||
{
|
||||
setValue(value, mPriority);
|
||||
}
|
||||
|
||||
void LLIconCtrl::setValue(const LLSD& value, S32 priority)
|
||||
{
|
||||
LLSD tvalue(value);
|
||||
if (value.isString() && LLUUID::validate(value.asString()))
|
||||
|
|
@ -94,11 +99,11 @@ void LLIconCtrl::setValue(const LLSD& value )
|
|||
LLUICtrl::setValue(tvalue);
|
||||
if (tvalue.isUUID())
|
||||
{
|
||||
mImagep = LLUI::getUIImageByID(tvalue.asUUID(), mPriority);
|
||||
mImagep = LLUI::getUIImageByID(tvalue.asUUID(), priority);
|
||||
}
|
||||
else
|
||||
{
|
||||
mImagep = LLUI::getUIImage(tvalue.asString(), mPriority);
|
||||
mImagep = LLUI::getUIImage(tvalue.asString(), priority);
|
||||
}
|
||||
|
||||
if(mImagep.notNull()
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ protected:
|
|||
LLIconCtrl(const Params&);
|
||||
friend class LLUICtrlFactory;
|
||||
|
||||
void setValue(const LLSD& value, S32 priority);
|
||||
|
||||
public:
|
||||
virtual ~LLIconCtrl();
|
||||
|
||||
|
|
|
|||
|
|
@ -1842,7 +1842,20 @@ void LLTextEditor::unindentLineBeforeCloseBrace()
|
|||
LLWString text = getWText();
|
||||
if( ' ' == text[ mCursorPos - 1 ] )
|
||||
{
|
||||
removeCharOrTab();
|
||||
S32 line = getLineNumFromDocIndex(mCursorPos, false);
|
||||
S32 line_start = getLineStart(line);
|
||||
|
||||
// Jump over spaces in the current line
|
||||
while ((' ' == text[line_start]) && (line_start < mCursorPos))
|
||||
{
|
||||
line_start++;
|
||||
}
|
||||
|
||||
// Make sure there is nothing but ' ' before the Brace we are unindenting
|
||||
if (line_start == mCursorPos)
|
||||
{
|
||||
removeCharOrTab();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1926,7 +1939,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char)
|
|||
// Handle most keys only if the text editor is writeable.
|
||||
if( !mReadOnly )
|
||||
{
|
||||
if( '}' == uni_char )
|
||||
if( mAutoIndent && '}' == uni_char )
|
||||
{
|
||||
unindentLineBeforeCloseBrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
NSPoint mPoint = [theEvent locationInWindow];
|
||||
mMousePos[0] = mPoint.x;
|
||||
mMousePos[1] = mPoint.y;
|
||||
callMouseMoved(mMousePos, 0);
|
||||
callMouseDragged(mMousePos, 0);
|
||||
}
|
||||
|
||||
- (void) otherMouseDown:(NSEvent *)theEvent
|
||||
|
|
|
|||
|
|
@ -112,6 +112,10 @@ void LLWindowCallbacks::handleMouseMove(LLWindow *window, const LLCoordGL pos, M
|
|||
{
|
||||
}
|
||||
|
||||
void LLWindowCallbacks::handleMouseDragged(LLWindow *window, const LLCoordGL pos, MASK mask)
|
||||
{
|
||||
}
|
||||
|
||||
void LLWindowCallbacks::handleScrollWheel(LLWindow *window, S32 clicks)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ public:
|
|||
virtual BOOL handleActivate(LLWindow *window, BOOL activated);
|
||||
virtual BOOL handleActivateApp(LLWindow *window, BOOL activating);
|
||||
virtual void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
|
||||
virtual void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask);
|
||||
virtual void handleScrollWheel(LLWindow *window, S32 clicks);
|
||||
virtual void handleResize(LLWindow *window, S32 width, S32 height);
|
||||
virtual void handleFocus(LLWindow *window);
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ void setCrossCursor();
|
|||
void setNotAllowedCursor();
|
||||
void hideNSCursor();
|
||||
void showNSCursor();
|
||||
bool isCGCursorVisible();
|
||||
void hideNSCursorTillMove(bool hide);
|
||||
void requestUserAttention();
|
||||
long showAlert(std::string title, std::string text, int type);
|
||||
|
|
@ -134,6 +135,7 @@ void callLeftMouseUp(float *pos, unsigned int mask);
|
|||
void callDoubleClick(float *pos, unsigned int mask);
|
||||
void callResize(unsigned int width, unsigned int height);
|
||||
void callMouseMoved(float *pos, unsigned int mask);
|
||||
void callMouseDragged(float *pos, unsigned int mask);
|
||||
void callScrollMoved(float delta);
|
||||
void callMouseExit();
|
||||
void callWindowFocus();
|
||||
|
|
|
|||
|
|
@ -169,6 +169,11 @@ void showNSCursor()
|
|||
[NSCursor unhide];
|
||||
}
|
||||
|
||||
bool isCGCursorVisible()
|
||||
{
|
||||
return CGCursorIsVisible();
|
||||
}
|
||||
|
||||
void hideNSCursorTillMove(bool hide)
|
||||
{
|
||||
[NSCursor setHiddenUntilMouseMoves:hide];
|
||||
|
|
|
|||
|
|
@ -352,6 +352,18 @@ void callMouseMoved(float *pos, MASK mask)
|
|||
//gWindowImplementation->getCallbacks()->handleScrollWheel(gWindowImplementation, 0);
|
||||
}
|
||||
|
||||
void callMouseDragged(float *pos, MASK mask)
|
||||
{
|
||||
LLCoordGL outCoords;
|
||||
outCoords.mX = ll_round(pos[0]);
|
||||
outCoords.mY = ll_round(pos[1]);
|
||||
float deltas[2];
|
||||
gWindowImplementation->getMouseDeltas(deltas);
|
||||
outCoords.mX += deltas[0];
|
||||
outCoords.mY += deltas[1];
|
||||
gWindowImplementation->getCallbacks()->handleMouseDragged(gWindowImplementation, outCoords, gKeyboard->currentMask(TRUE));
|
||||
}
|
||||
|
||||
void callScrollMoved(float delta)
|
||||
{
|
||||
gWindowImplementation->getCallbacks()->handleScrollWheel(gWindowImplementation, delta);
|
||||
|
|
@ -1462,8 +1474,16 @@ void LLWindowMacOSX::updateCursor()
|
|||
mNextCursor = UI_CURSOR_WORKING;
|
||||
}
|
||||
|
||||
if(mCurrentCursor == mNextCursor)
|
||||
return;
|
||||
if(mCurrentCursor == mNextCursor)
|
||||
{
|
||||
if(mCursorHidden && isCGCursorVisible())
|
||||
{
|
||||
hideNSCursor();
|
||||
mHideCursorPermanent = TRUE;
|
||||
adjustCursorDecouple();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// RN: replace multi-drag cursors with single versions
|
||||
if (mNextCursor == UI_CURSOR_ARROWDRAGMULTI)
|
||||
|
|
|
|||
|
|
@ -6913,6 +6913,17 @@
|
|||
<key>Value</key>
|
||||
<integer>7</integer>
|
||||
</map>
|
||||
<key>InventoryTrashMaxCapacity</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum capacity of the Trash folder. User will ve offered to clean it up when exceeded.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>5000</integer>
|
||||
</map>
|
||||
<key>MarketplaceListingsSortOrder</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -9389,6 +9400,28 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>NotifyMoneySpend</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Pop up notifications when spending L$</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>NotifyMoneyReceived</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Pop up notifications when receiving L$</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>NotifyTipDuration</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
|
|||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
|
|||
// *TODO: Consider getting avatar icon/badge directly from
|
||||
// People API, rather than sending AvatarPropertyRequest
|
||||
// messages. People API already hits the user table.
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
app->addObserver(mAvatarId, this);
|
||||
app->sendAvatarPropertiesRequest(mAvatarId);
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ bool LLAvatarIconCtrl::updateFromCache()
|
|||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,6 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p)
|
|||
void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
LLTextEditor::reshape(width, height, called_from_parent);
|
||||
|
||||
hideOrShowExpandTextAsNeeded();
|
||||
}
|
||||
|
||||
void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params)
|
||||
|
|
@ -298,6 +296,12 @@ void LLExpandableTextBox::updateTextBoxRect()
|
|||
|
||||
mTextBox->reshape(rc.getWidth(), rc.getHeight());
|
||||
mTextBox->setRect(rc);
|
||||
// *HACK
|
||||
// hideExpandText brakes text styles (replaces hyper-links with plain text), see ticket EXT-3290
|
||||
// Also text segments are not removed properly. Same issue at expandTextBox().
|
||||
// So set text again to make text box re-apply styles and clear segments.
|
||||
// *TODO Find a solution that does not involve text segment.
|
||||
mTextBox->setText(mText);
|
||||
}
|
||||
|
||||
S32 LLExpandableTextBox::recalculateTextDelta(S32 text_delta)
|
||||
|
|
@ -403,8 +407,6 @@ void LLExpandableTextBox::collapseTextBox()
|
|||
setRect(mCollapsedRect);
|
||||
|
||||
updateTextBoxRect();
|
||||
|
||||
gViewerWindow->removePopup(this);
|
||||
}
|
||||
|
||||
void LLExpandableTextBox::onFocusLost()
|
||||
|
|
@ -423,13 +425,19 @@ void LLExpandableTextBox::onTopLost()
|
|||
|
||||
void LLExpandableTextBox::updateTextShape()
|
||||
{
|
||||
// I guess this should be done on every reshape(),
|
||||
// but adding this code to reshape() currently triggers bug VWR-26455,
|
||||
// which makes the text virtually unreadable.
|
||||
llassert(!mExpanded);
|
||||
updateTextBoxRect();
|
||||
}
|
||||
|
||||
void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent)
|
||||
{
|
||||
mExpanded = false;
|
||||
LLUICtrl::reshape(width, height, called_from_parent);
|
||||
updateTextBoxRect();
|
||||
|
||||
gViewerWindow->removePopup(this);
|
||||
}
|
||||
|
||||
void LLExpandableTextBox::setValue(const LLSD& value)
|
||||
{
|
||||
collapseTextBox();
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ public:
|
|||
* *HACK: Update the inner textbox shape.
|
||||
*/
|
||||
void updateTextShape();
|
||||
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
|
||||
/**
|
||||
* Draws text box, collapses text box if its expanded and its parent's position changed
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p)
|
|||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
//TODO: Consider implementing dedicated setDefault() function instead of passing priority for local file
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +74,11 @@ LLGroupIconCtrl::~LLGroupIconCtrl()
|
|||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
void LLGroupIconCtrl::setIconId(const LLSD& value)
|
||||
{
|
||||
LLIconCtrl::setValue(value);
|
||||
}
|
||||
|
||||
void LLGroupIconCtrl::setValue(const LLSD& value)
|
||||
{
|
||||
if (value.isUUID())
|
||||
|
|
@ -91,7 +97,7 @@ void LLGroupIconCtrl::setValue(const LLSD& value)
|
|||
// Check if cache already contains image_id for that group
|
||||
if (!updateFromCache())
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
gm->addObserver(this);
|
||||
gm->sendGroupPropertiesRequest(mGroupId);
|
||||
}
|
||||
|
|
@ -122,7 +128,7 @@ bool LLGroupIconCtrl::updateFromCache()
|
|||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName);
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
}
|
||||
|
||||
if (mDrawTooltip && !group_data->mName.empty())
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ public:
|
|||
*/
|
||||
virtual void setValue(const LLSD& value);
|
||||
|
||||
void setIconId(const LLSD& value);
|
||||
|
||||
// LLGroupMgrObserver observer trigger
|
||||
virtual void changed(LLGroupChange gc);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
// libs
|
||||
#include "llbutton.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llgroupiconctrl.h"
|
||||
#include "llmenugl.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltextutil.h"
|
||||
|
|
@ -407,7 +407,7 @@ LLGroupListItem::~LLGroupListItem()
|
|||
//virtual
|
||||
BOOL LLGroupListItem::postBuild()
|
||||
{
|
||||
mGroupIcon = getChild<LLIconCtrl>("group_icon");
|
||||
mGroupIcon = getChild<LLGroupIconCtrl>("group_icon");
|
||||
mGroupNameBox = getChild<LLTextBox>("group_name");
|
||||
|
||||
mInfoBtn = getChild<LLButton>("info_btn");
|
||||
|
|
@ -469,7 +469,7 @@ void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id)
|
|||
{
|
||||
if (group_icon_id.notNull())
|
||||
{
|
||||
mGroupIcon->setValue(group_icon_id);
|
||||
mGroupIcon->setIconId(group_icon_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ private:
|
|||
};
|
||||
|
||||
class LLButton;
|
||||
class LLIconCtrl;
|
||||
class LLGroupIconCtrl;
|
||||
class LLTextBox;
|
||||
|
||||
class LLGroupListItem : public LLPanel
|
||||
|
|
@ -130,7 +130,7 @@ private:
|
|||
|
||||
LLTextBox* mGroupNameBox;
|
||||
LLUUID mGroupID;
|
||||
LLIconCtrl* mGroupIcon;
|
||||
LLGroupIconCtrl* mGroupIcon;
|
||||
LLButton* mInfoBtn;
|
||||
|
||||
std::string mGroupName;
|
||||
|
|
|
|||
|
|
@ -2191,6 +2191,7 @@ BOOL LLItemBridge::removeItem()
|
|||
}
|
||||
|
||||
LLNotifications::instance().forceResponse(params, 0);
|
||||
model->checkTrashOverflow();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -854,6 +854,22 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
|
|||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
U32 LLInventoryModel::getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit)
|
||||
{
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
gInventory.collectDescendents(id, cats, items, LLInventoryModel::INCLUDE_TRASH);
|
||||
|
||||
U32 items_found = items.size() + cats.size();
|
||||
|
||||
for (U32 i = 0; i < cats.size() && items_found <= max_item_limit; ++i)
|
||||
{
|
||||
items_found += getDescendentsCountRecursive(cats[i]->getUUID(), max_item_limit - items_found);
|
||||
}
|
||||
|
||||
return items_found;
|
||||
}
|
||||
|
||||
void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask)
|
||||
{
|
||||
const LLInventoryObject *obj = getObject(object_id);
|
||||
|
|
@ -3495,6 +3511,7 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
|
|||
//----------------------------------------------------------------------------
|
||||
|
||||
// Trash: LLFolderType::FT_TRASH, "ConfirmEmptyTrash"
|
||||
// Trash: LLFolderType::FT_TRASH, "TrashIsFull" when trash exceeds maximum capacity
|
||||
// Lost&Found: LLFolderType::FT_LOST_AND_FOUND, "ConfirmEmptyLostAndFound"
|
||||
|
||||
bool LLInventoryModel::callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type)
|
||||
|
|
@ -3576,6 +3593,8 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id)
|
|||
changeCategoryParent(cat, trash_id, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
checkTrashOverflow();
|
||||
}
|
||||
|
||||
void LLInventoryModel::removeObject(const LLUUID& object_id)
|
||||
|
|
@ -3606,6 +3625,16 @@ void LLInventoryModel::removeObject(const LLUUID& object_id)
|
|||
}
|
||||
}
|
||||
|
||||
void LLInventoryModel::checkTrashOverflow()
|
||||
{
|
||||
static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity");
|
||||
const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH);
|
||||
if (getDescendentsCountRecursive(trash_id, trash_max_capacity) >= trash_max_capacity)
|
||||
{
|
||||
gInventory.emptyFolderType("TrashIsFull", LLFolderType::FT_TRASH);
|
||||
}
|
||||
}
|
||||
|
||||
const LLUUID &LLInventoryModel::getRootFolderID() const
|
||||
{
|
||||
return mRootFolderID;
|
||||
|
|
|
|||
|
|
@ -287,6 +287,9 @@ public:
|
|||
item_array_t collectLinkedItems(const LLUUID& item_id,
|
||||
const LLUUID& start_folder_id = LLUUID::null);
|
||||
// </FS:Ansariel>
|
||||
|
||||
private:
|
||||
U32 getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Find
|
||||
|
|
@ -438,6 +441,8 @@ public:
|
|||
/// removeItem() or removeCategory(), whichever is appropriate
|
||||
void removeObject(const LLUUID& object_id);
|
||||
|
||||
void checkTrashOverflow();
|
||||
|
||||
protected:
|
||||
void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ LLLocalBitmap::~LLLocalBitmap()
|
|||
}
|
||||
|
||||
// delete self from gimagelist
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_STANDARD);
|
||||
gTextureList.deleteImage(image);
|
||||
|
||||
if (image)
|
||||
|
|
@ -216,7 +216,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
|
|||
texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image);
|
||||
texture->ref();
|
||||
|
||||
gTextureList.addImage(texture, TEX_LIST_DISCARD);
|
||||
gTextureList.addImage(texture, TEX_LIST_STANDARD);
|
||||
|
||||
if (optional_firstupdate != UT_FIRSTUSE)
|
||||
{
|
||||
|
|
@ -224,7 +224,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
|
|||
replaceIDs(old_id, mWorldID);
|
||||
|
||||
// remove old_id from gimagelist
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
|
||||
if (image != NULL)
|
||||
{
|
||||
gTextureList.deleteImage(image);
|
||||
|
|
@ -393,7 +393,7 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id)
|
|||
std::vector<LLViewerObject*> LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32 channel)
|
||||
{
|
||||
std::vector<LLViewerObject*> obj_list;
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
|
||||
|
||||
for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++)
|
||||
{
|
||||
|
|
@ -511,7 +511,7 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel)
|
|||
|
||||
void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
|
||||
{
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
|
||||
for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++)
|
||||
{
|
||||
LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter];
|
||||
|
|
|
|||
|
|
@ -2360,7 +2360,7 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
|
|||
LLTextureEntry *te = object->getTE(te_index);
|
||||
if (te)
|
||||
{
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;
|
||||
if(!tex)
|
||||
{
|
||||
tex = LLViewerFetchedTexture::sDefaultImagep;
|
||||
|
|
|
|||
|
|
@ -1453,7 +1453,7 @@ void LLTextureCtrl::setOnTextureSelectedCallback(texture_selected_callback cb)
|
|||
|
||||
void LLTextureCtrl::setImageAssetName(const std::string& name)
|
||||
{
|
||||
LLPointer<LLUIImage> imagep = LLUI::getUIImage(name);
|
||||
LLPointer<LLUIImage> imagep = LLUI::getUIImage(name, LLGLTexture::BOOST_PREVIEW);
|
||||
if(imagep)
|
||||
{
|
||||
LLViewerFetchedTexture* pTexture = dynamic_cast<LLViewerFetchedTexture*>(imagep->getImage().get());
|
||||
|
|
|
|||
|
|
@ -4464,7 +4464,7 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker)
|
|||
mRefetchedAllData += worker->mFormattedImage->getDataSize();
|
||||
|
||||
// refetch list only requests/creates normal images, so requesting ui='false'
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_STANDARD);
|
||||
if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end())
|
||||
{
|
||||
if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "llfocusmgr.h"
|
||||
|
||||
#include "llbutton.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llgroupiconctrl.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llnotifications.h"
|
||||
|
|
@ -70,8 +70,10 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi
|
|||
mGroupID = payload["group_id"].asUUID();
|
||||
|
||||
//group icon
|
||||
LLIconCtrl* pGroupIcon = getChild<LLIconCtrl>("group_icon", TRUE);
|
||||
pGroupIcon->setValue(groupData.mInsigniaID);
|
||||
LLGroupIconCtrl* pGroupIcon = getChild<LLGroupIconCtrl>("group_icon", TRUE);
|
||||
|
||||
// We should already have this data preloaded, so no sense in setting icon through setValue(group_id)
|
||||
pGroupIcon->setIconId(groupData.mInsigniaID);
|
||||
|
||||
//header title
|
||||
std::string from_name = payload["sender_name"].asString();
|
||||
|
|
|
|||
|
|
@ -7124,6 +7124,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||
bool you_paid_someone = (source_id == gAgentID);
|
||||
if (you_paid_someone)
|
||||
{
|
||||
if(!gSavedSettings.getBOOL("NotifyMoneySpend"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
args["NAME"] = balance_change_in_chat ? "%s" : dest_slurl;
|
||||
is_name_group = is_dest_group;
|
||||
name_id = dest_id;
|
||||
|
|
@ -7241,6 +7245,10 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg)
|
|||
else
|
||||
{
|
||||
// ...someone paid you
|
||||
if(!gSavedSettings.getBOOL("NotifyMoneyReceived"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
args["NAME"] = balance_change_in_chat ? "%s" : source_slurl;
|
||||
is_name_group = is_source_group;
|
||||
name_id = source_id;
|
||||
|
|
|
|||
|
|
@ -3434,7 +3434,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
|
|||
|
||||
setCategory(LLGLTexture::MEDIA);
|
||||
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
|
||||
if(tex) //this media is a parcel media for tex.
|
||||
{
|
||||
tex->setParcelMedia(this);
|
||||
|
|
@ -3444,7 +3444,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
|
|||
//virtual
|
||||
LLViewerMediaTexture::~LLViewerMediaTexture()
|
||||
{
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
|
||||
if(tex) //this media is a parcel media for tex.
|
||||
{
|
||||
tex->setParcelMedia(NULL);
|
||||
|
|
@ -3499,7 +3499,7 @@ BOOL LLViewerMediaTexture::findFaces()
|
|||
|
||||
BOOL ret = TRUE;
|
||||
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
|
||||
LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
|
||||
if(tex) //this media is a parcel media for tex.
|
||||
{
|
||||
for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch)
|
||||
|
|
@ -3608,7 +3608,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep)
|
|||
const LLTextureEntry* te = facep->getTextureEntry();
|
||||
if(te && te->getID().notNull())
|
||||
{
|
||||
LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
|
||||
LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD);
|
||||
if(tex)
|
||||
{
|
||||
mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it.
|
||||
|
|
@ -3637,7 +3637,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep)
|
|||
const LLTextureEntry* te = facep->getTextureEntry();
|
||||
if(te && te->getID().notNull())
|
||||
{
|
||||
LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD);
|
||||
LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD);
|
||||
if(tex)
|
||||
{
|
||||
for(std::list< LLPointer<LLViewerTexture> >::iterator iter = mTextureList.begin();
|
||||
|
|
@ -3777,10 +3777,10 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep)
|
|||
const LLTextureEntry* te = facep->getTextureEntry();
|
||||
if(te)
|
||||
{
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL;
|
||||
LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL;
|
||||
if(!tex && te->getID() != mID)//try parcel media.
|
||||
{
|
||||
tex = gTextureList.findImage(mID, TEX_LIST_DISCARD);
|
||||
tex = gTextureList.findImage(mID, TEX_LIST_STANDARD);
|
||||
}
|
||||
if(!tex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,20 +75,14 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images");
|
|||
|
||||
ETexListType get_element_type(S32 priority)
|
||||
{
|
||||
// don't discard flag can be used in some cases, but it usually is not set yet
|
||||
if (priority == LLViewerFetchedTexture::BOOST_ICON
|
||||
|| priority == LLViewerFetchedTexture::BOOST_UI)
|
||||
{
|
||||
return TEX_LIST_UI;
|
||||
}
|
||||
return TEX_LIST_DISCARD;
|
||||
return (priority == LLViewerFetchedTexture::BOOST_ICON) ? TEX_LIST_SCALE : TEX_LIST_STANDARD;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
LLTextureKey::LLTextureKey()
|
||||
: textureId(LLUUID::null),
|
||||
textureType(TEX_LIST_DISCARD)
|
||||
textureType(TEX_LIST_STANDARD)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -582,7 +576,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
|
|||
|
||||
void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output)
|
||||
{
|
||||
LLTextureKey search_key(image_id, TEX_LIST_DISCARD);
|
||||
LLTextureKey search_key(image_id, TEX_LIST_STANDARD);
|
||||
uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key);
|
||||
while (iter != mUUIDMap.end() && iter->first.textureId == image_id)
|
||||
{
|
||||
|
|
@ -1658,14 +1652,14 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **
|
|||
LLUUID image_id;
|
||||
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
|
||||
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_STANDARD);
|
||||
if( image )
|
||||
{
|
||||
LL_WARNS() << "Image not in db" << LL_ENDL;
|
||||
image->setIsMissingAsset();
|
||||
}
|
||||
|
||||
image = gTextureList.findImage(image_id, TEX_LIST_UI);
|
||||
image = gTextureList.findImage(image_id, TEX_LIST_SCALE);
|
||||
if (image)
|
||||
{
|
||||
LL_WARNS() << "Icon not in db" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ typedef void (*LLImageCallback)(BOOL success,
|
|||
|
||||
enum ETexListType
|
||||
{
|
||||
TEX_LIST_DISCARD = 0,
|
||||
TEX_LIST_UI
|
||||
TEX_LIST_STANDARD = 0,
|
||||
TEX_LIST_SCALE
|
||||
};
|
||||
|
||||
struct LLTextureKey
|
||||
|
|
|
|||
|
|
@ -1107,7 +1107,16 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
|
|||
|
||||
BOOL LLViewerWindow::handleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
{
|
||||
BOOL down = TRUE;
|
||||
mAllowMouseDragging = FALSE;
|
||||
if (!mMouseDownTimer.getStarted())
|
||||
{
|
||||
mMouseDownTimer.start();
|
||||
}
|
||||
else
|
||||
{
|
||||
mMouseDownTimer.reset();
|
||||
}
|
||||
BOOL down = TRUE;
|
||||
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
|
||||
}
|
||||
|
||||
|
|
@ -1126,7 +1135,11 @@ BOOL LLViewerWindow::handleDoubleClick(LLWindow *window, LLCoordGL pos, MASK ma
|
|||
|
||||
BOOL LLViewerWindow::handleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
{
|
||||
BOOL down = FALSE;
|
||||
if (mMouseDownTimer.getStarted())
|
||||
{
|
||||
mMouseDownTimer.stop();
|
||||
}
|
||||
BOOL down = FALSE;
|
||||
return handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_LEFT,down);
|
||||
}
|
||||
|
||||
|
|
@ -1358,6 +1371,22 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
|
|||
}
|
||||
}
|
||||
|
||||
void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask)
|
||||
{
|
||||
if (mMouseDownTimer.getStarted())
|
||||
{
|
||||
if (mMouseDownTimer.getElapsedTimeF32() > 0.1)
|
||||
{
|
||||
mAllowMouseDragging = TRUE;
|
||||
mMouseDownTimer.stop();
|
||||
}
|
||||
}
|
||||
if(mAllowMouseDragging || !LLToolCamera::getInstance()->hasMouseCapture())
|
||||
{
|
||||
handleMouseMove(window, pos, mask);
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerWindow::handleMouseLeave(LLWindow *window)
|
||||
{
|
||||
// Note: we won't get this if we have captured the mouse.
|
||||
|
|
@ -1687,6 +1716,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
mMiddleMouseDown(FALSE),
|
||||
mRightMouseDown(FALSE),
|
||||
mMouseInWindow( FALSE ),
|
||||
mAllowMouseDragging(TRUE),
|
||||
mMouseDownTimer(),
|
||||
mLastMask( MASK_NONE ),
|
||||
mToolStored( NULL ),
|
||||
mHideCursorPermanent( FALSE ),
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ public:
|
|||
/*virtual*/ BOOL handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask);
|
||||
/*virtual*/ LLWindowCallbacks::DragNDropResult handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, LLWindowCallbacks::DragNDropAction action, std::string data);
|
||||
void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask);
|
||||
void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask);
|
||||
/*virtual*/ void handleMouseLeave(LLWindow *window);
|
||||
/*virtual*/ void handleResize(LLWindow *window, S32 x, S32 y);
|
||||
/*virtual*/ void handleFocus(LLWindow *window);
|
||||
|
|
@ -470,6 +471,8 @@ private:
|
|||
|
||||
BOOL mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse.
|
||||
BOOL mFocusCycleMode;
|
||||
BOOL mAllowMouseDragging;
|
||||
LLFrameTimer mMouseDownTimer;
|
||||
typedef std::set<LLHandle<LLView> > view_handle_set_t;
|
||||
view_handle_set_t mMouseHoverViews;
|
||||
|
||||
|
|
|
|||
|
|
@ -2087,7 +2087,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU
|
|||
uuid == IMG_INVISIBLE)
|
||||
{
|
||||
// Should already exist, don't need to find it on sim or baked-texture host.
|
||||
result = gTextureList.findImage(uuid, TEX_LIST_DISCARD);
|
||||
result = gTextureList.findImage(uuid, TEX_LIST_STANDARD);
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
|
|
@ -4822,7 +4822,7 @@ bool LLVOAvatar::allTexturesCompletelyDownloaded(std::set<LLUUID>& ids) const
|
|||
{
|
||||
for (std::set<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
|
||||
if (imagep && imagep->getDiscardLevel()!=0)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -4894,7 +4894,7 @@ S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set<LLUUID>& ids)
|
|||
S32Bytes result(0);
|
||||
for (std::set<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
|
||||
{
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
|
||||
if (imagep)
|
||||
{
|
||||
result += imagep->getTextureMemory();
|
||||
|
|
@ -4982,7 +4982,7 @@ void LLVOAvatar::releaseOldTextures()
|
|||
{
|
||||
if (new_texture_ids.find(*it) == new_texture_ids.end())
|
||||
{
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD);
|
||||
LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD);
|
||||
if (imagep)
|
||||
{
|
||||
current_texture_mem += imagep->getTextureMemory();
|
||||
|
|
|
|||
|
|
@ -6257,6 +6257,18 @@ Are you sure you want to permanently delete the contents of your Trash?
|
|||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="TrashIsFull"
|
||||
type="alertmodal">
|
||||
Your trash is overflowing. This may cause problems logging in.
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="I will empty trash later"
|
||||
yestext="Empty trash now"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ConfirmClearBrowserCache"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
top="0"
|
||||
visible="false"
|
||||
width="320" />
|
||||
<icon
|
||||
<group_icon
|
||||
height="20"
|
||||
image_name="Generic_Group"
|
||||
name="group_icon"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
name="header"
|
||||
top="0"
|
||||
width="305">
|
||||
<icon
|
||||
<group_icon
|
||||
follows="all"
|
||||
height="20"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue