Merge viewer-lynx
commit
c07194fc10
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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<LLImageFormatted> 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();
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4922,10 +4922,13 @@ void LLViewerWindow::saveImageCallback(const std::string& filename, LLImageForma
|
|||
|
||||
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
|
||||
// <FS:Ansariel> 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<void(bool)> callback)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// <FS:Ansariel> 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
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ public:
|
|||
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
|
||||
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
|
||||
// <FS:Ansariel> 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<void(bool)> callback = NULL);
|
||||
void saveImageCallback(const std::string& filename, LLImageFormatted* image, const std::string& extension, boost::function<void(bool)> callback);
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue