diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index b2fa0ed315..eb70b78a36 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -112,10 +112,10 @@ void LLPngWrapper::readDataCallback(png_structp png_ptr, png_bytep dest, png_siz void LLPngWrapper::writeDataCallback(png_structp png_ptr, png_bytep src, png_size_t length) { PngDataInfo *dataInfo = (PngDataInfo *) png_get_io_ptr(png_ptr); - if (dataInfo->mOffset + length > dataInfo->mDataSize) - { - png_error(png_ptr, "Data write error. Requested data size exceeds available data size."); - return; + if (dataInfo->mOffset + length > dataInfo->mDataSize) + { + png_error(png_ptr, "Data write error. Requested data size exceeds available data size."); + return; } U8 *dest = &dataInfo->mData[dataInfo->mOffset]; memcpy(dest, src, length); diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 700acab092..02ad0d3a44 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -501,9 +501,10 @@ BOOL LLTemplateMessageReader::decodeTemplate( } else { - LL_WARNS() << "Message #" << std::hex << num << std::dec - << " received but not registered!" << LL_ENDL; - gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); + // MAINT-7482 - make viewer more tolerant of unknown messages. + LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec + << " received but not registered!" << LL_ENDL; + //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); return(FALSE); } diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 899685ea9a..d929e6b5ba 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -97,6 +97,10 @@ static LLChatTypeTrigger sChatTypeTriggers[] = { { "/shout" , CHAT_TYPE_SHOUT} }; +bool cb_do_nothing() +{ + return false; +} LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd) : LLFloaterIMSessionTab(LLSD(LLUUID::null)), @@ -107,6 +111,12 @@ LLFloaterIMNearbyChat::LLFloaterIMNearbyChat(const LLSD& llsd) mIsP2PChat = false; mIsNearbyChat = true; mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); + + // Required by LLFloaterIMSessionTab::mGearBtn + // But nearby floater has no 'per agent' menu items, + mEnableCallbackRegistrar.add("Avatar.EnableGearItem", boost::bind(&cb_do_nothing)); + mCommitCallbackRegistrar.add("Avatar.GearDoToSelected", boost::bind(&cb_do_nothing)); + mEnableCallbackRegistrar.add("Avatar.CheckGearItem", boost::bind(&cb_do_nothing)); } //static diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 3d52f44e39..492d64102e 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -48,6 +48,10 @@ const F32 REFRESH_INTERVAL = 1.0f; +void cb_group_do_nothing() +{ +} + LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) : LLTransientDockableFloater(NULL, false, session_id), mIsP2PChat(false), @@ -84,6 +88,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2)); mEnableCallbackRegistrar.add("Avatar.EnableItem", boost::bind(&LLFloaterIMSessionTab::enableContextMenuItem, this, _2)); mCommitCallbackRegistrar.add("Avatar.DoToSelected", boost::bind(&LLFloaterIMSessionTab::doToSelected, this, _2)); + mCommitCallbackRegistrar.add("Group.DoToSelected", boost::bind(&cb_group_do_nothing)); } LLFloaterIMSessionTab::~LLFloaterIMSessionTab() diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index eb437802d5..de2c6cdc52 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1209,12 +1209,13 @@ void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) // return success; //} // -////Check if failed due to insuficient memory +////Check if failed due to insufficient memory //BOOL LLSnapshotLivePreview::saveLocal(LLPointer mFormattedImage) //{ -// BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage); +// BOOL insufficient_memory; +// BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage, FALSE, insufficient_memory); // -// if (!success) +// if (insufficient_memory) // { // std::string lastSnapshotDir = LLViewerWindow::getLastSnapshotDir(); // diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index f41b5d27b7..d8aa49ab07 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -499,39 +499,53 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) return; } + //-------------------------------------------------- + // Determine target mode + //-------------------------------------------------- + bool vertical_dragging = false; + bool spin_grabbing = false; + if ((mask == MASK_VERTICAL) + || (gGrabBtnVertical && (mask != MASK_SPIN))) + { + vertical_dragging = TRUE; + } + else if ((mask == MASK_SPIN) + || (gGrabBtnSpin && (mask != MASK_VERTICAL))) + { + spin_grabbing = TRUE; + } + //-------------------------------------------------- // Toggle spinning //-------------------------------------------------- - if (mSpinGrabbing && !(mask == MASK_SPIN) && !gGrabBtnSpin) + if (mSpinGrabbing && !spin_grabbing) { - // user released ALT key, stop spinning + // user released or switched mask key(s), stop spinning stopSpin(); } - else if (!mSpinGrabbing && (mask == MASK_SPIN) ) + else if (!mSpinGrabbing && spin_grabbing) { - // user pressed ALT key, start spinning + // user pressed mask key(s), start spinning startSpin(); } + mSpinGrabbing = spin_grabbing; //-------------------------------------------------- // Toggle vertical dragging //-------------------------------------------------- - if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical) + if (mVerticalDragging && !vertical_dragging) { // ...switch to horizontal dragging - mVerticalDragging = FALSE; - mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp); mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal(); } - else if (!mVerticalDragging && (mask == MASK_VERTICAL) ) + else if (!mVerticalDragging && vertical_dragging) { // ...switch to vertical dragging - mVerticalDragging = TRUE; - mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp); mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal(); } + mVerticalDragging = vertical_dragging; const F32 RADIANS_PER_PIXEL_X = 0.01f; const F32 RADIANS_PER_PIXEL_Y = 0.01f; @@ -782,12 +796,13 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) //-------------------------------------------------- // Toggle vertical dragging //-------------------------------------------------- - if (mVerticalDragging && !(mask == MASK_VERTICAL) && !gGrabBtnVertical) + if (!(mask == MASK_VERTICAL) && !gGrabBtnVertical) { mVerticalDragging = FALSE; } - else if (!mVerticalDragging && (mask == MASK_VERTICAL) ) + else if ((gGrabBtnVertical && (mask != MASK_SPIN)) + || (mask == MASK_VERTICAL)) { mVerticalDragging = TRUE; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index aa518986f0..bdd98e57cb 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4922,10 +4922,13 @@ void LLViewerWindow::saveImageCallback(const std::string& filename, LLImageForma // Saves an image to the harddrive as "SnapshotX" where X >= 1. // Threaded filepickers -//BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker) +//BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory) void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker, boost::function callback) // { + // Threaded filepickers + //insufficient_memory = FALSE; + if (!image) { LL_WARNS() << "No image to save" << LL_ENDL; @@ -4985,6 +4988,7 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke //#endif // if (b_space.free < image->getDataSize()) // { +// insufficient_memory = TRUE; // return FALSE; // } //// Look for an unused file name diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index a4085e7e77..94c0c9ce27 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -354,7 +354,7 @@ public: BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); } void resetSnapshotLoc() const { sSnapshotDir.clear(); } // Threaded filepickers - //BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false); + BOOL saveImageNumbered(LLImageFormatted *image, BOOL force_picker, BOOL& insufficient_memory); void saveImageNumbered(LLImageFormatted *image, bool force_picker = false, boost::function callback = NULL); void saveImageCallback(const std::string& filename, LLImageFormatted* image, const std::string& extension, boost::function callback); //