Shift Right click now works on profile pictures, fixed minor message system bug where packets going in would be considered spoofed packets
This commit is contained in:
@@ -697,7 +697,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fak
|
||||
mCurrentRecvPacketID = ntohl(*((U32*)(&buffer[1])));
|
||||
// <edit>
|
||||
BOOL spoofed_packet = FALSE;
|
||||
if(mSpoofProtectionLevel > 0)
|
||||
if(!faked_message && mSpoofProtectionLevel > 0)
|
||||
{
|
||||
S32 len = receive_size;
|
||||
U32 message = 0;
|
||||
|
||||
@@ -1139,8 +1139,12 @@ void LLTextureCtrl::setEnabled( BOOL enabled )
|
||||
}
|
||||
|
||||
mCaption->setEnabled( enabled );
|
||||
|
||||
mEnable = enabled;
|
||||
// <edit>
|
||||
/*
|
||||
LLView::setEnabled( enabled );
|
||||
*/
|
||||
// </edit>
|
||||
}
|
||||
|
||||
void LLTextureCtrl::setValid(BOOL valid )
|
||||
@@ -1254,29 +1258,34 @@ BOOL LLTextureCtrl::handleHover(S32 x, S32 y, MASK mask)
|
||||
|
||||
BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
// <edit>
|
||||
if(!mEnable) return FALSE;
|
||||
|
||||
BOOL handled = LLUICtrl::handleMouseDown( x, y , mask );
|
||||
if( handled )
|
||||
{
|
||||
// <edit>
|
||||
if( mask & MASK_CONTROL )
|
||||
{
|
||||
LLLocalInventory::addItem(mImageAssetID.asString(), (int)LLAssetType::AT_TEXTURE, mImageAssetID, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// </edit>
|
||||
showPicker(FALSE);
|
||||
showPicker(FALSE);
|
||||
|
||||
//grab textures first...
|
||||
gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE));
|
||||
//...then start full inventory fetch.
|
||||
gInventory.startBackgroundFetch();
|
||||
//<edit>
|
||||
}
|
||||
//grab textures first...
|
||||
gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLAssetType::AT_TEXTURE));
|
||||
//...then start full inventory fetch.
|
||||
gInventory.startBackgroundFetch();
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
// <edit>
|
||||
BOOL LLTextureCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if( mask & MASK_SHIFT )
|
||||
{
|
||||
LLLocalInventory::addItem(mImageAssetID.asString(), (int)LLAssetType::AT_TEXTURE, mImageAssetID, true);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
// </edit>
|
||||
|
||||
void LLTextureCtrl::onFloaterClose()
|
||||
{
|
||||
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
|
||||
@@ -1293,8 +1302,8 @@ void LLTextureCtrl::onFloaterClose()
|
||||
void LLTextureCtrl::onFloaterCommit(ETexturePickOp op)
|
||||
{
|
||||
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
|
||||
|
||||
if( floaterp && getEnabled())
|
||||
// <edit> mEnable getEnabled()
|
||||
if( floaterp && mEnable)
|
||||
{
|
||||
mDirty = (op != TEXTURE_CANCEL);
|
||||
if( floaterp->isDirty() )
|
||||
@@ -1327,7 +1336,8 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
|
||||
mImageItemID.setNull();
|
||||
mImageAssetID = asset_id;
|
||||
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
|
||||
if( floaterp && getEnabled() )
|
||||
// <edit> mEnable getEnabled()
|
||||
if( floaterp && mEnable )
|
||||
{
|
||||
floaterp->setImageID( asset_id );
|
||||
floaterp->setDirty( FALSE );
|
||||
@@ -1345,8 +1355,9 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
// this downcast may be invalid - but if the second test below
|
||||
// returns true, then the cast was valid, and we can perform
|
||||
// the third test without problems.
|
||||
LLInventoryItem* item = (LLInventoryItem*)cargo_data;
|
||||
if (getEnabled() && (cargo_type == DAD_TEXTURE) && allowDrop(item))
|
||||
LLInventoryItem* item = (LLInventoryItem*)cargo_data;
|
||||
// <edit> mEnable getEnabled()
|
||||
if (mEnable && (cargo_type == DAD_TEXTURE) && allowDrop(item))
|
||||
{
|
||||
if (drop)
|
||||
{
|
||||
|
||||
@@ -79,6 +79,9 @@ public:
|
||||
static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
|
||||
|
||||
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||
// <edit>
|
||||
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
|
||||
// </edit>
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
|
||||
EAcceptance *accept,
|
||||
@@ -187,6 +190,9 @@ private:
|
||||
BOOL mValid;
|
||||
BOOL mDirty;
|
||||
BOOL mShowLoadingPlaceholder;
|
||||
// <edit>
|
||||
BOOL mEnable;
|
||||
// </edit>
|
||||
std::string mLoadingPlaceholderString;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user