From 1355578332b4225488918d892e21c84634fb1b40 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 7 Oct 2014 16:29:45 -0400 Subject: track avatar size info in avatar debug line --- indra/newview/llvoavatar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index dfb9bb54e7..3763ea79c6 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3212,6 +3212,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { debug_line += llformat(" - cof rcv:%d", last_received_cof_version); } + debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]); addDebugText(debug_line); } if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) -- cgit v1.2.3 From 2be54fbe6f7e19a1e924f1d62e4327da2406310d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Oct 2014 11:45:12 -0400 Subject: Switched to keying joint offsets by mesh id --- indra/llcharacter/lljoint.cpp | 35 ++++++++++++++++----------------- indra/llcharacter/lljoint.h | 9 ++++----- indra/newview/llfloatermodelpreview.cpp | 4 +++- indra/newview/llvoavatar.cpp | 8 ++++---- indra/newview/llvoavatar.h | 2 +- indra/newview/llvovolume.cpp | 4 ++-- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index bad9c198ad..97293bf134 100755 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -45,9 +45,9 @@ LLJoint::AttachmentOverrideRecord::AttachmentOverrideRecord() } template -bool attachment_map_iter_compare_name(const T& a, const T& b) +bool attachment_map_iter_compare_key(const T& a, const T& b) { - return a.second.name < b.second.name; + return a.first < b.first; } //----------------------------------------------------------------------------- @@ -257,61 +257,60 @@ void LLJoint::setPosition( const LLVector3& pos ) //-------------------------------------------------------------------- // addAttachmentPosOverride() //-------------------------------------------------------------------- -void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ) +void LLJoint::addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info ) { - if (attachment_name.empty()) + if (mesh_id.isNull()) { return; } if (m_attachmentOverrides.empty()) { - LL_DEBUGS("Avatar") << getName() << " saving m_posBeforeOverrides " << getPosition() << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " saving m_posBeforeOverrides " << getPosition() << LL_ENDL; m_posBeforeOverrides = getPosition(); } AttachmentOverrideRecord rec; - rec.name = attachment_name; rec.pos = pos; - m_attachmentOverrides[attachment_name] = rec; - LL_DEBUGS("Avatar") << getName() << " addAttachmentPosOverride for " << attachment_name << " pos " << pos << LL_ENDL; - updatePos(); + m_attachmentOverrides[mesh_id] = rec; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " addAttachmentPosOverride for mesh " << mesh_id << " pos " << pos << LL_ENDL; + updatePos(av_info); } //-------------------------------------------------------------------- // removeAttachmentPosOverride() //-------------------------------------------------------------------- -void LLJoint::removeAttachmentPosOverride( const std::string& attachment_name ) +void LLJoint::removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info ) { - if (attachment_name.empty()) + if (mesh_id.isNull()) { return; } - attachment_map_t::iterator it = m_attachmentOverrides.find(attachment_name); + attachment_map_t::iterator it = m_attachmentOverrides.find(mesh_id); if (it != m_attachmentOverrides.end()) { - LL_DEBUGS("Avatar") << getName() << " removeAttachmentPosOverride for " << attachment_name << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " removeAttachmentPosOverride for " << mesh_id << LL_ENDL; m_attachmentOverrides.erase(it); } - updatePos(); + updatePos(av_info); } //-------------------------------------------------------------------- // updatePos() //-------------------------------------------------------------------- -void LLJoint::updatePos() +void LLJoint::updatePos(const std::string& av_info) { LLVector3 pos; attachment_map_t::iterator it = std::max_element(m_attachmentOverrides.begin(), m_attachmentOverrides.end(), - attachment_map_iter_compare_name); + attachment_map_iter_compare_key); if (it != m_attachmentOverrides.end()) { AttachmentOverrideRecord& rec = it->second; - LL_DEBUGS("Avatar") << getName() << " updatePos, winner of " << m_attachmentOverrides.size() << " is attachment " << rec.name << " pos " << rec.pos << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updatePos, winner of " << m_attachmentOverrides.size() << " is mesh " << it->first << " pos " << rec.pos << LL_ENDL; pos = rec.pos; } else { - LL_DEBUGS("Avatar") << getName() << " updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; + LL_DEBUGS("Avatar") << "av " << av_info << " joint " << getName() << " updatePos, winner is posBeforeOverrides " << m_posBeforeOverrides << LL_ENDL; pos = m_posBeforeOverrides; } setPosition(pos); diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 0ef054d9c1..951cafad94 100755 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -103,13 +103,12 @@ public: { AttachmentOverrideRecord(); LLVector3 pos; - std::string name; }; - typedef std::map attachment_map_t; + typedef std::map attachment_map_t; attachment_map_t m_attachmentOverrides; LLVector3 m_posBeforeOverrides; - void updatePos(); + void updatePos(const std::string& av_info); public: LLJoint(); @@ -192,8 +191,8 @@ public: S32 getJointNum() const { return mJointNum; } - void addAttachmentPosOverride( const LLVector3& pos, const std::string& attachment_name ); - void removeAttachmentPosOverride( const std::string& attachment_name ); + void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info ); + void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info ); //Accessor for the joint id LLUUID getId( void ) { return mId; } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 195a7f5ffe..73bf7f3e23 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1935,7 +1935,9 @@ bool LLModelLoader::doLoadModel() LLJoint* pJoint = mPreview->getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) { - pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), mFilename); + LLUUID fake_mesh_id; + fake_mesh_id.generate(); + pJoint->addAttachmentPosOverride( jointTransform.getTranslation(), fake_mesh_id, gAgentAvatarp->avString()); } else { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3763ea79c6..157c402795 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5076,7 +5076,7 @@ LLJoint *LLVOAvatar::getJoint( const std::string &name ) //----------------------------------------------------------------------------- // resetJointPositionsOnDetach //----------------------------------------------------------------------------- -void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name) +void LLVOAvatar::resetJointPositionsOnDetach(const LLUUID& mesh_id) { //Subsequent joints are relative to pelvis avatar_joint_list_t::iterator iter = mSkeleton.begin(); @@ -5091,7 +5091,7 @@ void LLVOAvatar::resetJointPositionsOnDetach(const std::string& attachment_name) if ( pJoint && pJoint != pJointPelvis) { pJoint->setId( LLUUID::null ); - pJoint->removeAttachmentPosOverride(attachment_name); + pJoint->removeAttachmentPosOverride(mesh_id, avString()); } else if ( pJoint && pJoint == pJointPelvis) @@ -5761,8 +5761,8 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) && pSkinData->mJointNames.size() > JOINT_COUNT_REQUIRED_FOR_FULLRIG // full rig && pSkinData->mAlternateBindMatrix.size() > 0 ) { - const std::string& attachment_name = pVO->getAttachmentItemName(); - LLVOAvatar::resetJointPositionsOnDetach(attachment_name); + const LLUUID& mesh_id = pSkinData->mMeshID; + LLVOAvatar::resetJointPositionsOnDetach(mesh_id); //Need to handle the repositioning of the cam, updating rig data etc during outfit editing //This handles the case where we detach a replacement rig. if ( gAgentCamera.cameraCustomizeAvatar() ) diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 4d5e616906..0fde732b6f 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -200,7 +200,7 @@ public: virtual LLJoint* getJoint(const std::string &name); - void resetJointPositionsOnDetach(const std::string& attachment_name); + void resetJointPositionsOnDetach(const LLUUID& mesh_id); /*virtual*/ const LLUUID& getID() const; /*virtual*/ void addDebugText(const std::string& text); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 9d16ce5a7b..35893a0354 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4637,8 +4637,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //Set the joint position - const std::string& attachment_name = drawablep->getVObj()->getAttachmentItemName(); - pJoint->addAttachmentPosOverride( jointPos, attachment_name ); + const LLUUID& mesh_id = pSkinData->mMeshID; + pJoint->addAttachmentPosOverride( jointPos, mesh_id, pAvatarVO->avString() ); //If joint is a pelvis then handle old/new pelvis to foot values if ( lookingForJoint == "mPelvis" ) -- cgit v1.2.3 From 2d83c3d08d7e3f0d03ebeda0fee3b1b76c5200a1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Oct 2014 16:34:21 -0400 Subject: lion breakage possible fix --- indra/llui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 24fdc2268d..894b744bce 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -292,6 +292,6 @@ if(LL_TESTS) ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${HUNSPELL_LIBRARY}) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(LL_TESTS) -- cgit v1.2.3 From 1c6b7e19792e02d0b6605ce5c1cae238405de463 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 8 Oct 2014 16:51:00 -0400 Subject: backed out useless fix --- indra/llui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 894b744bce..24fdc2268d 100755 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -292,6 +292,6 @@ if(LL_TESTS) ) LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${HUNSPELL_LIBRARY}) + set(test_libs llui llmessage llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(LL_TESTS) -- cgit v1.2.3 From a9692c233e4e4a910e6a01f06a6ce3641af5735d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 10 Oct 2014 09:20:42 +0300 Subject: MAINT-3202 FIXED Cancel of selected colour in "Colour picker" floater does not return colour icon to previous condition --- indra/newview/llfloatercolorpicker.cpp | 50 +++++++++++++---------- indra/newview/llfloatercolorpicker.h | 3 ++ indra/newview/llpanelface.cpp | 13 ++++++ indra/newview/llpanelface.h | 2 + indra/newview/llselectmgr.cpp | 73 ++++++++++++++++++++++++++++++++++ indra/newview/llselectmgr.h | 4 ++ 6 files changed, 124 insertions(+), 21 deletions(-) diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 0c59ba9a6d..535cb368bd 100755 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -342,11 +342,6 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn ) curG = curGIn; curB = curBIn; - if (mApplyImmediateCheck->get()) - { - LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); - } - // update corresponding HSL values and LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL); @@ -374,11 +369,6 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn ) // update corresponding RGB values and hslToRgb ( curH, curS, curL, curR, curG, curB ); - - if (mApplyImmediateCheck->get()) - { - LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); - } } ////////////////////////////////////////////////////////////////////////////// @@ -467,7 +457,8 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data) void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te ) { - setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]); + // Pipete + selectCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]); } void LLFloaterColorPicker::onMouseCaptureLost() @@ -642,6 +633,28 @@ const LLColor4& LLFloaterColorPicker::getComplimentaryColor ( const LLColor4& ba return LLColor4::black; } +////////////////////////////////////////////////////////////////////////////// +// set current RGB and rise change event if needed. +void LLFloaterColorPicker::selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn ) +{ + setCurRgb(curRIn, curGIn, curBIn); + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } +} + +////////////////////////////////////////////////////////////////////////////// +// set current HSL and rise change event if needed. +void LLFloaterColorPicker::selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn ) +{ + setCurHsl(curHIn, curSIn, curLIn); + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } +} + ////////////////////////////////////////////////////////////////////////////// // draw color palette void LLFloaterColorPicker::drawPalette () @@ -736,7 +749,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl ) } // update current RGB (and implicitly HSL) - setCurRgb ( rVal, gVal, bVal ); + selectCurRgb ( rVal, gVal, bVal ); updateTextEntry (); } @@ -759,15 +772,10 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl ) lVal = (F32)ctrl->getValue().asReal() / 100.0f; // update current HSL (and implicitly RGB) - setCurHsl ( hVal, sVal, lVal ); + selectCurHsl ( hVal, sVal, lVal ); updateTextEntry (); } - - if (mApplyImmediateCheck->get()) - { - LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); - } } ////////////////////////////////////////////////////////////////////////////// @@ -780,7 +788,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) yPosIn >= mRGBViewerImageTop - mRGBViewerImageHeight ) { // update HSL (and therefore RGB) based on new H & S and current L - setCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth, + selectCurHsl ( ( ( F32 )xPosIn - ( F32 )mRGBViewerImageLeft ) / ( F32 )mRGBViewerImageWidth, ( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight, getCurL () ); @@ -795,7 +803,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) { // update HSL (and therefore RGB) based on current HS and new L - setCurHsl ( getCurH (), + selectCurHsl ( getCurH (), getCurS (), ( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight ); @@ -887,7 +895,7 @@ BOOL LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask ) { LLColor4 selected = *mPalette [ index ]; - setCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] ); + selectCurRgb ( selected [ 0 ], selected [ 1 ], selected [ 2 ] ); if (mApplyImmediateCheck->get()) { diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index d4d22b643a..8c16ebdf03 100755 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -122,6 +122,9 @@ class LLFloaterColorPicker static void onImmediateCheck ( LLUICtrl* ctrl, void* data ); void onColorSelect( const class LLTextureEntry& te ); private: + // mutators for color values, can raise event to preview changes at object + void selectCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn ); + void selectCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn ); // draws color selection palette void drawPalette (); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 02e05d3d9a..ced2635520 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -242,6 +242,8 @@ BOOL LLPanelFace::postBuild() if(mShinyColorSwatch) { mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2)); + mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2)); + mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2)); mShinyColorSwatch->setFollowsTop(); mShinyColorSwatch->setFollowsLeft(); mShinyColorSwatch->setCanApplyImmediately(TRUE); @@ -1463,12 +1465,23 @@ void LLPanelFace::onCancelColor(const LLSD& data) LLSelectMgr::getInstance()->selectionRevertColors(); } +void LLPanelFace::onCancelShinyColor(const LLSD& data) +{ + LLSelectMgr::getInstance()->selectionRevertShinyColors(); +} + void LLPanelFace::onSelectColor(const LLSD& data) { LLSelectMgr::getInstance()->saveSelectedObjectColors(); sendColor(); } +void LLPanelFace::onSelectShinyColor(const LLSD& data) +{ + LLSelectedTEMaterial::setSpecularLightColor(this, getChild("shinycolorswatch")->get()); + LLSelectMgr::getInstance()->saveSelectedShinyColors(); +} + // static void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata) { diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index e32f039921..9823e84cd9 100755 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -143,7 +143,9 @@ protected: void onCommitShinyColor(const LLSD& data); void onCommitAlpha(const LLSD& data); void onCancelColor(const LLSD& data); + void onCancelShinyColor(const LLSD& data); void onSelectColor(const LLSD& data); + void onSelectShinyColor(const LLSD& data); void onCloseTexturePicker(const LLSD& data); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index eb3a4c37d9..2a0a2f31be 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1766,6 +1766,40 @@ void LLSelectMgr::selectionRevertColors() getSelection()->applyToObjects(&sendfunc); } +void LLSelectMgr::selectionRevertShinyColors() +{ + struct f : public LLSelectedTEFunctor + { + LLObjectSelectionHandle mSelectedObjects; + f(LLObjectSelectionHandle sel) : mSelectedObjects(sel) {} + bool apply(LLViewerObject* object, S32 te) + { + if (object->permModify()) + { + LLSelectNode* nodep = mSelectedObjects->findNode(object); + if (nodep && te < (S32)nodep->mSavedShinyColors.size()) + { + LLColor4 color = nodep->mSavedShinyColors[te]; + // update viewer side color in anticipation of update from simulator + LLMaterialPtr old_mat = object->getTE(te)->getMaterialParams(); + if (!old_mat.isNull()) + { + LLMaterialPtr new_mat = gFloaterTools->getPanelFace()->createDefaultMaterial(old_mat); + new_mat->setSpecularLightColor(color); + object->getTE(te)->setMaterialParams(new_mat); + LLMaterialMgr::getInstance()->put(object->getID(), te, *new_mat); + } + } + } + return true; + } + } setfunc(mSelectedObjects); + getSelection()->applyToTEs(&setfunc); + + LLSelectMgrSendFunctor sendfunc; + getSelection()->applyToObjects(&sendfunc); +} + BOOL LLSelectMgr::selectionRevertTextures() { struct f : public LLSelectedTEFunctor @@ -4501,6 +4535,19 @@ void LLSelectMgr::saveSelectedObjectColors() getSelection()->applyToNodes(&func); } +void LLSelectMgr::saveSelectedShinyColors() +{ + struct f : public LLSelectedNodeFunctor + { + virtual bool apply(LLSelectNode* node) + { + node->saveShinyColors(); + return true; + } + } func; + getSelection()->applyToNodes(&func); +} + void LLSelectMgr::saveSelectedObjectTextures() { // invalidate current selection so we update saved textures @@ -5752,6 +5799,7 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow) mCreationDate(0) { saveColors(); + saveShinyColors(); } LLSelectNode::LLSelectNode(const LLSelectNode& nodep) @@ -5797,6 +5845,11 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep) { mSavedColors.push_back(*color_iter); } + mSavedShinyColors.clear(); + for (color_iter = nodep.mSavedShinyColors.begin(); color_iter != nodep.mSavedShinyColors.end(); ++color_iter) + { + mSavedShinyColors.push_back(*color_iter); + } saveTextures(nodep.mSavedTextures); } @@ -5880,6 +5933,26 @@ void LLSelectNode::saveColors() } } +void LLSelectNode::saveShinyColors() +{ + if (mObject.notNull()) + { + mSavedShinyColors.clear(); + for (S32 i = 0; i < mObject->getNumTEs(); i++) + { + const LLMaterialPtr mat = mObject->getTE(i)->getMaterialParams(); + if (!mat.isNull()) + { + mSavedShinyColors.push_back(mat->getSpecularLightColor()); + } + else + { + mSavedShinyColors.push_back(LLColor4::white); + } + } + } +} + void LLSelectNode::saveTextures(const uuid_vec_t& textures) { if (mObject.notNull()) diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index a68328167a..9906dfd524 100755 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -179,6 +179,7 @@ public: void setObject(LLViewerObject* object); // *NOTE: invalidate stored textures and colors when # faces change void saveColors(); + void saveShinyColors(); void saveTextures(const uuid_vec_t& textures); void saveTextureScaleRatios(LLRender::eTexIndex index_to_query); @@ -215,6 +216,7 @@ public: std::string mSitName; U64 mCreationDate; std::vector mSavedColors; + std::vector mSavedShinyColors; uuid_vec_t mSavedTextures; std::vector mTextureScaleRatios; std::vector mSilhouetteVertices; // array of vertices to render silhouette of object @@ -545,6 +547,7 @@ public: //////////////////////////////////////////////////////////////// void saveSelectedObjectTransform(EActionType action_type); void saveSelectedObjectColors(); + void saveSelectedShinyColors(); void saveSelectedObjectTextures(); // Sets which texture channel to query for scale and rot of display @@ -573,6 +576,7 @@ public: void selectionSetColorOnly(const LLColor4 &color); // Set only the RGB channels void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel void selectionRevertColors(); + void selectionRevertShinyColors(); BOOL selectionRevertTextures(); void selectionSetBumpmap( U8 bumpmap ); void selectionSetTexGen( U8 texgen ); -- cgit v1.2.3 From 1b64453199cb8c31886b1debe6b5268d731f2298 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 10 Oct 2014 11:41:06 +0300 Subject: MAINT-4554 FIXED Show group name and open group profile for group-owned objects. --- indra/newview/llfloaterinspect.cpp | 53 ++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 5a1dfc99ab..568fc74c49 100755 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -32,6 +32,7 @@ #include "llfloatertools.h" #include "llavataractions.h" #include "llavatarnamecache.h" +#include "llgroupactions.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llselectmgr.h" @@ -147,8 +148,17 @@ void LLFloaterInspect::onClickOwnerProfile() LLSelectNode* node = mObjectSelection->getFirstNode(&func); if(node) { - const LLUUID& owner_id = node->mPermissions->getOwner(); - LLAvatarActions::showProfile(owner_id); + if(node->mPermissions->isGroupOwned()) + { + const LLUUID& idGroup = node->mPermissions->getGroup(); + LLGroupActions::show(idGroup); + } + else + { + const LLUUID& owner_id = node->mPermissions->getOwner(); + LLAvatarActions::showProfile(owner_id); + } + } } } @@ -219,21 +229,42 @@ void LLFloaterInspect::refresh() const LLUUID& idCreator = obj->mPermissions->getCreator(); LLAvatarName av_name; - // Only work with the names if we actually get a result - // from the name cache. If not, defer setting the - // actual name and set a placeholder. - if (LLAvatarNameCache::get(idOwner, &av_name)) + if(obj->mPermissions->isGroupOwned()) { - owner_name = av_name.getCompleteName(); + std::string group_name; + const LLUUID& idGroup = obj->mPermissions->getGroup(); + if(gCacheName->getGroupName(idGroup, group_name)) + { + owner_name = group_name; + } + else + { + owner_name = LLTrans::getString("RetrievingData"); + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + mOwnerNameCacheConnection = gCacheName->getGroup(idGroup, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); + } } else { - owner_name = LLTrans::getString("RetrievingData"); - if (mOwnerNameCacheConnection.connected()) + // Only work with the names if we actually get a result + // from the name cache. If not, defer setting the + // actual name and set a placeholder. + if (LLAvatarNameCache::get(idOwner, &av_name)) + { + owner_name = av_name.getCompleteName(); + } + else { - mOwnerNameCacheConnection.disconnect(); + owner_name = LLTrans::getString("RetrievingData"); + if (mOwnerNameCacheConnection.connected()) + { + mOwnerNameCacheConnection.disconnect(); + } + mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } - mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } if (LLAvatarNameCache::get(idCreator, &av_name)) -- cgit v1.2.3 From 172dc08a0fa961c4fb0fc88d31d067c1dd716fcf Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 10 Oct 2014 11:50:41 +0300 Subject: MAINT-2477 FIXED Environment settings won't persist across logins by default, but it may be changed by using EnvironmentPersistAcrossLogin setting --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llenvmanager.cpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6ac9c161d1..d9161b0a10 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13180,6 +13180,17 @@ Value 1 + EnvironmentPersistAcrossLogin + + Comment + Keep Environment settings consistent across sessions + Persist + 1 + Type + Boolean + Value + 0 + UseDayCycle Comment diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index 41d378fea1..a626ad1bff 100755 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -303,7 +303,8 @@ void LLEnvManagerNew::loadUserPrefs() mUserPrefs.mSkyPresetName = gSavedSettings.getString("SkyPresetName"); mUserPrefs.mDayCycleName = gSavedSettings.getString("DayCycleName"); - mUserPrefs.mUseRegionSettings = gSavedSettings.getBOOL("UseEnvironmentFromRegion"); + bool use_region_settings = gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin") ? gSavedSettings.getBOOL("UseEnvironmentFromRegion") : true; + mUserPrefs.mUseRegionSettings = use_region_settings; mUserPrefs.mUseDayCycle = gSavedSettings.getBOOL("UseDayCycle"); if (mUserPrefs.mUseRegionSettings) -- cgit v1.2.3 From a1f983f63cfb9737cc2f182fe6fc6deff9b1ee75 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 10 Oct 2014 18:08:05 +0300 Subject: MAINT-4567 FIXED is not parsed correctly in viewer-lion --- indra/llcommon/lluriparser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp index ef4481d32f..0fb004ef7e 100644 --- a/indra/llcommon/lluriparser.cpp +++ b/indra/llcommon/lluriparser.cpp @@ -175,11 +175,18 @@ S32 LLUriParser::normalize() if (!mRes) { mNormalizedUri = &label_buf[mTmpScheme ? 7 : 0]; + mTmpScheme = false; } } } } + if(mTmpScheme) + { + mNormalizedUri = mNormalizedUri.substr(7); + mTmpScheme = false; + } + return mRes; } -- cgit v1.2.3 From 1414b5a0f923e265a8b38b297902b83c62394eb4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 10 Oct 2014 15:14:37 +0300 Subject: MAINT-4096 FIXED Object's new land impact is not shown in build tool until new face or prim in linkset is selected, after adding or removing only material to/from child prim --- indra/newview/llviewerobject.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 78e9216f61..690d6aebe2 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3367,8 +3367,17 @@ void LLViewerObject::setLinksetCost(F32 cost) { mLinksetCost = cost; mCostStale = false; - - if (isSelected()) + + BOOL needs_refresh = isSelected(); + child_list_t::iterator iter = mChildList.begin(); + while(iter != mChildList.end() && !needs_refresh) + { + LLViewerObject* child = *iter; + needs_refresh = child->isSelected(); + iter++; + } + + if (needs_refresh) { gFloaterTools->dirty(); } -- cgit v1.2.3 From 513fd3a622d846d1cd75de62ea26de82b5695b2f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 13 Oct 2014 16:40:33 +0300 Subject: MAINT-3800 FIXED Remove the draw distance reference in the viewer when alt-camming on terrain. --- indra/newview/lltoolfocus.cpp | 2 +- indra/newview/llviewerwindow.cpp | 22 +++++++++++++++------- indra/newview/llviewerwindow.h | 11 +++++++++-- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 58073d1186..c12c106b8b 100755 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -136,7 +136,7 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); - gViewerWindow->pickAsync(x, y, mask, pickCallback); + gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, TRUE); return TRUE; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9dcd0b81e0..756248a356 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3757,7 +3757,12 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe return intersect; } -void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent) +void LLViewerWindow::pickAsync( S32 x, + S32 y_from_bot, + MASK mask, + void (*callback)(const LLPickInfo& info), + BOOL pick_transparent, + BOOL pick_unselectable) { BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) @@ -3767,7 +3772,7 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, FALSE, TRUE, pick_unselectable, callback); schedulePick(pick_info); } @@ -3835,7 +3840,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans // shortcut queueing in mPicks and just update mLastPick in place MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, NULL); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_particle, TRUE, FALSE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -4084,7 +4089,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con // Returns global position -BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global) +BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance) { LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y); F32 mouse_dir_scale; @@ -4093,6 +4098,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d F32 land_z; const F32 FIRST_PASS_STEP = 1.0f; // meters const F32 SECOND_PASS_STEP = 0.1f; // meters + const F32 draw_distance = ignore_distance ? MAX_FAR_CLIP : gAgentCamera.mDrawDistance; LLVector3d camera_pos_global; camera_pos_global = gAgentCamera.getCameraPositionGlobal(); @@ -4100,7 +4106,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d LLVector3 probe_point_region; // walk forwards to find the point - for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgentCamera.mDrawDistance; mouse_dir_scale += FIRST_PASS_STEP) + for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < draw_distance; mouse_dir_scale += FIRST_PASS_STEP) { LLVector3d mouse_direction_global_d; mouse_direction_global_d.setVec(mouse_direction_global * mouse_dir_scale); @@ -5247,6 +5253,7 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, BOOL pick_transparent, BOOL pick_particle, BOOL pick_uv_coords, + BOOL pick_unselectable, void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), mKeyMask(keyboard_mask), @@ -5262,7 +5269,8 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, mBinormal(), mHUDIcon(NULL), mPickTransparent(pick_transparent), - mPickParticle(pick_particle) + mPickParticle(pick_particle), + mPickUnselectable(pick_unselectable) { } @@ -5337,7 +5345,7 @@ void LLPickInfo::fetchResults() // put global position into land_pos LLVector3d land_pos; - if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos)) + if (!gViewerWindow->mousePointOnLandGlobal(mPickPt.mX, mPickPt.mY, &land_pos, mPickUnselectable)) { // The selected point is beyond the draw distance or is otherwise // not selectable. Return before calling mPickCallback(). diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 5d2df2dfd7..7fde52d4e1 100755 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -91,6 +91,7 @@ public: BOOL pick_transparent, BOOL pick_particle, BOOL pick_surface_info, + BOOL pick_unselectable, void (*pick_callback)(const LLPickInfo& pick_info)); void fetchResults(); @@ -123,6 +124,7 @@ public: LLVector3 mBinormal; BOOL mPickTransparent; BOOL mPickParticle; + BOOL mPickUnselectable; void getSurfaceInfo(); private: @@ -360,7 +362,12 @@ public: void performPick(); void returnEmptyPicks(); - void pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE); + void pickAsync( S32 x, + S32 y_from_bot, + MASK mask, + void (*callback)(const LLPickInfo& pick_info), + BOOL pick_transparent = FALSE, + BOOL pick_unselectable = FALSE); LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_particle = FALSE); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); @@ -386,7 +393,7 @@ public: //const LLVector3d& lastNonFloraObjectHitOffset(); // mousePointOnLand() returns true if found point - BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global); + BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE); BOOL mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal); LLVector3d clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const; BOOL clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const; -- cgit v1.2.3 From a3b4a8a7444bdd511256d35ff1b126d467c3c389 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 14 Oct 2014 11:51:45 +0300 Subject: MAINT-2560 reverted --- indra/newview/llhudeffectlookat.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index fadbf78ca5..2ba9142763 100755 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -39,8 +39,7 @@ #include "llrendersphere.h" #include "llselectmgr.h" #include "llglheaders.h" -#include "llfontgl.h" -#include "llhudrender.h" + #include "llxmltree.h" @@ -497,15 +496,14 @@ void LLHUDEffectLookAt::render() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLVOAvatar* source_avatar = ((LLVOAvatar*)(LLViewerObject*)mSourceObject); - LLVector3 target = mTargetPos + source_avatar->mHeadp->getWorldPosition(); + LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition(); gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]); gGL.scalef(0.3f, 0.3f, 0.3f); - LLColor3 color = (*mAttentions)[mTargetType].mColor; gGL.begin(LLRender::LINES); { + LLColor3 color = (*mAttentions)[mTargetType].mColor; gGL.color3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); gGL.vertex3f(-1.f, 0.f, 0.f); gGL.vertex3f(1.f, 0.f, 0.f); @@ -517,17 +515,6 @@ void LLHUDEffectLookAt::render() gGL.vertex3f(0.f, 0.f, 1.f); } gGL.end(); gGL.popMatrix(); - - - if(!source_avatar->isSelf()) - { - std::string av_name = source_avatar->getFullname(); - const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - gGL.pushMatrix(); - hud_render_utf8text(av_name,target+LLVector3(0.f,0.f,0.4f),*big_fontp,LLFontGL::NORMAL,LLFontGL::DROP_SHADOW_SOFT,-0.5*big_fontp->getWidthF32(av_name),3.f,color,FALSE); - gGL.popMatrix(); - } - } } -- cgit v1.2.3 From bafcec7dee9b243c75e67349b9bff3e93bd87381 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 15 Oct 2014 10:37:48 +0300 Subject: MAINT-4555 FIXED Floater opens in the bottom right corner overlapping Conversations floater --- indra/newview/llfloaterimsessiontab.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 2864f018b2..357b635594 100755 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -118,6 +118,7 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid else { conv = LLFloaterReg::getTypedInstance("impanel", LLSD(uuid)); + conv->setOpenPositioning(LLFloaterEnums::POSITIONING_RELATIVE); } return conv; -- cgit v1.2.3 From 73c1e41ae57ff80ff143d4784e7b1dc5e7b5c37f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 14 Oct 2014 19:59:18 +0300 Subject: MAINT-4301 FIXED failed script upload makes the wait cursor stick --- indra/newview/llassetuploadresponders.cpp | 41 +++++++++++++++++++++----- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index a98ff64d0a..466677b8be 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -229,21 +229,34 @@ void LLAssetUploadResponder::httpFailure() { // *TODO: Add adaptive retry policy? LL_WARNS() << dumpResponse() << LL_ENDL; - LLSD args; + std::string reason; if (isHttpClientErrorStatus(getStatus())) { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "Error in upload request. Please visit " + reason = "Error in upload request. Please visit " "http://secondlife.com/support for help fixing this problem."; - LLNotificationsUtil::add("CannotUploadReason", args); } else { - args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); - args["REASON"] = "The server is experiencing unexpected " + reason = "The server is experiencing unexpected " "difficulties."; - LLNotificationsUtil::add("CannotUploadReason", args); } + LLSD args; + args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName); + args["REASON"] = reason; + LLNotificationsUtil::add("CannotUploadReason", args); + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + reason); + preview->callbackLSLCompileFailed(errors); + } + } + LLUploadDialog::modalUploadFinished(); LLFilePicker::instance().reset(); // unlock file picker when bulk upload fails } @@ -298,8 +311,22 @@ void LLAssetUploadResponder::uploadUpload(const LLSD& content) void LLAssetUploadResponder::uploadFailure(const LLSD& content) { LL_WARNS() << dumpResponse() << LL_ENDL; + + // unfreeze script preview + if(mAssetType == LLAssetType::AT_LSL_TEXT) + { + LLPreviewLSL* preview = LLFloaterReg::findTypedInstance("preview_script", mPostData["item_id"]); + if (preview) + { + LLSD errors; + errors.append(LLTrans::getString("UploadFailed") + content["message"].asString()); + preview->callbackLSLCompileFailed(errors); + } + } + // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); + LLFloater* floater_snapshot = LLFloaterReg::findInstance("snapshot"); if (floater_snapshot) { diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5dcb8e2cdf..cc2f645b8e 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2509,6 +2509,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors. Compile successful! Compile successful, saving... Save complete. + File upload failed: Script (object out of range) -- cgit v1.2.3 From 99bf150059fea3f0856e376fba66e5f9d6a4abe7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 16 Oct 2014 10:41:03 +0300 Subject: MAINT-4582 FIXED Certain URLs which end contain secondlife.com or lindenlab.com incorrectly open the Place Profile floater --- indra/llui/llurlentry.cpp | 9 +++++++++ indra/llui/llurlentry.h | 1 + 2 files changed, 10 insertions(+) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index c06d6144b9..cc7956078d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -368,6 +368,15 @@ std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const return url; } +std::string LLUrlEntrySeconlifeURL::getUrl(const std::string &string) const +{ + if (string.find("://") == std::string::npos) + { + return "http://" + escapeUrl(string); + } + return escapeUrl(string); +} + // // LLUrlEntryAgent Describes a Second Life agent Url, e.g., // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 1cb11cdb1c..055a8b1515 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -179,6 +179,7 @@ public: bool isTrusted() const { return true; } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); /*virtual*/ std::string getTooltip(const std::string &url) const; + /*virtual*/ std::string getUrl(const std::string &string) const; private: std::string mLabel; -- cgit v1.2.3 From 94ac0064354594de8adbb99084029c8b4027b2f6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Oct 2014 19:34:13 +0300 Subject: MAINT-4576 FIXED Damage Icon always displays regardless of land setting. --- indra/newview/llfloaterland.cpp | 5 +++-- indra/newview/llviewerparcelmgr.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 7621c35ed2..3cef7958c2 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1983,6 +1983,7 @@ void LLPanelLandOptions::refresh() else { // something selected, hooray! + LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); // Display options BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS); @@ -1998,8 +1999,9 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry()); mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() ); + BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE; mCheckSafe ->set( !parcel->getAllowDamage() ); - mCheckSafe ->setEnabled( can_change_options ); + mCheckSafe ->setEnabled( can_change_options && region_damage ); mCheckFly ->set( parcel->getAllowFly() ); mCheckFly ->setEnabled( can_change_options ); @@ -2079,7 +2081,6 @@ void LLPanelLandOptions::refresh() // they can see the checkbox, but its disposition depends on the // state of the region - LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (regionp) { if (regionp->getSimAccess() == SIM_ACCESS_PG) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2f4365036c..d574dec11d 100755 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -705,7 +705,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const { return (region && region->getAllowDamage()) - || (parcel && parcel->getAllowDamage()); + && (parcel && parcel->getAllowDamage()); } BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const -- cgit v1.2.3 From 2b8827a55f6a935bac8abb7513be1c00659f6ab1 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 13 Oct 2014 19:14:42 +0300 Subject: MAINT-4169 FIXED Suppress initial display of the path portion of URLs from other users and scripts --- indra/llcommon/lluriparser.cpp | 24 +++++++- indra/llcommon/lluriparser.h | 2 + indra/llui/lltextbase.cpp | 11 +++- indra/llui/llurlentry.cpp | 97 +++++++++++++++++++++++++++++---- indra/llui/llurlentry.h | 27 +++++++-- indra/llui/llurlmatch.cpp | 5 +- indra/llui/llurlmatch.h | 8 ++- indra/llui/llurlregistry.cpp | 6 +- indra/newview/app_settings/settings.xml | 15 ++++- 9 files changed, 171 insertions(+), 24 deletions(-) diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp index 0fb004ef7e..d07288f123 100644 --- a/indra/llcommon/lluriparser.cpp +++ b/indra/llcommon/lluriparser.cpp @@ -191,20 +191,42 @@ S32 LLUriParser::normalize() } void LLUriParser::glue(std::string& uri) const +{ + std::string first_part; + glueFirst(first_part); + + std::string second_part; + glueSecond(second_part); + + uri = first_part + second_part; +} + +void LLUriParser::glueFirst(std::string& uri) const { if (mScheme.size()) { uri = mScheme; uri += "://"; } + else + { + uri.clear(); + } uri += mHost; +} +void LLUriParser::glueSecond(std::string& uri) const +{ if (mPort.size()) { - uri += ':'; + uri = ':'; uri += mPort; } + else + { + uri.clear(); + } uri += mPath; diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h index 719f916837..e987bae924 100644 --- a/indra/llcommon/lluriparser.h +++ b/indra/llcommon/lluriparser.h @@ -60,6 +60,8 @@ public: void extractParts(); void glue(std::string& uri) const; + void glueFirst(std::string& uri) const; + void glueSecond(std::string& uri) const; bool test() const; S32 normalize(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 09f923e74f..310323445b 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2063,8 +2063,17 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted()); // output the styled Url - //appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly()); appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); + + // show query part of url with gray color if enabled in global settings in "HTTPNoProtocolShowGreyQuery" + // and only for LLUrlEntryHTTP and LLUrlEntryHTTPNoProtocol url entries + std::string label = match.getQuery(); + if (label.size()) + { + link_params.color = LLColor4::grey; + link_params.readonly_color = LLColor4::grey; + appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly()); + } // set the tooltip for the Url label if (! match.getTooltip().empty()) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index cc7956078d..daed158fe9 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -43,12 +43,16 @@ #define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))" +extern LLControlGroup gSavedSettings; + // Utility functions std::string localize_slapp_label(const std::string& url, const std::string& full_name); LLUrlEntryBase::LLUrlEntryBase() -{} +{ + mGreyQuery = gSavedSettings.getBOOL("HTTPNoProtocolShowGreyQuery"); +} LLUrlEntryBase::~LLUrlEntryBase() { @@ -187,6 +191,33 @@ bool LLUrlEntryBase::isWikiLinkCorrect(std::string url) return (LLUrlRegistry::instance().hasUrl(label)) ? false : true; } +std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const +{ + LLUriParser up(unescapeUrl(url)); + up.normalize(); + + std::string label; + up.extractParts(); + up.glueFirst(label); + + return label; +} + +std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const +{ + LLUriParser up(unescapeUrl(url)); + + std::string query; + if (mGreyQuery) + { + up.extractParts(); + up.glueSecond(query); + } + + return query; +} + + static std::string getStringAfterToken(const std::string str, const std::string token) { size_t pos = str.find(token); @@ -203,6 +234,7 @@ static std::string getStringAfterToken(const std::string str, const std::string // LLUrlEntryHTTP Describes generic http: and https: Urls // LLUrlEntryHTTP::LLUrlEntryHTTP() + : LLUrlEntryBase() { mPattern = boost::regex("https?://([-\\w\\.]+)+(:\\d+)?(:\\w+)?(@\\d+)?(@\\w+)?/?\\S*", boost::regex::perl|boost::regex::icase); @@ -211,6 +243,25 @@ LLUrlEntryHTTP::LLUrlEntryHTTP() } std::string LLUrlEntryHTTP::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ + return urlToLabelWithGreyQuery(url); +} + +std::string LLUrlEntryHTTP::getQuery(const std::string &url) const +{ + return urlToGreyQuery(url); +} + +std::string LLUrlEntryHTTP::getUrl(const std::string &string) const +{ + if (string.find("://") == std::string::npos) + { + return "http://" + escapeUrl(string); + } + return escapeUrl(string); +} + +std::string LLUrlEntryHTTP::getTooltip(const std::string &url) const { return unescapeUrl(url); } @@ -247,6 +298,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const // LLUrlEntryHTTPNoProtocol Describes generic Urls like www.google.com // LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() + : LLUrlEntryBase() { mPattern = boost::regex("(" "\\bwww\\.\\S+\\.\\S+" // i.e. www.FOO.BAR @@ -260,7 +312,12 @@ LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol() std::string LLUrlEntryHTTPNoProtocol::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - return unescapeUrl(url); + return urlToLabelWithGreyQuery(url); +} + +std::string LLUrlEntryHTTPNoProtocol::getQuery(const std::string &url) const +{ + return urlToGreyQuery(url); } std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const @@ -272,6 +329,11 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const return escapeUrl(string); } +std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const +{ + return unescapeUrl(url); +} + // // LLUrlEntrySLURL Describes generic http: and https: Urls // @@ -345,30 +407,33 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const } // -// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link +// LLUrlEntrySeconlifeURL Describes *secondlife.com/ and *lindenlab.com/ urls to substitute icon 'hand.png' before link // -LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL() -{ - mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?(/\\S*)?\\b", +LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL() +{ + mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?\\/\\S*", boost::regex::perl|boost::regex::icase); mIcon = "Hand"; mMenuName = "menu_url_http.xml"; } -std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +std::string LLUrlEntrySecondlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { LLUriParser up(url); up.extractParts(); - return up.host(); + + std::string label; + up.glueFirst(label); + return label; } -std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const +std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const { return url; } -std::string LLUrlEntrySeconlifeURL::getUrl(const std::string &string) const +std::string LLUrlEntrySecondlifeURL::getUrl(const std::string &string) const { if (string.find("://") == std::string::npos) { @@ -377,6 +442,18 @@ std::string LLUrlEntrySeconlifeURL::getUrl(const std::string &string) const return escapeUrl(string); } +// +// LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link +// +LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL() + { + mPattern = boost::regex("(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(?!\\S)", + boost::regex::perl|boost::regex::icase); + + mIcon = "Hand"; + mMenuName = "menu_url_http.xml"; +} + // // LLUrlEntryAgent Describes a Second Life agent Url, e.g., // secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 055a8b1515..fd18389303 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -78,6 +78,9 @@ public: /// Given a matched Url, return a label for the Url virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; } + /// Return port, query and fragment parts for the Url + virtual std::string getQuery(const std::string &url) const { return ""; } + /// Return an icon that can be displayed next to Urls of this type virtual std::string getIcon(const std::string &url); @@ -111,6 +114,8 @@ protected: std::string getLabelFromWikiLink(const std::string &url) const; std::string getUrlFromWikiLink(const std::string &string) const; void addObserver(const std::string &id, const std::string &url, const LLUrlLabelCallback &cb); + std::string urlToLabelWithGreyQuery(const std::string &url) const; + std::string urlToGreyQuery(const std::string &url) const; virtual void callObservers(const std::string &id, const std::string &label, const std::string& icon); typedef struct { @@ -123,6 +128,7 @@ protected: std::string mMenuName; std::string mTooltip; std::multimap mObservers; + bool mGreyQuery; }; /// @@ -133,6 +139,9 @@ class LLUrlEntryHTTP : public LLUrlEntryBase public: LLUrlEntryHTTP(); /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getQuery(const std::string &url) const; + /*virtual*/ std::string getUrl(const std::string &string) const; + /*virtual*/ std::string getTooltip(const std::string &url) const; }; /// @@ -155,7 +164,9 @@ class LLUrlEntryHTTPNoProtocol : public LLUrlEntryBase public: LLUrlEntryHTTPNoProtocol(); /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getQuery(const std::string &url) const; /*virtual*/ std::string getUrl(const std::string &string) const; + /*virtual*/ std::string getTooltip(const std::string &url) const; }; /// @@ -172,17 +183,23 @@ public: /// /// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls /// -class LLUrlEntrySeconlifeURL : public LLUrlEntryBase +class LLUrlEntrySecondlifeURL : public LLUrlEntryBase { public: - LLUrlEntrySeconlifeURL(); + LLUrlEntrySecondlifeURL(); bool isTrusted() const { return true; } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); /*virtual*/ std::string getTooltip(const std::string &url) const; - /*virtual*/ std::string getUrl(const std::string &string) const; + /*virtual*/ std::string getUrl(const std::string &string) const; +}; -private: - std::string mLabel; +/// +/// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com Urls +/// +class LLUrlEntrySimpleSecondlifeURL : public LLUrlEntrySecondlifeURL +{ +public: + LLUrlEntrySimpleSecondlifeURL(); }; /// diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp index 016d1ca92d..2f2ac969e1 100755 --- a/indra/llui/llurlmatch.cpp +++ b/indra/llui/llurlmatch.cpp @@ -42,8 +42,8 @@ LLUrlMatch::LLUrlMatch() : { } -void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, - const std::string &label, const std::string &tooltip, +void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std::string &label, + const std::string& query, const std::string &tooltip, const std::string &icon, const LLStyle::Params& style, const std::string &menu, const std::string &location, const LLUUID& id, bool underline_on_hover_only, bool trusted) @@ -52,6 +52,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, mEnd = end; mUrl = url; mLabel = label; + mQuery = query; mTooltip = tooltip; mIcon = icon; mStyle = style; diff --git a/indra/llui/llurlmatch.h b/indra/llui/llurlmatch.h index 9f8960b32f..ff699902ca 100755 --- a/indra/llui/llurlmatch.h +++ b/indra/llui/llurlmatch.h @@ -62,6 +62,9 @@ public: /// return a label that can be used for the display of this Url std::string getLabel() const { return mLabel; } + /// return a right part of url which should be drawn in grey + std::string getQuery() const { return mQuery; } + /// return a message that could be displayed in a tooltip or status bar std::string getTooltip() const { return mTooltip; } @@ -85,10 +88,10 @@ public: /// Change the contents of this match object (used by LLUrlRegistry) void setValues(U32 start, U32 end, const std::string &url, const std::string &label, - const std::string &tooltip, const std::string &icon, + const std::string& query, const std::string &tooltip, const std::string &icon, const LLStyle::Params& style, const std::string &menu, const std::string &location, const LLUUID& id, - bool underline_on_hover_only = false, bool trusted = false ); + bool underline_on_hover_only = false, bool trusted = false); const LLUUID& getID() const { return mID; } private: @@ -96,6 +99,7 @@ private: U32 mEnd; std::string mUrl; std::string mLabel; + std::string mQuery; std::string mTooltip; std::string mIcon; std::string mMenuName; diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 9e8d8d01f1..280d066087 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -47,7 +47,8 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntrySLURL()); // decorated links for host names like: secondlife.com and lindenlab.com - registerUrl(new LLUrlEntrySeconlifeURL()); + registerUrl(new LLUrlEntrySecondlifeURL()); + registerUrl(new LLUrlEntrySimpleSecondlifeURL()); registerUrl(new LLUrlEntryHTTP()); mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); @@ -199,6 +200,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match_start = start; match_end = end; match_entry = url_entry; + break; } } } @@ -216,6 +218,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match.setValues(match_start, match_end, match_entry->getUrl(url), match_entry->getLabel(url, cb), + match_entry->getQuery(url), match_entry->getTooltip(url), match_entry->getIcon(url), match_entry->getStyle(), @@ -252,6 +255,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr match.setValues(start, end, match.getUrl(), match.getLabel(), + match.getQuery(), match.getTooltip(), match.getIcon(), match.getStyle(), diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d9161b0a10..16705e1913 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4982,6 +4982,7 @@ Type LLSD Value + LSLFindCaseInsensitivity @@ -11737,7 +11738,7 @@ Type F32 Value - 0.0 + 0.0 TextureFetchSource @@ -15584,7 +15585,17 @@ Value 0 - + HTTPNoProtocolShowGreyQuery + + Comment + Enable(disable) appearance of port, query and fragment parts of url for HTTP and HTTPNoProtocol entries in grey. + Persist + 1 + Type + Boolean + Value + 1 + -- cgit v1.2.3 From c8cfcf8ea171b32185dbac12e576339b9ec4179a Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 16 Oct 2014 17:27:44 +0300 Subject: Fix build issues. --- indra/llui/llurlentry.cpp | 4 +--- indra/llui/tests/llurlmatch_test.cpp | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index daed158fe9..ac023e664d 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -43,15 +43,13 @@ #define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))" -extern LLControlGroup gSavedSettings; - // Utility functions std::string localize_slapp_label(const std::string& url, const std::string& full_name); LLUrlEntryBase::LLUrlEntryBase() { - mGreyQuery = gSavedSettings.getBOOL("HTTPNoProtocolShowGreyQuery"); + mGreyQuery = LLUI::sSettingGroups["config"]->getBOOL("HTTPNoProtocolShowGreyQuery"); } LLUrlEntryBase::~LLUrlEntryBase() diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index 55c1efefef..843886eb69 100755 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -151,7 +151,7 @@ namespace tut LLUrlMatch match; ensure("empty()", match.empty()); - match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(0, 1, "http://secondlife.com", "", "Second Life", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure("! empty()", ! match.empty()); } @@ -164,7 +164,7 @@ namespace tut LLUrlMatch match; ensure_equals("getStart() == 0", match.getStart(), 0); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getStart() == 10", match.getStart(), 10); } @@ -177,7 +177,7 @@ namespace tut LLUrlMatch match; ensure_equals("getEnd() == 0", match.getEnd(), 0); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getEnd() == 20", match.getEnd(), 20); } @@ -190,10 +190,10 @@ namespace tut LLUrlMatch match; ensure_equals("getUrl() == ''", match.getUrl(), ""); - match.setValues(10, 20, "http://slurl.com/", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "http://slurl.com/", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getUrl() == '' (2)", match.getUrl(), ""); } @@ -206,10 +206,10 @@ namespace tut LLUrlMatch match; ensure_equals("getLabel() == ''", match.getLabel(), ""); - match.setValues(10, 20, "", "Label", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "Label", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getLabel() == '' (2)", match.getLabel(), ""); } @@ -222,10 +222,10 @@ namespace tut LLUrlMatch match; ensure_equals("getTooltip() == ''", match.getTooltip(), ""); - match.setValues(10, 20, "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "Info", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getTooltip() == '' (2)", match.getTooltip(), ""); } @@ -238,10 +238,10 @@ namespace tut LLUrlMatch match; ensure_equals("getIcon() == ''", match.getIcon(), ""); - match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure_equals("getIcon() == '' (2)", match.getIcon(), ""); } @@ -254,10 +254,10 @@ namespace tut LLUrlMatch match; ensure("getMenuName() empty", match.getMenuName().empty()); - match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", LLUUID::null); ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure("getMenuName() empty (2)", match.getMenuName().empty()); } @@ -270,10 +270,10 @@ namespace tut LLUrlMatch match; ensure("getLocation() empty", match.getLocation().empty()); - match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", LLUUID::null); ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris"); - match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); + match.setValues(10, 20, "", "", "", "", "", LLStyle::Params(), "", "", LLUUID::null); ensure("getLocation() empty (2)", match.getLocation().empty()); } } -- cgit v1.2.3 From 5c3d8de4a5294e9bec65678b089a8eebb4105427 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Wed, 22 Oct 2014 19:37:15 +0300 Subject: MAINT-4602 FIXED URLs are not highlighted as URLs in chat view when preceding an internal URL --- indra/llui/llurlregistry.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 280d066087..5918d97be4 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -200,7 +200,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match_start = start; match_end = end; match_entry = url_entry; - break; } } } -- cgit v1.2.3 From bf3d017b69ba0a862aa448dc97c8783a7d911fde Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 23 Oct 2014 15:59:15 +0300 Subject: MAINT-2131 FIXED "Copy" menu item is enabled for folders in "My inventory" panel inside "Places>My Landmarks" tab --- indra/newview/llpanellandmarks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 75a3584a1e..1d73d4bd6e 100755 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -1173,7 +1173,8 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold if ("copy" == command_name) { - return root_folder->canCopy(); + // we shouldn't be able to copy folders from My Inventory Panel + return can_be_modified && root_folder->canCopy(); } else if ("collapse" == command_name) { -- cgit v1.2.3 From cfddb46b00fc5b2ecce90af7561e4f5c058f366f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 24 Oct 2014 13:38:52 +0300 Subject: MAINT-4554 FIXED Display owner as [groupname] (group) for group-owned object --- indra/newview/llfloaterinspect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 568fc74c49..10088d20c2 100755 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -235,7 +235,7 @@ void LLFloaterInspect::refresh() const LLUUID& idGroup = obj->mPermissions->getGroup(); if(gCacheName->getGroupName(idGroup, group_name)) { - owner_name = group_name; + owner_name = "[" + group_name + "] (group)"; } else { -- cgit v1.2.3 From 4f5ea39c9150f70977983de9b7e02b13f9b0dc6a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 24 Oct 2014 17:39:12 +0300 Subject: MAINT-3208 FIXED Confusing button state when working with multiple textures and the default texture is the last selected. --- indra/newview/lltexturectrl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index a426669b5e..fec2fe8c04 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -586,9 +586,9 @@ void LLFloaterTexturePicker::draw() mTentativeLabel->setVisible( FALSE ); } - getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID()); - getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID()); - getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); + getChildView("Default")->setEnabled(mImageAssetID != mOwner->getDefaultImageAssetID() || mOwner->getTentative()); + getChildView("Blank")->setEnabled(mImageAssetID != mOwner->getBlankImageAssetID() || mOwner->getTentative()); + getChildView("None")->setEnabled(mOwner->getAllowNoTexture() && (!mImageAssetID.isNull() || mOwner->getTentative())); LLFloater::draw(); -- cgit v1.2.3 From d524c76822b020a2105c90b0bf0ba19ff90bc709 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 24 Oct 2014 12:23:26 -0700 Subject: MAINT-4614 - fix viewer warning about bad membership list update --- indra/newview/llspeakers.cpp | 24 +++++++++++++----------- indra/newview/llspeakers.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index e80756e4de..7867e1573c 100755 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -611,11 +611,14 @@ void LLSpeakerMgr::updateSpeakerList() setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); } -void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) +void LLSpeakerMgr::setSpeakerNotInChannel(LLPointer speakerp) { - speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; - speakerp->mDotColor = INACTIVE_COLOR; - mSpeakerDelayRemover->setActionTimer(speakerp->mID); + if (speakerp.notNull()) + { + speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; + speakerp->mDotColor = INACTIVE_COLOR; + mSpeakerDelayRemover->setActionTimer(speakerp->mID); + } } bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id) @@ -795,7 +798,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) if (agent_data.isMap() && agent_data.has("transition")) { - if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull()) + if (agent_data["transition"].asString() == "LEAVE") { setSpeakerNotInChannel(speakerp); } @@ -806,7 +809,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } else { - LL_WARNS() << "bad membership list update " << ll_print_sd(agent_data["transition"]) << LL_ENDL; + LL_WARNS() << "bad membership list update from 'agent_updates' for agent " << agent_id << ", transition " << ll_print_sd(agent_data["transition"]) << LL_ENDL; } } @@ -848,7 +851,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) LLPointer speakerp = findSpeaker(agent_id); std::string agent_transition = update_it->second.asString(); - if (agent_transition == "LEAVE" && speakerp.notNull()) + if (agent_transition == "LEAVE") { setSpeakerNotInChannel(speakerp); } @@ -859,8 +862,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } else { - LL_WARNS() << "bad membership list update " - << agent_transition << LL_ENDL; + LL_WARNS() << "bad membership list update from 'updates' for agent " << agent_id << ", transition " << agent_transition << LL_ENDL; } } } @@ -1041,8 +1043,8 @@ void LLLocalSpeakerMgr::updateSpeakerList() for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it) { LLUUID speaker_id = speaker_it->first; - LLSpeaker* speakerp = speaker_it->second; - if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) + LLPointer speakerp = speaker_it->second; + if (speakerp.notNull() && speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) { LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); if (!avatarp || dist_vec_squared(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS * CHAT_NORMAL_RADIUS) diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index e953dd0e1a..0e69184125 100755 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -258,7 +258,7 @@ public: protected: virtual void updateSpeakerList(); - void setSpeakerNotInChannel(LLSpeaker* speackerp); + void setSpeakerNotInChannel(LLPointer speackerp); bool removeSpeaker(const LLUUID& speaker_id); typedef std::map > speaker_map_t; -- cgit v1.2.3 From e3f62a54e6c3fe5423a1e766c4ee30388aa471bd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 27 Oct 2014 13:26:17 +0200 Subject: MAINT-4597 FIXED Show emoted name according to name settings in preferences. --- indra/newview/llchathistory.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 84b9ac756a..f0bd63ba46 100755 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -1113,7 +1113,15 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (irc_me && !use_plain_text_chat_history) { - message = chat.mFromName + message; + std::string from_name = chat.mFromName; + LLAvatarName av_name; + if (!chat.mFromID.isNull() && + LLAvatarNameCache::get(chat.mFromID, &av_name) && + !av_name.isDisplayNameDefault()) + { + from_name = av_name.getCompleteName(); + } + message = from_name + message; } if (square_brackets) -- cgit v1.2.3 From 366bcd0cbca43081fe58825fd463018e49b51740 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 27 Oct 2014 17:10:08 +0200 Subject: MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices less than allowed. Changes in all other files relate auxiliary methods for catching similar bugs in future. --- indra/llcommon/llmemory.cpp | 78 +++++++++++++++++++++++++++++++++++++---- indra/llcommon/llmemory.h | 54 +++++++++++++++++----------- indra/llcommon/llstacktrace.cpp | 29 +++++++++++++++ indra/llcommon/llstacktrace.h | 1 + indra/llmath/llmath.h | 1 + indra/llmath/llvolume.cpp | 2 ++ 6 files changed, 137 insertions(+), 28 deletions(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index e0b2aa87c2..9ed60ad121 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -63,13 +63,18 @@ LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sM void ll_assert_aligned_func(uintptr_t ptr,U32 alignment) { -#ifdef SHOW_ASSERT - // Redundant, place to set breakpoints. - if (ptr%alignment!=0) - { - LL_WARNS() << "alignment check failed" << LL_ENDL; - } - llassert(ptr%alignment==0); +#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN) + //do not check + return; +#else + #ifdef SHOW_ASSERT + // Redundant, place to set breakpoints. + if (ptr%alignment!=0) + { + LL_WARNS() << "alignment check failed" << LL_ENDL; + } + llassert(ptr%alignment==0); + #endif #endif } @@ -2148,3 +2153,62 @@ void LLPrivateMemoryPoolTester::fragmentationtest() } #endif //-------------------------------------------------------------------- + +#if defined(LL_WINDOWS) && defined(LL_DEBUG_BUFFER_OVERRUN) + +#include + +struct mem_info { + std::map memory_info; + LLMutex mutex; + + static mem_info& get() { + static mem_info instance; + return instance; + } + +private: + mem_info(){} +}; + +void* ll_aligned_malloc_fallback( size_t size, int align ) +{ + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); + + unsigned int for_alloc = sysinfo.dwPageSize; + while(for_alloc < size) for_alloc += sysinfo.dwPageSize; + + void *p = VirtualAlloc(NULL, for_alloc+sysinfo.dwPageSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE); + if(NULL == p) { + // call debugger + __asm int 3; + } + memset(p, 0xaa, for_alloc); + memset((void*)((char*)p + for_alloc), 0xbb, sysinfo.dwPageSize); + DWORD old; + BOOL Res = VirtualProtect((void*)((char*)p + for_alloc), sysinfo.dwPageSize, PAGE_NOACCESS, &old); + if(FALSE == Res) { + // call debugger + __asm int 3; + } + + void* ret = (void*)((char*)p + for_alloc-size); + + { + LLMutexLock lock(&mem_info::get().mutex); + mem_info::get().memory_info.insert(std::pair(ret, p)); + } + + + return ret; +} + +void ll_aligned_free_fallback( void* ptr ) +{ + LLMutexLock lock(&mem_info::get().mutex); + VirtualFree(mem_info::get().memory_info.find(ptr)->second, 0, MEM_RELEASE); + mem_info::get().memory_info.erase(ptr); +} + +#endif diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 7d1d541a4b..c4c9cc0566 100755 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -94,32 +94,44 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) #define LL_ALIGN_16(var) LL_ALIGN_PREFIX(16) var LL_ALIGN_POSTFIX(16) - -inline void* ll_aligned_malloc_fallback( size_t size, int align ) -{ -#if defined(LL_WINDOWS) - return _aligned_malloc(size, align); +//------------------------------------------------------------------------------------------------ +//------------------------------------------------------------------------------------------------ + // for enable buffer overrun detection predefine LL_DEBUG_BUFFER_OVERRUN in current library + // change preprocessro code to: #if 1 && defined(LL_WINDOWS) + +#if 0 && defined(LL_WINDOWS) + void* ll_aligned_malloc_fallback( size_t size, int align ); + void ll_aligned_free_fallback( void* ptr ); +//------------------------------------------------------------------------------------------------ #else - void* mem = malloc( size + (align - 1) + sizeof(void*) ); - char* aligned = ((char*)mem) + sizeof(void*); - aligned += align - ((uintptr_t)aligned & (align - 1)); - - ((void**)aligned)[-1] = mem; - return aligned; -#endif -} + inline void* ll_aligned_malloc_fallback( size_t size, int align ) + { + #if defined(LL_WINDOWS) + return _aligned_malloc(size, align); + #else + void* mem = malloc( size + (align - 1) + sizeof(void*) ); + char* aligned = ((char*)mem) + sizeof(void*); + aligned += align - ((uintptr_t)aligned & (align - 1)); + + ((void**)aligned)[-1] = mem; + return aligned; + #endif + } -inline void ll_aligned_free_fallback( void* ptr ) -{ -#if defined(LL_WINDOWS) - _aligned_free(ptr); -#else - if (ptr) + inline void ll_aligned_free_fallback( void* ptr ) { - free( ((void**)ptr)[-1] ); + #if defined(LL_WINDOWS) + _aligned_free(ptr); + #else + if (ptr) + { + free( ((void**)ptr)[-1] ); + } + #endif } #endif -} +//------------------------------------------------------------------------------------------------ +//------------------------------------------------------------------------------------------------ #if !LL_USE_TCMALLOC inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16(). diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp index e0e9056380..8d826cbc6e 100755 --- a/indra/llcommon/llstacktrace.cpp +++ b/indra/llcommon/llstacktrace.cpp @@ -125,6 +125,30 @@ bool ll_get_stack_trace(std::vector& lines) return false; } +void ll_get_stack_trace_internal(std::vector& lines) +{ + const S32 MAX_STACK_DEPTH = 100; + const S32 STRING_NAME_LENGTH = 256; + + HANDLE process = GetCurrentProcess(); + SymInitialize( process, NULL, TRUE ); + + void *stack[MAX_STACK_DEPTH]; + + unsigned short frames = RtlCaptureStackBackTrace_fn( 0, MAX_STACK_DEPTH, stack, NULL ); + SYMBOL_INFO *symbol = (SYMBOL_INFO*)calloc(sizeof(SYMBOL_INFO) + STRING_NAME_LENGTH * sizeof(char), 1); + symbol->MaxNameLen = STRING_NAME_LENGTH-1; + symbol->SizeOfStruct = sizeof(SYMBOL_INFO); + + for(unsigned int i = 0; i < frames; i++) + { + SymFromAddr(process, (DWORD64)(stack[i]), 0, symbol); + lines.push_back(symbol->Name); + } + + free( symbol ); +} + #else bool ll_get_stack_trace(std::vector& lines) @@ -132,5 +156,10 @@ bool ll_get_stack_trace(std::vector& lines) return false; } +void ll_get_stack_trace2(std::vector& lines) +{ + return false; +} + #endif diff --git a/indra/llcommon/llstacktrace.h b/indra/llcommon/llstacktrace.h index ca72c64c5d..335765386a 100755 --- a/indra/llcommon/llstacktrace.h +++ b/indra/llcommon/llstacktrace.h @@ -33,6 +33,7 @@ #include LL_COMMON_API bool ll_get_stack_trace(std::vector& lines); +LL_COMMON_API void ll_get_stack_trace_internal(std::vector& lines); #endif diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b4ac1dec73..7f39e58f71 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -559,6 +559,7 @@ inline void ll_remove_outliers(std::vector& data, F32 k) inline void ll_nn2d_interpolation(const U8 *const src, U32 srcW, U32 srcH, U8 srcCh, U8 *const dst, U32 dstW, U32 dstH, U8 dstCh) { + llassert(NULL != src && NULL != dst); llassert(srcCh>=dstCh); S32 tmp_x = 0, tmp_y = 0, tmp_x1 = 0, tmp_x2 = 0; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d9a68cb577..98ff36c363 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6284,6 +6284,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) num_vertices = mNumS*mNumT; num_indices = (mNumS-1)*(mNumT-1)*6; + partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build; + if (!partial_build) { resizeVertices(num_vertices); -- cgit v1.2.3 From 3d9406a21ebf54eb6c20a4a33a9967dae3c55176 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 27 Oct 2014 16:21:44 +0200 Subject: MAINT-2759 FIXED Touch is greyed out when right clicking on child prims in a touchable linkset if the script uses a reset on rez --- indra/newview/llviewermenu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ecf5cc2886..4cd60336b3 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2580,9 +2580,13 @@ static LLStringExplicit get_default_item_label(const std::string& item_name) bool enable_object_touch(LLUICtrl* ctrl) { + bool new_value = false; LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - - bool new_value = obj && obj->flagHandleTouch(); + if (obj) + { + LLViewerObject* parent = (LLViewerObject*)obj->getParent(); + new_value = obj->flagHandleTouch() || (parent && parent->flagHandleTouch()); + } std::string item_name = ctrl->getName(); init_default_item_label(item_name); -- cgit v1.2.3 From edb7e3450f16bbda7a30ff56a350e0060cb0e623 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Tue, 28 Oct 2014 17:12:49 +0200 Subject: MAINT-4435 FIXED build fix patchset2 --- indra/llcommon/llmemory.cpp | 2 -- indra/llcommon/llstacktrace.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index 9ed60ad121..ae11988df8 100755 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -2184,8 +2184,6 @@ void* ll_aligned_malloc_fallback( size_t size, int align ) // call debugger __asm int 3; } - memset(p, 0xaa, for_alloc); - memset((void*)((char*)p + for_alloc), 0xbb, sysinfo.dwPageSize); DWORD old; BOOL Res = VirtualProtect((void*)((char*)p + for_alloc), sysinfo.dwPageSize, PAGE_NOACCESS, &old); if(FALSE == Res) { diff --git a/indra/llcommon/llstacktrace.cpp b/indra/llcommon/llstacktrace.cpp index 8d826cbc6e..bbf0e1e141 100755 --- a/indra/llcommon/llstacktrace.cpp +++ b/indra/llcommon/llstacktrace.cpp @@ -156,9 +156,9 @@ bool ll_get_stack_trace(std::vector& lines) return false; } -void ll_get_stack_trace2(std::vector& lines) +void ll_get_stack_trace_internal(std::vector& lines) { - return false; + } #endif -- cgit v1.2.3 From 70a53351b15d1fb127a128941ed39b34a74e1116 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 31 Oct 2014 15:50:20 +0200 Subject: MAINT-3560 FIXED Unused setting MaxFPS was deleted --- indra/newview/app_settings/settings.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 16705e1913..466f52820e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14083,17 +14083,6 @@ Value -1 - MaxFPS - - Comment - Yield some time to the local host if we reach a threshold framerate. - Persist - 1 - Type - F32 - Value - -1.0 - ForcePeriodicRenderingTime Comment -- cgit v1.2.3 From 0ab5b90e4b0e9d9fb02a4cf7d54fd8443299ece8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Oct 2014 19:02:06 +0200 Subject: MAINT-4617 FIXED Viewer chews on "Inventory->Open and Select" until inventory received or recent items selected --- indra/llui/llfolderview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 474b545f00..410b40920f 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1653,8 +1653,10 @@ void LLFolderView::update() scrollToShowSelection(); } - BOOL filter_finished = getViewModelItem()->passedFilter() - && mViewModel->contentsReady(); + BOOL filter_finished = mViewModel->contentsReady() + && (getViewModelItem()->passedFilter() + || ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration() + && !filter_object.isModified())); if (filter_finished || gFocusMgr.childHasKeyboardFocus(mParentPanel.get()) || gFocusMgr.childHasMouseCapture(mParentPanel.get())) -- cgit v1.2.3 From 0ffecdcfb203852a8f4a392331a5d177f8480bdd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 3 Nov 2014 19:32:27 +0200 Subject: MAINT-1884 FIXED "Shortcut Key" text label is overlapped by drop-down lists in Preview floater when user opened more then one gesture --- indra/newview/llpreview.cpp | 1 - indra/newview/skins/default/xui/en/floater_preview_gesture.xml | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 398f4e6e42..3c4d49fe65 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -453,7 +453,6 @@ LLMultiPreview::LLMultiPreview() setTitle(LLTrans::getString("MultiPreviewTitle")); buildTabContainer(); setCanResize(TRUE); - mAutoResize = FALSE; } void LLMultiPreview::onOpen(const LLSD& key) diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index 8baa0a56f7..c4ac936334 100755 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -2,10 +2,12 @@ + width="280" + min_width="280"> Animation to play: -- cgit v1.2.3 From b1ef5dee93d9aa585544e271721f9b84ebf903a9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 4 Nov 2014 13:07:14 +0200 Subject: MAINT-4619 FIXED Using Align Planar Faces on flexible prims causes viewer to crash --- indra/newview/llface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 32b510b21a..2182b619be 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -956,6 +956,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); const LLVector4a& normal4a = vf.mNormals[0]; const LLVector4a& tangent = vf.mTangents[0]; + if (!&tangent) + { + return; + } LLVector4a binormal4a; binormal4a.setCross3(normal4a, tangent); -- cgit v1.2.3 From 5ccf4a42527fb83cc316552535b04fd4b21f77a7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 4 Nov 2014 13:09:26 +0200 Subject: MAINT-4581 FIXED Flickr slurl links break on some regions with spaces in the region name --- indra/newview/llfloaterflickr.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 36afab86b7..600606d838 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -51,7 +51,7 @@ #include "lltabcontainer.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" - +#include static LLPanelInjector t_panel_photo("llflickrphotopanel"); static LLPanelInjector t_panel_account("llflickraccountpanel"); @@ -345,7 +345,12 @@ void LLFlickrPhotoPanel::sendPhoto() std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); if (!parcel_name.empty()) { - photo_link_text += " at " + parcel_name; + boost::regex pattern = boost::regex("\\S\\.[a-zA-Z]{2,}"); + boost::match_results matches; + if(!boost::regex_search(parcel_name, matches, pattern)) + { + photo_link_text += " at " + parcel_name; + } } photo_link_text += " in Second Life"; -- cgit v1.2.3 From f3d73d9e724e9ae1062bf109b6764d43ccba3114 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 4 Nov 2014 13:54:11 +0200 Subject: MAINT-4499 FIXED Forgotten password button is not aligned with Password input field --- indra/newview/skins/default/xui/en/panel_login_first.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_login_first.xml b/indra/newview/skins/default/xui/en/panel_login_first.xml index 84753c55a3..d1416ece82 100644 --- a/indra/newview/skins/default/xui/en/panel_login_first.xml +++ b/indra/newview/skins/default/xui/en/panel_login_first.xml @@ -102,7 +102,7 @@ allow_text_entry="true" follows="left|bottom" height="32" - left="0" + left="2" label="Username" combo_editor.font="SansSerifLarge" max_chars="128" @@ -163,7 +163,7 @@ text_color="EmphasisColor" height="16" name="forgot_password_text" - left="216" + left="219" top="34" width="200"> Forgotten password -- cgit v1.2.3 From 799d13269a5cdf29a5d68c15ceac42f0407b5833 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Mon, 3 Nov 2014 20:05:20 +0200 Subject: MAINT-3585 FIXED Viewer Crashes when attempting to upload image. The bug was fixed, the reasone of crash is following. The Core Flow view contain another GL context and will not care about restoring a previous. I restore context manually. This path also contain a minor changes in another files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All changes described here. Сhange's for fix current bug. indra/llwindow/llwindow.h indra/llwindow/llwindowheadless.h indra/llwindow/llwindowmacosx.h indra/llwindow/llwindowsdl.h indra/llwindow/llwindowwin32.h indra/newview/lllocalbitmaps.cpp indra/newview/llviewerdisplay.cpp indra/newview/llviewerdisplay.h Twice mUsage initialization (replace to forward initialization). indra/llcharacter/lljointstate.h Looks like condition should be befor memcopy call, otherwise - possible CRASH. indra/llcommon/llmd5.cpp Unused condition and variables. indra/llmath/llsphere.cpp Looks like should be under if otherwise - possible CRASH indra\llprimitive\llmodel.cpp Useless assert's. indra/llrender/llrender.cpp indra/newview/lldaycyclemanager.cpp --- indra/llcharacter/lljointstate.h | 24 ++++++++++-------------- indra/llcommon/llmd5.cpp | 12 ++++++------ indra/llmath/llsphere.cpp | 6 +++--- indra/llprimitive/llmodel.cpp | 4 ++-- indra/llrender/llrender.cpp | 24 ++++++++++++------------ indra/llwindow/llwindow.h | 1 + indra/llwindow/llwindowheadless.cpp | 3 +++ indra/llwindow/llwindowheadless.h | 4 +++- indra/llwindow/llwindowmacosx.cpp | 5 +++++ indra/llwindow/llwindowmacosx.h | 2 ++ indra/llwindow/llwindowmesaheadless.h | 1 + indra/llwindow/llwindowsdl.h | 1 + indra/llwindow/llwindowwin32.h | 1 + indra/newview/lldaycyclemanager.cpp | 2 +- indra/newview/lllocalbitmaps.cpp | 5 +++++ indra/newview/llviewerdisplay.cpp | 8 ++++++++ indra/newview/llviewerdisplay.h | 2 ++ 17 files changed, 66 insertions(+), 39 deletions(-) diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h index b9c91f80b5..1ccc6b5093 100755 --- a/indra/llcharacter/lljointstate.h +++ b/indra/llcharacter/lljointstate.h @@ -64,22 +64,18 @@ protected: public: // Constructor LLJointState() - { - mUsage = 0; - mJoint = NULL; - mUsage = 0; - mWeight = 0.f; - mPriority = LLJoint::USE_MOTION_PRIORITY; - } + : mUsage(0) + , mJoint(NULL) + , mWeight(0.f) + , mPriority(LLJoint::USE_MOTION_PRIORITY) + {} LLJointState(LLJoint* joint) - { - mUsage = 0; - mJoint = joint; - mUsage = 0; - mWeight = 0.f; - mPriority = LLJoint::USE_MOTION_PRIORITY; - } + : mUsage(0) + , mJoint(joint) + , mWeight(0.f) + , mPriority(LLJoint::USE_MOTION_PRIORITY) + {} // joint that this state is applied to LLJoint* getJoint() { return mJoint; } diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp index ed80af36d8..f942a976b7 100755 --- a/indra/llcommon/llmd5.cpp +++ b/indra/llcommon/llmd5.cpp @@ -118,6 +118,12 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) { buffer_space = 64 - buffer_index; // how much space is left in buffer + // now, transform each 64-byte piece of the input, bypassing the buffer + if (input == NULL || input_length == 0){ + std::cerr << "LLMD5::update: Invalid input!" << std::endl; + return; + } + // Transform as many times as possible. if (input_length >= buffer_space) { // ie. we have enough to fill the buffer // fill the rest of the buffer and transform @@ -127,12 +133,6 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) { buffer_space); transform (buffer); - // now, transform each 64-byte piece of the input, bypassing the buffer - if (input == NULL || input_length == 0){ - std::cerr << "LLMD5::update: Invalid input!" << std::endl; - return; - } - for (input_index = buffer_space; input_index + 63 < input_length; input_index += 64) transform (input+input_index); diff --git a/indra/llmath/llsphere.cpp b/indra/llmath/llsphere.cpp index 740047b93a..a8d6200488 100755 --- a/indra/llmath/llsphere.cpp +++ b/indra/llmath/llsphere.cpp @@ -248,8 +248,8 @@ LLSphere LLSphere::getBoundingSphere(const std::vector& sphere_list) // compute the starting step-size F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ])); F32 step_length = bounding_radius - minimum_radius; - S32 step_count = 0; - S32 max_step_count = 12; + //S32 step_count = 0; + //S32 max_step_count = 12; F32 half_milimeter = 0.0005f; // wander the center around in search of tighter solutions @@ -258,7 +258,7 @@ LLSphere LLSphere::getBoundingSphere(const std::vector& sphere_list) S32 last_dz = 2; while (step_length > half_milimeter - && step_count < max_step_count) + /*&& step_count < max_step_count*/) { // the algorithm for testing the maximum radius could be expensive enough // that it makes sense to NOT duplicate testing when possible, so we keep diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index aa8dd7697c..1f96d1557d 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1681,11 +1681,11 @@ LLSD LLModel::writeModel( } } - F32* src_tc = (F32*) face.mTexCoords[j].mV; - //texcoord if (face.mTexCoords) { + F32* src_tc = (F32*) face.mTexCoords[j].mV; + for (U32 k = 0; k < 2; ++k) { //for each component //convert to 16-bit normalized diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 0af402efea..1ca6e99ecf 100755 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -53,7 +53,7 @@ bool LLRender::sGLCoreProfile = false; static const U32 LL_NUM_TEXTURE_LAYERS = 32; static const U32 LL_NUM_LIGHT_UNITS = 8; -static GLenum sGLTextureType[] = +static const GLenum sGLTextureType[] = { GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, @@ -61,14 +61,14 @@ static GLenum sGLTextureType[] = GL_TEXTURE_2D_MULTISAMPLE }; -static GLint sGLAddressMode[] = +static const GLint sGLAddressMode[] = { GL_REPEAT, GL_MIRRORED_REPEAT, GL_CLAMP_TO_EDGE }; -static GLenum sGLCompareFunc[] = +static const GLenum sGLCompareFunc[] = { GL_NEVER, GL_ALWAYS, @@ -82,7 +82,7 @@ static GLenum sGLCompareFunc[] = const U32 immediate_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD0; -static GLenum sGLBlendFactor[] = +static const GLenum sGLBlendFactor[] = { GL_ONE, GL_ZERO, @@ -99,12 +99,12 @@ static GLenum sGLBlendFactor[] = }; LLTexUnit::LLTexUnit(S32 index) -: mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT), -mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT), -mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR), -mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA), -mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0), -mHasMipMaps(false) + : mCurrTexType(TT_NONE), mCurrBlendType(TB_MULT), + mCurrColorOp(TBO_MULT), mCurrAlphaOp(TBO_MULT), + mCurrColorSrc1(TBS_TEX_COLOR), mCurrColorSrc2(TBS_PREV_COLOR), + mCurrAlphaSrc1(TBS_TEX_ALPHA), mCurrAlphaSrc2(TBS_PREV_ALPHA), + mCurrColorScale(1), mCurrAlphaScale(1), mCurrTexture(0), + mHasMipMaps(false) { llassert_always(index < (S32)LL_NUM_TEXTURE_LAYERS); mIndex = index; @@ -1189,7 +1189,7 @@ void LLRender::syncMatrices() if (shader) { - llassert(shader); + //llassert(shader); bool mvp_done = false; @@ -1288,7 +1288,7 @@ void LLRender::syncMatrices() } else if (!LLGLSLShader::sNoFixedFunction) { - GLenum mode[] = + static const GLenum mode[] = { GL_MODELVIEW, GL_PROJECTION, diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 0a30f4c807..0aa1fbe905 100755 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -122,6 +122,7 @@ public: virtual void gatherInput() = 0; virtual void delayInputProcessing() = 0; virtual void swapBuffers() = 0; + virtual void restoreGLContext() = 0; virtual void bringToFront() = 0; virtual void focusClient() { }; // this may not have meaning or be required on other platforms, therefore, it's not abstract virtual void setOldResize(bool oldresize) { }; diff --git a/indra/llwindow/llwindowheadless.cpp b/indra/llwindow/llwindowheadless.cpp index e6e6bc67ff..b6f67c6107 100755 --- a/indra/llwindow/llwindowheadless.cpp +++ b/indra/llwindow/llwindowheadless.cpp @@ -52,3 +52,6 @@ void LLWindowHeadless::swapBuffers() { } +void LLWindowHeadless::restoreGLContext() +{ +} diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h index 1f767f4c97..5975ee3410 100755 --- a/indra/llwindow/llwindowheadless.h +++ b/indra/llwindow/llwindowheadless.h @@ -74,8 +74,10 @@ public: /*virtual*/ void gatherInput() {}; /*virtual*/ void delayInputProcessing() {}; /*virtual*/ void swapBuffers(); + /*virtual*/ void restoreGLContext(); - // handy coordinate space conversion routines + + // handy coordinate space conversion routines /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; }; /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; }; /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; }; diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index e8d0a8bdb8..9ed298a481 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -901,6 +901,11 @@ void LLWindowMacOSX::swapBuffers() CGLFlushDrawable(mContext); } +void LLWindowMacOSX::restoreGLContext() +{ + CGLSetCurrentContext(mContext); +} + F32 LLWindowMacOSX::getGamma() { F32 result = 2.2; // Default to something sane diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 825fd05c5f..194c9bb27a 100755 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -87,6 +87,8 @@ public: /*virtual*/ void gatherInput(); /*virtual*/ void delayInputProcessing() {}; /*virtual*/ void swapBuffers(); + /*virtual*/ void restoreGLContext(); + // handy coordinate space conversion routines /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to); diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h index 8f70aee4f6..00e42240e6 100755 --- a/indra/llwindow/llwindowmesaheadless.h +++ b/indra/llwindow/llwindowmesaheadless.h @@ -77,6 +77,7 @@ public: /*virtual*/ void gatherInput() {}; /*virtual*/ void delayInputProcessing() {}; /*virtual*/ void swapBuffers(); + /*virtual*/ void restoreGLContext() {}; // handy coordinate space conversion routines /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; }; diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index c5ce892a04..7193e6f45a 100755 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -97,6 +97,7 @@ public: /*virtual*/ void processMiscNativeEvents(); /*virtual*/ void gatherInput(); /*virtual*/ void swapBuffers(); + /*virtual*/ void restoreGLContext() {}; /*virtual*/ void delayInputProcessing() { }; diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 169d264808..2ca8d48fc7 100755 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -83,6 +83,7 @@ public: /*virtual*/ void gatherInput(); /*virtual*/ void delayInputProcessing(); /*virtual*/ void swapBuffers(); + /*virtual*/ void restoreGLContext() {}; // handy coordinate space conversion routines /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to); diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp index 131675310e..803e2b2fb2 100755 --- a/indra/newview/lldaycyclemanager.cpp +++ b/indra/newview/lldaycyclemanager.cpp @@ -207,7 +207,7 @@ bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data) { if (name.empty()) { - llassert(name.empty()); + //llassert(name.empty()); return false; } diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 897ee8429a..4a89fc92b4 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -64,6 +64,8 @@ #include "llimagedimensionsinfo.h" #include "llviewercontrol.h" #include "lltrans.h" +#include "llviewerdisplay.h" + /*=======================================*/ /* Formal declarations, constants, etc. */ /*=======================================*/ @@ -842,6 +844,9 @@ bool LLLocalBitmapMgr::addUnit() LLFilePicker& picker = LLFilePicker::instance(); if (picker.getMultipleOpenFiles(LLFilePicker::FFLOAD_IMAGE)) { + //For fix problem with Core Flow view on OSX + restoreGLContext(); + sTimer.stopTimer(); std::string filename = picker.getFirstFile(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 981e4c40aa..dfbb128d3b 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1344,6 +1344,14 @@ void swap() gDisplaySwapBuffers = TRUE; } +void restoreGLContext() +{ + if(gViewerWindow && gViewerWindow->getWindow()) + { + gViewerWindow->getWindow()->restoreGLContext(); + } +} + void renderCoordinateAxes() { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llviewerdisplay.h b/indra/newview/llviewerdisplay.h index f6467d7f93..dcc78fe42f 100755 --- a/indra/newview/llviewerdisplay.h +++ b/indra/newview/llviewerdisplay.h @@ -34,6 +34,8 @@ void display_cleanup(); void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE); +void restoreGLContext(); + extern BOOL gDisplaySwapBuffers; extern BOOL gDepthDirty; extern BOOL gTeleportDisplay; -- cgit v1.2.3 From ae04cb854948ae3ef5c84ac11c2d7a4e04b28a9b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 5 Nov 2014 12:36:56 +0200 Subject: MAINT-4621 FIXED start new session with the caller (if it doesn't exist) and only then show autoreject message --- indra/newview/llimview.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8d8239611c..5d3a11e245 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3061,6 +3061,24 @@ void LLIMMgr::inviteToSession( { if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall) { + if (!hasSession(session_id) && (type == IM_SESSION_P2P_INVITE)) + { + std::string fixed_session_name = caller_name; + if(!session_name.empty() && session_name.size()>1) + { + fixed_session_name = session_name; + } + else + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(caller_id, &av_name)) + { + fixed_session_name = av_name.getDisplayName(); + } + } + LLIMModel::getInstance()->newSession(session_id, fixed_session_name, IM_NOTHING_SPECIAL, caller_id, false, false); + } + LLSD args; addSystemMessage(session_id, "you_auto_rejected_call", args); send_do_not_disturb_message(gMessageSystem, caller_id, session_id); -- cgit v1.2.3 From 034cb895bd5646d730e6f956af4ce849a010b184 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 6 Nov 2014 11:36:21 +0200 Subject: MAINT-3067 FIXED Show context menu when right clicking avatar name in the list. Bumps, Pushes and Hits moved to Help from Develop menu --- indra/newview/llfloaterbump.cpp | 1 + indra/newview/skins/default/xui/da/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/de/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 19 +++++++++---------- indra/newview/skins/default/xui/es/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/fr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/it/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ja/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/pl/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/pt/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/ru/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/tr/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/zh/menu_viewer.xml | 4 ++-- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index ad44c509d9..345df2fcb3 100755 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -58,6 +58,7 @@ void LLFloaterBump::onOpen(const LLSD& key) if (!list) return; list->deleteAllItems(); + list->setContextMenu(LLScrollListCtrl::MENU_AVATAR); if (gMeanCollisionList.empty()) { diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index f2ed7c2e64..aa6bc53672 100755 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -128,6 +128,7 @@ + @@ -261,8 +262,7 @@ - - + diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index c9fad9c9d3..50a6dafa91 100755 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -176,6 +176,7 @@ + @@ -352,8 +353,7 @@ - - + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 560f81a6fd..658c716ee7 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1417,7 +1417,14 @@ - + + + + @@ -3031,15 +3038,7 @@ name="Dump Scripted Camera"> - - - - - + + @@ -322,8 +323,7 @@ - - + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 6e36d19ba9..2c30fe07b4 100755 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -176,6 +176,7 @@ + @@ -352,8 +353,7 @@ - - + diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index f535a53e66..d25e11e7a4 100755 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -176,6 +176,7 @@ + @@ -323,8 +324,7 @@ - - + diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 4e6c6808c6..0b85c693f0 100755 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -176,6 +176,7 @@ + @@ -352,8 +353,7 @@ - - + diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index e1725fc308..a354cca9ad 100755 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -126,6 +126,7 @@ + @@ -252,8 +253,7 @@ - - + diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index a761cfa177..0bbb9683a0 100755 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -176,6 +176,7 @@ + @@ -323,8 +324,7 @@ - - + diff --git a/indra/newview/skins/default/xui/ru/menu_viewer.xml b/indra/newview/skins/default/xui/ru/menu_viewer.xml index fad1ea51e0..f00a4df81f 100755 --- a/indra/newview/skins/default/xui/ru/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ru/menu_viewer.xml @@ -167,6 +167,7 @@ + @@ -343,8 +344,7 @@ - - + diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index 23e2903e03..a488a0916f 100755 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -174,6 +174,7 @@ + @@ -350,8 +351,7 @@ - - + diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index 46d46e901c..adc29a3944 100755 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -174,6 +174,7 @@ + @@ -350,8 +351,7 @@ - - + -- cgit v1.2.3 From 811878df666f5a115d7715639d618877ed4de44a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 5 Nov 2014 17:52:14 +0200 Subject: MAINT-202 FIXED Can't open scripts in copied objects individually on the viewer2 --- indra/newview/llassetuploadresponders.cpp | 5 ++++- indra/newview/llpanelcontents.cpp | 3 --- indra/newview/llpanelobjectinventory.cpp | 5 ++++- indra/newview/llpreview.cpp | 2 +- indra/newview/llpreviewscript.cpp | 24 +++++++++++++++++------- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 466677b8be..02e88a8b89 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -652,7 +652,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) } else { - LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance("preview_scriptedit", LLSD(item_id)); + LLSD floater_key; + floater_key["taskid"] = task_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if (preview) { // Bytecode save completed diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 407cbfc47b..451f41cd3b 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -197,9 +197,6 @@ void LLPanelContents::onClickNewScript(void *userdata) // *TODO: The script creation should round-trip back to the // viewer so the viewer can auto-open the script and start // editing ASAP. -#if 0 - LLFloaterReg::showInstance("preview_scriptedit", LLSD(inv_item->getUUID()), TAKE_FOCUS_YES); -#endif } } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6354b5a02b..1f16505f71 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1107,7 +1107,10 @@ void LLTaskLSLBridge::openItem() } if (object->permModify() || gAgent.isGodlike()) { - LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES); + LLSD floater_key; + floater_key["taskid"] = mPanel->getTaskUUID(); + floater_key["itemid"] = mUUID; + LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance("preview_scriptedit", floater_key, TAKE_FOCUS_YES); if (preview) { preview->setObjectID(mPanel->getTaskUUID()); diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 3c4d49fe65..cab7eff0dc 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -53,7 +53,7 @@ LLPreview::LLPreview(const LLSD& key) : LLFloater(key), - mItemUUID(key.asUUID()), + mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()), mObjectUUID(), // set later by setObjectID() mCopyToInvBtn( NULL ), mForceClose(FALSE), diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index a41986373e..92febf6c85 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1840,7 +1840,8 @@ void LLLiveLSLEditor::loadAsset() else if(item && mItem.notNull()) { // request the text from the object - LLUUID* user_data = new LLUUID(mItemUUID); // ^ mObjectUUID + LLSD* user_data = new LLSD(); + user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID); gAssetStorage->getInvItemAsset(object->getRegion()->getHost(), gAgent.getID(), gAgent.getSessionID(), @@ -1917,9 +1918,9 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, { LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id << LL_ENDL; - LLUUID* xored_id = (LLUUID*)user_data; + LLSD* floater_key = (LLSD*)user_data; - LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", *xored_id); + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", *floater_key); if(instance ) { @@ -1948,7 +1949,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, } } - delete xored_id; + delete floater_key; } void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type) @@ -2307,7 +2308,10 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da } else { - LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID + LLSD floater_key; + floater_key["taskid"] = data->mSaveObjectID; + floater_key["itemid"] = data->mItem->getUUID(); + LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if (self) { self->getWindow()->decBusyCount(); @@ -2332,7 +2336,10 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use if(0 ==status) { LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; - LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID + LLSD floater_key; + floater_key["taskid"] = data->mSaveObjectID; + floater_key["itemid"] = data->mItem->getUUID(); + LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if (self) { // Tell the user that the compile worked. @@ -2410,7 +2417,10 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) msg->getUUIDFast(_PREHASH_Script, _PREHASH_ObjectID, object_id); msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id); - LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", item_id); // ^ object_id + LLSD floater_key; + floater_key["taskid"] = object_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if(instance) { instance->mHaveRunningInfo = TRUE; -- cgit v1.2.3 From 815cfa50607f122a455322febd77dfc6cf2ae079 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 7 Nov 2014 16:29:32 +0200 Subject: MAINT-1333 FIXED Disable "for sale" controls for attached prim --- indra/newview/llpanelpermissions.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 58055d98c6..ce9231d6f2 100755 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -851,6 +851,14 @@ void LLPanelPermissions::refresh() combo_click_action->setValue(LLSD(combo_value)); } } + + if(LLSelectMgr::getInstance()->getSelection()->isAttachment()) + { + getChildView("checkbox for sale")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(FALSE); + getChild("sale type")->setEnabled(FALSE); + } + getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); getChildView("clickaction")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); } -- cgit v1.2.3 From c0ae1fe956566d9ee40301e4009a0882c971a61b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 10 Nov 2014 17:20:03 +0200 Subject: MAINT-4617 FIXED Viewer chews on "Inventory->Open and Select" until inventory received or recent items selected --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 410b40920f..00d553e457 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1611,7 +1611,7 @@ void LLFolderView::update() LLFolderViewFilter& filter_object = getFolderViewModel()->getFilter(); - if (filter_object.isModified() && filter_object.isNotDefault()) + if (filter_object.isModified() && filter_object.isNotDefault() && mParentPanel.get()->getVisible()) { mNeedsAutoSelect = TRUE; } -- cgit v1.2.3 From a325ad8fbddf52e479ef1c86da59495e66aac679 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 12 Nov 2014 11:09:29 +0200 Subject: MAINT-4662 FIXED Packet Loss always shows zero in the statistics floater --- indra/newview/llworld.cpp | 7 +++++-- indra/newview/skins/default/xui/en/floater_stats.xml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index b4e8114a5f..315af3f942 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -796,9 +796,12 @@ void LLWorld::updateNetStats() add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); - if (packets_in) + + F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); + if (total_packets_in > 0) { - sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); + F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST); + sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index 2aa582beea..90f9591f29 100755 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -41,6 +41,7 @@ show_bar="true"/> Date: Tue, 11 Nov 2014 17:46:17 +0200 Subject: MAINT-4657 FIXED Objects can appear to have wrong 'for sale' type when viewed in inventory --- indra/newview/llfloaterproperties.cpp | 49 ++++++++-------------- indra/newview/llsidepaneliteminfo.cpp | 42 ++++++++----------- .../xui/en/floater_inventory_item_properties.xml | 46 +++++--------------- .../skins/default/xui/en/sidepanel_item_info.xml | 22 ++++++---- 4 files changed, 60 insertions(+), 99 deletions(-) diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index a3bf99f054..6bfc780722 100755 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -36,6 +36,7 @@ #include "llagent.h" #include "llbutton.h" #include "llcheckboxctrl.h" +#include "llcombobox.h" #include "llavataractions.h" #include "llinventorydefines.h" #include "llinventoryobserver.h" @@ -143,7 +144,7 @@ BOOL LLFloaterProperties::postBuild() getChild("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitPermissions, this)); // Mark for sale or not, and sale info getChild("CheckPurchase")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this)); - getChild("RadioSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this)); + getChild("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this)); // "Price" label for edit getChild("Edit Cost")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this)); // The UI has been built, now fill in all the values @@ -188,7 +189,7 @@ void LLFloaterProperties::refresh() "CheckNextOwnerCopy", "CheckNextOwnerTransfer", "CheckPurchase", - "RadioSaleType", + "ComboBoxSaleType", "Edit Cost" }; for(size_t t=0; tgetSaleInfo(); BOOL is_for_sale = sale_info.isForSale(); + LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); + LLUICtrl* edit_cost = getChild("Edit Cost"); + // Check for ability to change values. if (is_obj_modify && can_agent_sell && gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE)) @@ -491,9 +495,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); - getChildView("RadioSaleType")->setEnabled(is_complete && is_for_sale); getChildView("TextPrice")->setEnabled(is_complete && is_for_sale); - getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale); + combo_sale_type->setEnabled(is_complete && is_for_sale); + edit_cost->setEnabled(is_complete && is_for_sale); } else { @@ -505,31 +509,28 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); - getChildView("RadioSaleType")->setEnabled(FALSE); getChildView("TextPrice")->setEnabled(FALSE); - getChildView("Edit Cost")->setEnabled(FALSE); + combo_sale_type->setEnabled(FALSE); + edit_cost->setEnabled(FALSE); } // Set values. getChild("CheckPurchase")->setValue(is_for_sale); - getChildView("combobox sale copy")->setEnabled(is_for_sale); - getChildView("Edit Cost")->setEnabled(is_for_sale); getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); getChild("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); getChild("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); - LLRadioGroup* radioSaleType = getChild("RadioSaleType"); if (is_for_sale) { - radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1); S32 numerical_price; numerical_price = sale_info.getSalePrice(); - getChild("Edit Cost")->setValue(llformat("%d",numerical_price)); + edit_cost->setValue(llformat("%d",numerical_price)); + combo_sale_type->setValue(sale_info.getSaleType()); } else { - radioSaleType->setSelectedIndex(-1); - getChild("Edit Cost")->setValue(llformat("%d",0)); + edit_cost->setValue(llformat("%d",0)); + combo_sale_type->setValue(LLSaleInfo::FS_COPY); } } @@ -757,25 +758,11 @@ void LLFloaterProperties::updateSaleInfo() { // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; - - LLRadioGroup* RadioSaleType = getChild("RadioSaleType"); - if(RadioSaleType) + + LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); + if (combo_sale_type) { - switch (RadioSaleType->getSelectedIndex()) - { - case 0: - sale_type = LLSaleInfo::FS_ORIGINAL; - break; - case 1: - sale_type = LLSaleInfo::FS_COPY; - break; - case 2: - sale_type = LLSaleInfo::FS_CONTENTS; - break; - default: - sale_type = LLSaleInfo::FS_COPY; - break; - } + sale_type = static_cast(combo_sale_type->getValue().asInteger()); } if (sale_type == LLSaleInfo::FS_COPY diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 1d20b7bed5..126f1fb9de 100755 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -32,6 +32,7 @@ #include "llagent.h" #include "llavataractions.h" #include "llbutton.h" +#include "llcombobox.h" #include "llfloaterreg.h" #include "llgroupactions.h" #include "llinventorydefines.h" @@ -173,6 +174,8 @@ BOOL LLSidepanelItemInfo::postBuild() getChild("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); // Mark for sale or not, and sale info getChild("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + // Change sale type, and sale info + getChild("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); // "Price" label for edit getChild("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); refresh(); @@ -435,7 +438,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) "CheckNextOwnerTransfer", "CheckPurchase", "SaleLabel", - "combobox sale copy", + "ComboBoxSaleType", "Edit Cost", "TextPrice" }; @@ -617,6 +620,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) const LLSaleInfo& sale_info = item->getSaleInfo(); BOOL is_for_sale = sale_info.isForSale(); + LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); + LLUICtrl* edit_cost = getChild("Edit Cost"); + // Check for ability to change values. if (is_obj_modify && can_agent_sell && gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE)) @@ -630,7 +636,8 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); getChildView("TextPrice")->setEnabled(is_complete && is_for_sale); - getChildView("Edit Cost")->setEnabled(is_complete && is_for_sale); + combo_sale_type->setEnabled(is_complete && is_for_sale); + edit_cost->setEnabled(is_complete && is_for_sale); } else { @@ -643,13 +650,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); getChildView("TextPrice")->setEnabled(FALSE); - getChildView("Edit Cost")->setEnabled(FALSE); + combo_sale_type->setEnabled(FALSE); + edit_cost->setEnabled(FALSE); } // Set values. getChild("CheckPurchase")->setValue(is_for_sale); - getChildView("combobox sale copy")->setEnabled(is_for_sale); - getChildView("Edit Cost")->setEnabled(is_for_sale); getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); getChild("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); getChild("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); @@ -658,11 +664,13 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { S32 numerical_price; numerical_price = sale_info.getSalePrice(); - getChild("Edit Cost")->setValue(llformat("%d",numerical_price)); + edit_cost->setValue(llformat("%d",numerical_price)); + combo_sale_type->setValue(sale_info.getSaleType()); } else { - getChild("Edit Cost")->setValue(llformat("%d",0)); + edit_cost->setValue(llformat("%d",0)); + combo_sale_type->setValue(LLSaleInfo::FS_COPY); } } @@ -918,24 +926,10 @@ void LLSidepanelItemInfo::updateSaleInfo() // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; - LLRadioGroup* RadioSaleType = getChild("RadioSaleType"); - if(RadioSaleType) + LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); + if (combo_sale_type) { - switch (RadioSaleType->getSelectedIndex()) - { - case 0: - sale_type = LLSaleInfo::FS_ORIGINAL; - break; - case 1: - sale_type = LLSaleInfo::FS_COPY; - break; - case 2: - sale_type = LLSaleInfo::FS_CONTENTS; - break; - default: - sale_type = LLSaleInfo::FS_COPY; - break; - } + sale_type = static_cast(combo_sale_type->getValue().asInteger()); } if (sale_type == LLSaleInfo::FS_COPY diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index adef066aef..6667238232 100755 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -304,16 +304,20 @@ left_pad="5" layout="topleft" follows="left|top" - name="combobox sale copy" + name="ComboBoxSaleType" width="110"> - - + + + label="Original" + value="1" /> - - -