From 2e0a8231d2ab9be0300083cb3d793bf57fcfb793 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 25 Sep 2014 17:37:46 -0400 Subject: Simple viewer-side hack to adjust avatar position --- indra/newview/app_settings/settings.xml | 15 +++++++++++++++ indra/newview/llvoavatar.cpp | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 000362ebfd..bd035899d0 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -654,6 +654,21 @@ <key>Value</key> <integer>2</integer> </map> + <key>AvatarPosFinalOffset</key> + <map> + <key>Comment</key> + <string>After-everything-else fixup for avatar position.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Vector3</string> + <key>Value</key> + <array> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + </array> + </map> <key>AvatarPickerURL</key> <map> <key>Comment</key> diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9f42776d78..dd7d42ee25 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3412,9 +3412,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; + root_pos += LLVector3d(gSavedSettings.getVector3("AvatarPosFinalOffset")); LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); + if (newPosition != mRoot->getXform()->getWorldPosition()) { mRoot->touch(); @@ -3580,7 +3582,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } else if (mDrawable.notNull()) { - mRoot->setPosition(mDrawable->getPosition()); + LLVector3 pos = mDrawable->getPosition(); + pos += gSavedSettings.getVector3("AvatarPosFinalOffset"); + mRoot->setPosition(pos); mRoot->setRotation(mDrawable->getRotation()); } -- cgit v1.2.3 From 626ee6777e68c0df36c82290c8e00eaebe43b8b4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 29 Sep 2014 16:39:08 -0400 Subject: SL-92 WIP - can edit hover height debug setting via slider --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterhoverheight.cpp | 59 ++++++++++++++++++++++ indra/newview/llfloaterhoverheight.h | 41 +++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 4 +- indra/newview/llviewermenu.cpp | 15 ++++++ .../skins/default/xui/en/menu_attachment_self.xml | 8 +++ .../skins/default/xui/en/menu_avatar_self.xml | 8 +++ 7 files changed, 136 insertions(+), 1 deletion(-) create mode 100755 indra/newview/llfloaterhoverheight.cpp create mode 100755 indra/newview/llfloaterhoverheight.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b81b2aa9cf..eb7bddce33 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -244,6 +244,7 @@ set(viewer_SOURCE_FILES llfloaterhandler.cpp llfloaterhardwaresettings.cpp llfloaterhelpbrowser.cpp + llfloaterhoverheight.cpp llfloaterhud.cpp llfloaterimagepreview.cpp llfloaterimsessiontab.cpp @@ -848,6 +849,7 @@ set(viewer_HEADER_FILES llfloaterhandler.h llfloaterhardwaresettings.h llfloaterhelpbrowser.h + llfloaterhoverheight.h llfloaterhud.h llfloaterimagepreview.h llfloaterimnearbychat.h diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp new file mode 100755 index 0000000000..5222f7bb3f --- /dev/null +++ b/indra/newview/llfloaterhoverheight.cpp @@ -0,0 +1,59 @@ +/** +* @file llfloaterhoverheight.cpp +* @brief Controller for self avatar hover height +* @author vir@lindenlab.com +* +* $LicenseInfo:firstyear=2014&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2014, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterhoverheight.h" +#include "llsliderctrl.h" +#include "llviewercontrol.h" + +LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) +{ +} + +BOOL LLFloaterHoverHeight::postBuild() +{ + LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); + + LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + F32 value = offset[2]; + sldrCtrl->setValue(value,FALSE); + childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL); + + return TRUE; +} + +// static +void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) +{ + LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); + F32 value = sldrCtrl->getValueF32(); + + LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + offset[2] = value; + gSavedSettings.setVector3("AvatarPosFinalOffset",offset); +} diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h new file mode 100755 index 0000000000..4ede8f08e0 --- /dev/null +++ b/indra/newview/llfloaterhoverheight.h @@ -0,0 +1,41 @@ +/** +* @file llfloaterhoverheight.h +* @brief Controller for self avatar hover height. +* @author vir@lindenlab.com +* +* $LicenseInfo:firstyear=2014&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2014, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ +#ifndef LL_LLFLOATERHOVERHEIGHT_H +#define LL_LLFLOATERHOVERHEIGHT_H + +#include "llfloater.h" + +class LLFloaterHoverHeight: public LLFloater +{ +public: + LLFloaterHoverHeight(const LLSD& key); + BOOL postBuild(); + + static void onSliderMoved(LLUICtrl* ctrl, void* userData); +}; + +#endif diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 4e491f257d..7c98e6ef74 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -70,6 +70,7 @@ #include "llfloatergroups.h" #include "llfloaterhardwaresettings.h" #include "llfloaterhelpbrowser.h" +#include "llfloaterhoverheight.h" #include "llfloaterhud.h" #include "llfloaterimagepreview.h" #include "llfloaterimsession.h" @@ -220,7 +221,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>); LLFloaterReg::add("group_picker", "floater_choose_group.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGroupPicker>); - LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>); + LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>); + LLFloaterReg::add("edit_hover_height", "floater_edit_hover_height.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHoverHeight>); LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>); LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterIMSession>); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8c9429c05d..885c85d6c5 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3871,6 +3871,14 @@ class LLEnableEditShape : public view_listener_t } }; +class LLEnableHoverHeight : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return true; + } +}; + class LLEnableEditPhysics : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -6046,6 +6054,11 @@ void handle_edit_shape() LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_shape")); } +void handle_hover_height() +{ + LLFloaterReg::showInstance("edit_hover_height"); +} + void handle_edit_physics() { LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_physics")); @@ -8542,10 +8555,12 @@ void initialize_menus() view_listener_t::addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape"); + view_listener_t::addMenu(new LLEnableHoverHeight(), "Edit.EnableHoverHeight"); view_listener_t::addMenu(new LLEnableEditPhysics(), "Edit.EnableEditPhysics"); commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar)); commit.add("EditOutfit", boost::bind(&handle_edit_outfit)); commit.add("EditShape", boost::bind(&handle_edit_shape)); + commit.add("HoverHeight", boost::bind(&handle_hover_height)); commit.add("EditPhysics", boost::bind(&handle_edit_physics)); // View menu diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index bcbc8d5b86..c6ae844d67 100755 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -91,6 +91,14 @@ name="Edit Outfit"> <menu_item_call.on_enable function="Edit.EnableEditShape" /> </menu_item_call> + <menu_item_call label="Hover Height" + layout="topleft" + name="Hover Height"> + <menu_item_call.on_click + function="HoverHeight" /> + <menu_item_call.on_enable + function="Edit.EnableHoverHeight" /> + </menu_item_call> <menu_item_call label="My Friends" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index ca0c9bd5e4..d3b0b07f70 100755 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -229,6 +229,14 @@ <menu_item_call.on_enable function="Edit.EnableEditShape" /> </menu_item_call> + <menu_item_call label="Hover Height" + layout="topleft" + name="Hover Height"> + <menu_item_call.on_click + function="HoverHeight" /> + <menu_item_call.on_enable + function="Edit.EnableHoverHeight" /> + </menu_item_call> <menu_item_call label="My Friends" layout="topleft" -- cgit v1.2.3 From 52ed6ac28697ffcfd7300602aec34db8eafc171a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Tue, 30 Sep 2014 15:34:16 -0400 Subject: SL-92 WIP - ui floater tweaks for hover height control --- indra/newview/llfloaterhoverheight.cpp | 12 +++++++++++- indra/newview/llfloaterhoverheight.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 5222f7bb3f..6f7f8374d2 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -37,11 +37,14 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) BOOL LLFloaterHoverHeight::postBuild() { - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); F32 value = offset[2]; + + LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setValue(value,FALSE); + sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); + sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL); return TRUE; @@ -57,3 +60,10 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) offset[2] = value; gSavedSettings.setVector3("AvatarPosFinalOffset",offset); } + +// Do extra send-to-the-server work when slider drag completes, or new +// value entered as text. +void LLFloaterHoverHeight::onFinalCommit() +{ + LL_INFOS() << "FINAL FINAL!!!" << LL_ENDL; +} diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index 4ede8f08e0..1aede19e57 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -36,6 +36,8 @@ public: BOOL postBuild(); static void onSliderMoved(LLUICtrl* ctrl, void* userData); + + void onFinalCommit(); }; #endif -- cgit v1.2.3 From 1355578332b4225488918d892e21c84634fb1b40 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> 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(+) (limited to 'indra/newview') 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)" <vir@lindenlab.com> Date: Wed, 8 Oct 2014 11:45:12 -0400 Subject: Switched to keying joint offsets by mesh id --- indra/newview/llfloatermodelpreview.cpp | 4 +++- indra/newview/llvoavatar.cpp | 8 ++++---- indra/newview/llvoavatar.h | 2 +- indra/newview/llvovolume.cpp | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview') 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 a9692c233e4e4a910e6a01f06a6ce3641af5735d Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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<LLColorSwatchCtrl>("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<LLColor4> mSavedColors; + std::vector<LLColor4> mSavedShinyColors; uuid_vec_t mSavedTextures; std::vector<LLVector3> mTextureScaleRatios; std::vector<LLVector3> 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 @@ <key>Value</key> <integer>1</integer> </map> + <key>EnvironmentPersistAcrossLogin</key> + <map> + <key>Comment</key> + <string>Keep Environment settings consistent across sessions</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>UseDayCycle</key> <map> <key>Comment</key> 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 1414b5a0f923e265a8b38b297902b83c62394eb4 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(+) (limited to 'indra/newview') 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<LLFloaterIMSessionTab>("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 <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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<LLPreviewLSL>("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<LLPreviewLSL>("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. <string name="CompileSuccessful">Compile successful!</string> <string name="CompileSuccessfulSaving">Compile successful, saving...</string> <string name="SaveComplete">Save complete.</string> + <string name="UploadFailed">File upload failed: </string> <string name="ObjectOutOfRange">Script (object out of range)</string> <!-- god tools --> -- cgit v1.2.3 From 94ac0064354594de8adbb99084029c8b4027b2f6 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 <maksymsproductengine@lindenlab.com> 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/newview/app_settings/settings.xml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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 @@ <key>Type</key> <string>LLSD</string> <key>Value</key> + <array /> </map> <key>LSLFindCaseInsensitivity</key> <map> @@ -11737,7 +11738,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <integer>0.0</integer> + <real>0.0</real> </map> <key>TextureFetchSource</key> <map> @@ -15584,7 +15585,17 @@ <key>Value</key> <integer>0</integer> </map> - + <key>HTTPNoProtocolShowGreyQuery</key> + <map> + <key>Comment</key> + <string>Enable(disable) appearance of port, query and fragment parts of url for HTTP and HTTPNoProtocol entries in grey.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> </map> </llsd> -- cgit v1.2.3 From bf3d017b69ba0a862aa448dc97c8783a7d911fde Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 <none@none> 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(-) (limited to 'indra/newview') 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<LLSpeaker> 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<LLSpeaker> 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<LLSpeaker> 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<LLSpeaker> speackerp); bool removeSpeaker(const LLUUID& speaker_id); typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t; -- cgit v1.2.3 From e3f62a54e6c3fe5423a1e766c4ee30388aa471bd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 3d9406a21ebf54eb6c20a4a33a9967dae3c55176 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 70a53351b15d1fb127a128941ed39b34a74e1116 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 @@ <key>Value</key> <integer>-1</integer> </map> - <key>MaxFPS</key> - <map> - <key>Comment</key> - <string>Yield some time to the local host if we reach a threshold framerate.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>F32</string> - <key>Value</key> - <real>-1.0</real> - </map> <key>ForcePeriodicRenderingTime</key> <map> <key>Comment</key> -- cgit v1.2.3 From 0ffecdcfb203852a8f4a392331a5d177f8480bdd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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 @@ <floater legacy_header_height="18" height="460" + min_height="460" layout="topleft" name="gesture_preview" help_topic="gesture_preview" - width="280"> + width="280" + min_width="280"> <floater.string name="step_anim"> Animation to play: -- cgit v1.2.3 From b1ef5dee93d9aa585544e271721f9b84ebf903a9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> 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(+) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 <boost/regex.hpp> static LLPanelInjector<LLFlickrPhotoPanel> t_panel_photo("llflickrphotopanel"); static LLPanelInjector<LLFlickrAccountPanel> 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<std::string::const_iterator> 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 <ruslantproductengine@lindenlab.com> 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/newview/lldaycyclemanager.cpp | 2 +- indra/newview/lllocalbitmaps.cpp | 5 +++++ indra/newview/llviewerdisplay.cpp | 8 ++++++++ indra/newview/llviewerdisplay.h | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(+) (limited to 'indra/newview') 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 <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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 @@ <menu_item_check label="Aktiver tips" name="Enable Hints"/> <menu_item_call label="Rapporter misbrug" name="Report Abuse"/> <menu_item_call label="Rapportér fejl" name="Report Bug"/> + <menu_item_call label="Stød, skub & slag" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanceret" name="Advanced"> @@ -261,8 +262,7 @@ <menu label="Netværk" name="Network"> <menu_item_check label="Pause avatar" name="AgentPause"/> <menu_item_call label="Mist en netværkspakke" name="Drop a Packet"/> - </menu> - <menu_item_call label="Stød, skub & slag" name="Bumps, Pushes &amp; Hits"/> + </menu> <menu label="Verden" name="DevelopWorld"> <menu_item_check label="Vælg anden sol end region" name="Sim Sun Override"/> <menu_item_check label="Fast vejr" name="Fixed Weather"/> 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 @@ <menu_item_call label="[SECOND_LIFE]-Blogs" name="Second Life Blogs"/> <menu_item_call label="Missbrauch melden" name="Report Abuse"/> <menu_item_call label="Fehler melden" name="Report Bug"/> + <menu_item_call label="Rempler, Stöße & Schläge" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="INFO ÜBER [APP_NAME]" name="About Second Life"/> </menu> <menu label="Erweitert" name="Advanced"> @@ -352,8 +353,7 @@ <menu_item_check label="Positionen der interpolierten Objekte anfragen" name="Ping Interpolate Object Positions"/> <menu_item_call label="Ein Paket fallenlassen" name="Drop a Packet"/> </menu> - <menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/> - <menu_item_call label="Rempler, Stöße & Schläge" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="Geskriptete Kamera ausgeben" name="Dump Scripted Camera"/> <menu label="Rekorder" name="Recorder"> <menu_item_call label="Wiedergabe starten" name="Start Playback"/> <menu_item_call label="Wiedergabe stoppen" name="Stop Playback"/> 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 @@ </menu_item_call> <menu_item_separator/> - + <menu_item_call + label="Bumps, Pushes & Hits" + name="Bumps, Pushes &amp; Hits"> + <menu_item_call.on_click + function="Floater.Show" + parameter="bumps" /> + </menu_item_call> + <menu_item_separator/> <menu_item_call label="About [APP_NAME]" name="About Second Life"> @@ -3031,15 +3038,7 @@ name="Dump Scripted Camera"> <menu_item_call.on_click function="Advanced.DumpScriptedCamera" /> - </menu_item_call> - <menu_item_call - label="Bumps, Pushes & Hits" - name="Bumps, Pushes &amp; Hits"> - <menu_item_call.on_click - function="Floater.Show" - parameter="bumps" /> - </menu_item_call> - + </menu_item_call> <menu create_jump_keys="true" label="Recorder" diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index d2117f08b6..9596a8277e 100755 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -175,6 +175,7 @@ <menu_item_call label="Blogs de [SECOND_LIFE]" name="Second Life Blogs"/> <menu_item_call label="Denunciar una infracción" name="Report Abuse"/> <menu_item_call label="Informar de un fallo" name="Report Bug"/> + <menu_item_call label="Bumps, Pushes & Hits" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzado" name="Advanced"> @@ -322,8 +323,7 @@ <menu label="Red" name="Network"> <menu_item_check label="Pause Avatar" name="AgentPause"/> <menu_item_call label="Drop a Packet" name="Drop a Packet"/> - </menu> - <menu_item_call label="Bumps, Pushes & Hits" name="Bumps, Pushes &amp; Hits"/> + </menu> <menu label="Mundo virtual" name="DevelopWorld"> <menu_item_check label="Anular el sol del Sim" name="Sim Sun Override"/> <menu_item_check label="Meteorología fija" name="Fixed Weather"/> 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 @@ <menu_item_call label="Blogs [SECOND_LIFE]" name="Second Life Blogs"/> <menu_item_call label="Signaler une infraction" name="Report Abuse"/> <menu_item_call label="Signaler un bug" name="Report Bug"/> + <menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="À propos de [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avancé" name="Advanced"> @@ -352,8 +353,7 @@ <menu_item_check label="Interpolation ping des positions des objets" name="Ping Interpolate Object Positions"/> <menu_item_call label="Abandonner un paquet" name="Drop a Packet"/> </menu> - <menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/> - <menu_item_call label="Collisions, coups et bousculades" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="Dump caméra scriptée" name="Dump Scripted Camera"/> <menu label="Enregistreur" name="Recorder"> <menu_item_call label="Commencer la lecture" name="Start Playback"/> <menu_item_call label="Arrêter la lecture" name="Stop Playback"/> 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 @@ <menu_item_call label="[SECOND_LIFE] Blog" name="Second Life Blogs"/> <menu_item_call label="Segnala abuso" name="Report Abuse"/> <menu_item_call label="Segnala bug" name="Report Bug"/> + <menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzate" name="Advanced"> @@ -323,8 +324,7 @@ <menu label="Rete" name="Network"> <menu_item_check label="Metti in pausa" name="AgentPause"/> <menu_item_call label="Lascia un pacchetto" name="Drop a Packet"/> - </menu> - <menu_item_call label="Urti, spinte e contatti" name="Bumps, Pushes &amp; Hits"/> + </menu> <menu label="Mondo" name="DevelopWorld"> <menu_item_check label="Esclusione al sole della simulazione" name="Sim Sun Override"/> <menu_item_check label="Clima fisso" name="Fixed Weather"/> 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 @@ <menu_item_call label="[SECOND_LIFE] ブログ" name="Second Life Blogs"/> <menu_item_call label="嫌がらせを報告する" name="Report Abuse"/> <menu_item_call label="バグを報告する" name="Report Bug"/> + <menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="[APP_NAME] について" name="About Second Life"/> </menu> <menu label="アドバンス" name="Advanced"> @@ -352,8 +353,7 @@ <menu_item_check label="挿入されたオブジェクトの位置の Ping" name="Ping Interpolate Object Positions"/> <menu_item_call label="パケットドロップ" name="Drop a Packet"/> </menu> - <menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/> - <menu_item_call label="衝突・プッシュ・打撃" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="スクリプト付きカメラをダンプ" name="Dump Scripted Camera"/> <menu label="レコーダー" name="Recorder"> <menu_item_call label="再生開始" name="Start Playback"/> <menu_item_call label="再生停止" name="Stop Playback"/> 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 @@ <menu_item_check label="Włącz podpowiedzi" name="Enable Hints"/> <menu_item_call label="Złóż Raport o Nadużyciu" name="Report Abuse"/> <menu_item_call label="Zgłoś błędy klienta" name="Report Bug"/> + <menu_item_call label="Zderzenia, popchnięcia & uderzenia" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="O [APP_NAME]" name="About Second Life"/> </menu> <menu label="Zaawansowane" name="Advanced"> @@ -252,8 +253,7 @@ <menu label="Sieć" name="Network"> <menu_item_check label="Zatrzymaj awatara" name="AgentPause"/> <menu_item_call label="Upuść pakiet pamięci" name="Drop a Packet"/> - </menu> - <menu_item_call label="Zderzenia, popchnięcia & uderzenia" name="Bumps, Pushes &amp; Hits"/> + </menu> <menu label="Świat" name="DevelopWorld"> <menu_item_check label="Domyślne ustawienia środowiska Regionu" name="Sim Sun Override"/> <menu_item_check label="Ustalona pogoda" name="Fixed Weather"/> 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 @@ <menu_item_call label="Blogs do [SECOND_LIFE]" name="Second Life Blogs"/> <menu_item_call label="Denunciar abuso" name="Report Abuse"/> <menu_item_call label="Relatar bug" name="Report Bug"/> + <menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avançado" name="Advanced"> @@ -323,8 +324,7 @@ <menu label="Rede" name="Network"> <menu_item_check label="Pausar avatar" name="AgentPause"/> <menu_item_call label="Drop a Packet" name="Drop a Packet"/> - </menu> - <menu_item_call label="Empurrões, trombadas e tapas" name="Bumps, Pushes &amp; Hits"/> + </menu> <menu label="Mundo" name="DevelopWorld"> <menu_item_check label="Impor sobre sol de simulação" name="Sim Sun Override"/> <menu_item_check label="Clima fixo" name="Fixed Weather"/> 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 @@ <menu_item_call label="Инструкции..." name="How To"/> <menu_item_call label="Жалоба" name="Report Abuse"/> <menu_item_call label="Сообщить об ошибке" name="Report Bug"/> + <menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="О [APP_NAME]" name="About Second Life"/> </menu> <menu label="Дополнительно" name="Advanced"> @@ -343,8 +344,7 @@ <menu_item_check label="Прикрепить объекты для интерполяции" name="Ping Interpolate Object Positions"/> <menu_item_call label="Опустить пакет" name="Drop a Packet"/> </menu> - <menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/> - <menu_item_call label="Столкновения, толчки и удары" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="Дамп камеры со скриптами" name="Dump Scripted Camera"/> <menu label="Диктофон" name="Recorder"> <menu_item_call label="Начать воспроизведение" name="Start Playback"/> <menu_item_call label="Остановить воспроизведение" name="Stop Playback"/> 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 @@ <menu_item_call label="[SECOND_LIFE] Blogları" name="Second Life Blogs"/> <menu_item_call label="Kötüye Kullanımı Bildir" name="Report Abuse"/> <menu_item_call label="Hata Bildir" name="Report Bug"/> + <menu_item_call label="Toslamalar, İtmeler ve Vurmalar" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="[APP_NAME] Hakkında" name="About Second Life"/> </menu> <menu label="Gelişmiş" name="Advanced"> @@ -350,8 +351,7 @@ <menu_item_check label="Nesne Konumlarını Ping İle İnterpole Edin" name="Ping Interpolate Object Positions"/> <menu_item_call label="Paket Bırakın" name="Drop a Packet"/> </menu> - <menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/> - <menu_item_call label="Toslamalar, İtmeler ve Vurmalar" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="Komut Dosyalı Kameranın Dökümünü Al" name="Dump Scripted Camera"/> <menu label="Kaydedici" name="Recorder"> <menu_item_call label="Oynatmayı Başlat" name="Start Playback"/> <menu_item_call label="Oynatmayı Durdur" name="Stop Playback"/> 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 @@ <menu_item_call label="[SECOND_LIFE] 部落格" name="Second Life Blogs"/> <menu_item_call label="違規舉報" name="Report Abuse"/> <menu_item_call label="回報臭蟲" name="Report Bug"/> + <menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp; Hits"/> <menu_item_call label="關於 [APP_NAME]" name="About Second Life"/> </menu> <menu label="進階" name="Advanced"> @@ -350,8 +351,7 @@ <menu_item_check label="探詢內插物件位置" name="Ping Interpolate Object Positions"/> <menu_item_call label="丟出一個封包" name="Drop a Packet"/> </menu> - <menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/> - <menu_item_call label="碰撞、推擠與打擊" name="Bumps, Pushes &amp; Hits"/> + <menu_item_call label="傾印腳本控制的攝影機" name="Dump Scripted Camera"/> <menu label="錄製器" name="Recorder"> <menu_item_call label="開始播放" name="Start Playback"/> <menu_item_call label="停止播放" name="Stop Playback"/> -- cgit v1.2.3 From 811878df666f5a115d7715639d618877ed4de44a Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id)); + LLSD floater_key; + floater_key["taskid"] = task_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("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<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES); + LLSD floater_key; + floater_key["taskid"] = mPanel->getTaskUUID(); + floater_key["itemid"] = mUUID; + LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("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<LLLiveLSLEditor>("preview_scriptedit", *xored_id); + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("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<LLLiveLSLEditor>("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<LLLiveLSLEditor>("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<LLLiveLSLEditor>("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<LLLiveLSLEditor>("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<LLLiveLSLEditor>("preview_scriptedit", item_id); // ^ object_id + LLSD floater_key; + floater_key["taskid"] = object_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("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 <mnikolenko@productengine.com> 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(+) (limited to 'indra/newview') 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<LLComboBox>("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 a325ad8fbddf52e479ef1c86da59495e66aac679 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> 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(-) (limited to 'indra/newview') 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"/> <stat_bar name="packet_loss" label="Packet Loss" + decimal_digits="1" stat="packetslostpercentstat"/> <stat_bar name="ping" label="Ping Sim" -- cgit v1.2.3 From e0425400ed151df2e9ccd4e2961e0d060695bd91 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> 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(-) (limited to 'indra/newview') 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<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitPermissions, this)); // Mark for sale or not, and sale info getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleInfo, this)); - getChild<LLUICtrl>("RadioSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this)); + getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitSaleType, this)); // "Price" label for edit getChild<LLUICtrl>("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; t<LL_ARRAY_SIZE(enableNames); ++t) @@ -479,6 +480,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) const LLSaleInfo& sale_info = item->getSaleInfo(); BOOL is_for_sale = sale_info.isForSale(); + LLComboBox* combo_sale_type = getChild<LLComboBox>("ComboBoxSaleType"); + LLUICtrl* edit_cost = getChild<LLUICtrl>("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<LLUICtrl>("CheckPurchase")->setValue(is_for_sale); - getChildView("combobox sale copy")->setEnabled(is_for_sale); - getChildView("Edit Cost")->setEnabled(is_for_sale); getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); getChild<LLUICtrl>("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); - LLRadioGroup* radioSaleType = getChild<LLRadioGroup>("RadioSaleType"); if (is_for_sale) { - radioSaleType->setSelectedIndex((S32)sale_info.getSaleType() - 1); S32 numerical_price; numerical_price = sale_info.getSalePrice(); - getChild<LLUICtrl>("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<LLUICtrl>("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<LLRadioGroup>("RadioSaleType"); - if(RadioSaleType) + + LLComboBox* combo_sale_type = getChild<LLComboBox>("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<LLSaleInfo::EForSale>(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<LLUICtrl>("CheckNextOwnerTransfer")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitPermissions, this)); // Mark for sale or not, and sale info getChild<LLUICtrl>("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + // Change sale type, and sale info + getChild<LLUICtrl>("ComboBoxSaleType")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); // "Price" label for edit getChild<LLUICtrl>("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<LLComboBox>("ComboBoxSaleType"); + LLUICtrl* edit_cost = getChild<LLUICtrl>("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<LLUICtrl>("CheckPurchase")->setValue(is_for_sale); - getChildView("combobox sale copy")->setEnabled(is_for_sale); - getChildView("Edit Cost")->setEnabled(is_for_sale); getChild<LLUICtrl>("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); getChild<LLUICtrl>("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); getChild<LLUICtrl>("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<LLUICtrl>("Edit Cost")->setValue(llformat("%d",numerical_price)); + edit_cost->setValue(llformat("%d",numerical_price)); + combo_sale_type->setValue(sale_info.getSaleType()); } else { - getChild<LLUICtrl>("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<LLRadioGroup>("RadioSaleType"); - if(RadioSaleType) + LLComboBox* combo_sale_type = getChild<LLComboBox>("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<LLSaleInfo::EForSale>(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"> - <combo_box.item - label="Copy" + <combo_box.item name="Copy" - value="Copy" /> - <combo_box.item - label="Original" + label="Copy" + value="2" /> + <combo_box.item + name="Contents" + label="Contents" + value="3" /> + <combo_box.item name="Original" - value="Original" /> + label="Original" + value="1" /> </combo_box> <spinner follows="left|top" @@ -427,34 +431,6 @@ Mark Item: </text--> - - <!--radio_group - draw_border="false" - follows="left|top|right" - height="16" - layout="topleft" - left_delta="78" - name="RadioSaleType" - top_delta="0" - width="252"> - <radio_item - height="16" - label="Original" - layout="topleft" - left="0" - name="radio" - top="0" - width="70" /> - <radio_item - height="16" - label="Copy" - layout="topleft" - left_delta="60" - name="radio2" - top_delta="0" - width="70" /> - </radio_group--> - <!--text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index c5dfb703e5..9be01c5d4f 100755 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -395,16 +395,20 @@ left_pad="0" layout="topleft" follows="left|top" - name="combobox sale copy" + name="ComboBoxSaleType" width="170"> - <combo_box.item - label="Copy" - name="Copy" - value="Copy" /> - <combo_box.item - label="Original" - name="Original" - value="Original" /> + <combo_box.item + name="Copy" + label="Copy" + value="2" /> + <combo_box.item + name="Contents" + label="Contents" + value="3" /> + <combo_box.item + name="Original" + label="Original" + value="1" /> </combo_box> <spinner follows="left|top" -- cgit v1.2.3 From 01b8f09c197cb0309a74d8e7cb8c5299dff5f3a5 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 12 Nov 2014 18:22:50 +0200 Subject: MAINT-4660 FIXED making Photos --- indra/newview/llfloatersnapshot.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 04329ff66e..43f6576dc9 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1193,6 +1193,22 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) void LLFloaterSnapshot::onClose(bool app_quitting) { getParent()->setMouseOpaque(FALSE); + + //unfreeze everything, hide fullscreen preview + LLSnapshotLivePreview* previewp = LLFloaterSnapshot::Impl::getPreviewView(this); + if (previewp) + { + previewp->setVisible(FALSE); + previewp->setEnabled(FALSE); + } + + gSavedSettings.setBOOL("FreezeTime", FALSE); + impl.mAvatarPauseHandles.clear(); + + if (impl.mLastToolset) + { + LLToolMgr::getInstance()->setCurrentToolset(impl.mLastToolset); + } } // virtual -- cgit v1.2.3 From 444c9a70859b5f918fbfb3798f1612c3626fd7ce Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 14 Nov 2014 11:59:56 +0200 Subject: MAINT-3067 FIXED Bumps, Pushes and Hits is hard to discove --- indra/newview/llfloaterbump.cpp | 134 +++++++++++++++++++-- indra/newview/llfloaterbump.h | 23 ++++ .../skins/default/xui/en/menu_avatar_other.xml | 7 +- 3 files changed, 152 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 345df2fcb3..34904cf7ed 100755 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -30,10 +30,17 @@ #include "llsd.h" #include "mean_collision_data.h" +#include "llavataractions.h" #include "llfloaterbump.h" +#include "llfloaterreporter.h" +#include "llmutelist.h" +#include "llpanelblockedlist.h" #include "llscrolllistctrl.h" +#include "lltrans.h" #include "lluictrlfactory.h" #include "llviewermessage.h" +#include "llviewermenu.h" +#include "llviewerobjectlist.h" ///---------------------------------------------------------------------------- /// Class LLFloaterBump @@ -43,6 +50,18 @@ LLFloaterBump::LLFloaterBump(const LLSD& key) : LLFloater(key) { + mCommitCallbackRegistrar.add("Avatar.SendIM", boost::bind(&LLFloaterBump::startIM, this)); + mCommitCallbackRegistrar.add("Avatar.ReportAbuse", boost::bind(&LLFloaterBump::reportAbuse, this)); + mCommitCallbackRegistrar.add("ShowAgentProfile", boost::bind(&LLFloaterBump::showProfile, this)); + mCommitCallbackRegistrar.add("Avatar.InviteToGroup", boost::bind(&LLFloaterBump::inviteToGroup, this)); + mCommitCallbackRegistrar.add("Avatar.Call", boost::bind(&LLFloaterBump::startCall, this)); + mEnableCallbackRegistrar.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); + mCommitCallbackRegistrar.add("Avatar.AddFriend", boost::bind(&LLFloaterBump::addFriend, this)); + mEnableCallbackRegistrar.add("Avatar.EnableAddFriend", boost::bind(&LLFloaterBump::enableAddFriend, this)); + mCommitCallbackRegistrar.add("Avatar.Mute", boost::bind(&LLFloaterBump::muteAvatar, this)); + mEnableCallbackRegistrar.add("Avatar.EnableMute", boost::bind(&LLFloaterBump::enableMute, this)); + mCommitCallbackRegistrar.add("PayObject", boost::bind(&LLFloaterBump::payAvatar, this)); + mCommitCallbackRegistrar.add("Tools.LookAtSelection", boost::bind(&LLFloaterBump::zoomInAvatar, this)); } @@ -51,14 +70,25 @@ LLFloaterBump::~LLFloaterBump() { } +BOOL LLFloaterBump::postBuild() +{ + mList = getChild<LLScrollListCtrl>("bump_list"); + mList->setAllowMultipleSelection(false); + mList->setRightMouseDownCallback(boost::bind(&LLFloaterBump::onScrollListRightClicked, this, _1, _2, _3)); + + mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_avatar_other.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + mPopupMenu->setItemVisible(std::string("Normal"), false); + mPopupMenu->setItemVisible(std::string("Always use impostor"), false); + mPopupMenu->setItemVisible(std::string("Never use impostor"), false); + mPopupMenu->setItemVisible(std::string("Impostor seperator"), false); + + return TRUE; +} // virtual void LLFloaterBump::onOpen(const LLSD& key) { - LLScrollListCtrl* list = getChild<LLScrollListCtrl>("bump_list"); - if (!list) - return; - list->deleteAllItems(); - list->setContextMenu(LLScrollListCtrl::MENU_AVATAR); + mNames.clear(); + mList->deleteAllItems(); if (gMeanCollisionList.empty()) { @@ -66,7 +96,7 @@ void LLFloaterBump::onOpen(const LLSD& key) LLSD row; row["columns"][0]["value"] = none_detected; row["columns"][0]["font"] = "SansSerifBold"; - list->addElement(row); + mList->addElement(row); } else { @@ -74,7 +104,7 @@ void LLFloaterBump::onOpen(const LLSD& key) iter != gMeanCollisionList.end(); ++iter) { LLMeanCollisionData *mcd = *iter; - add(list, mcd); + add(mList, mcd); } } } @@ -126,4 +156,94 @@ void LLFloaterBump::add(LLScrollListCtrl* list, LLMeanCollisionData* mcd) row["columns"][0]["value"] = text; row["columns"][0]["font"] = "SansSerifBold"; list->addElement(row); + + + mNames[mcd->mPerp] = mcd->mFullName; +} + + +void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y) +{ + if (!gMeanCollisionList.empty()) + { + LLScrollListItem* item = mList->hitItem(x, y); + if (item && mPopupMenu) + { + mItemUUID = item->getUUID(); + mPopupMenu->buildDrawLabels(); + mPopupMenu->updateParent(LLMenuGL::sMenuContainer); + + std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar"; + mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg)); + mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID)); + + ((LLContextMenu*)mPopupMenu)->show(x, y); + LLMenuGL::showPopup(ctrl, mPopupMenu, x, y); + } + } +} + + +void LLFloaterBump::startIM() +{ + LLAvatarActions::startIM(mItemUUID); +} + +void LLFloaterBump::startCall() +{ + LLAvatarActions::startCall(mItemUUID); +} + +void LLFloaterBump::reportAbuse() +{ + LLFloaterReporter::showFromAvatar(mItemUUID, "av_name"); +} + +void LLFloaterBump::showProfile() +{ + LLAvatarActions::showProfile(mItemUUID); +} + +void LLFloaterBump::addFriend() +{ + LLAvatarActions::requestFriendshipDialog(mItemUUID); +} + +bool LLFloaterBump::enableAddFriend() +{ + return !LLAvatarActions::isFriend(mItemUUID); +} + +void LLFloaterBump::muteAvatar() +{ + LLMute mute(mItemUUID, mNames[mItemUUID], LLMute::AGENT); + if (LLMuteList::getInstance()->isMuted(mute.mID)) + { + LLMuteList::getInstance()->remove(mute); + } + else + { + LLMuteList::getInstance()->add(mute); + LLPanelBlockedList::showPanelAndSelect(mute.mID); + } +} + +void LLFloaterBump::payAvatar() +{ + LLAvatarActions::pay(mItemUUID); +} + +void LLFloaterBump::zoomInAvatar() +{ + handle_zoom_to_object(mItemUUID); +} + +bool LLFloaterBump::enableMute() +{ + return LLAvatarActions::canBlock(mItemUUID); +} + +void LLFloaterBump::inviteToGroup() +{ + LLAvatarActions::inviteToGroup(mItemUUID); } diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h index 5acab6da8c..11b7db9fee 100755 --- a/indra/newview/llfloaterbump.h +++ b/indra/newview/llfloaterbump.h @@ -29,6 +29,7 @@ #define LL_LLFLOATERBUMP_H #include "llfloater.h" +#include "llmenugl.h" class LLMeanCollisionData; class LLScrollListCtrl; @@ -39,14 +40,36 @@ class LLFloaterBump friend class LLFloaterReg; protected: void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd); + void onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y); public: + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + void startIM(); + void startCall(); + void reportAbuse(); + void showProfile(); + void addFriend(); + void inviteToGroup(); + bool enableAddFriend(); + void muteAvatar(); + void payAvatar(); + void zoomInAvatar(); + bool enableMute(); + private: LLFloaterBump(const LLSD& key); virtual ~LLFloaterBump(); + + LLScrollListCtrl* mList; + LLMenuGL* mPopupMenu; + LLUUID mItemUUID; + + typedef std::map<LLUUID, std::string> uuid_map_t; + uuid_map_t mNames; + }; #endif diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index 8bd013f14b..cfbbe41f95 100755 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -96,14 +96,11 @@ function="Tools.LookAtSelection" parameter="zoom" /> </menu_item_call> - <menu_item_call - enabled="false" + <menu_item_call label="Pay" name="Pay..."> <menu_item_call.on_click - function="PayObject" /> - <menu_item_call.on_enable - function="EnablePayAvatar" /> + function="PayObject" /> </menu_item_call> <menu_item_separator /> -- cgit v1.2.3 From c686407731751ababecf01569fa02eb5ba62337d Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Thu, 13 Nov 2014 18:47:57 +0200 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render MAINT-4645 FIXED [viewer-lion] The build tool shows normal or specular map as 'none' when one exists --- indra/newview/llface.cpp | 16 ++++++++-------- indra/newview/llvovolume.cpp | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 2182b619be..dc74f4a6ef 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1303,15 +1303,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } if (shiny_in_alpha) - { - - GLfloat alpha[4] = { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; + + static const GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 35893a0354..f2199b5189 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2040,18 +2040,19 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { - S32 res = 0; - - if (pMaterialParams && getTEImage(te) && 3 == getTEImage(te)->getComponents() && pMaterialParams->getDiffuseAlphaMode()) - { - LLViewerObject::setTEMaterialID(te, LLMaterialID::null); - res = LLViewerObject::setTEMaterialParams(te, NULL); - } - else + if(pMaterialParams) { - res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + LLViewerTexture* image = getTEImage(te); + LLGLenum image_format = image ? image->getPrimaryFormat() : GL_RGB; + LLMaterialPtr current_material = getTEMaterialParams(te); + const_cast<LLMaterialPtr&>(pMaterialParams)->setDiffuseAlphaMode( + current_material.isNull() ? (GL_RGB == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + : current_material->getDiffuseAlphaMode() + ); } + S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) << LL_ENDL; -- cgit v1.2.3 From f0db860b8a08e076814f4a3586cdef7ead8acb9c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 18 Nov 2014 17:22:02 +0200 Subject: MAINT-1789 FIXED Object inspector doesn't show any information about object if user uses Select Only My Objects option --- indra/newview/llinspectobject.cpp | 2 +- indra/newview/llselectmgr.cpp | 21 ++++++++++++--------- indra/newview/llselectmgr.h | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index a7b93b8030..46019557f8 100755 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data) LLViewerMediaFocus::getInstance()->clearFocus(); LLSelectMgr::instance().deselectAll(); - mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj); + mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE); // Mark this as a transient selection struct SetTransient : public LLSelectedNodeFunctor diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2a0a2f31be..9d088d02f8 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -368,7 +368,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3 //----------------------------------------------------------------------------- // Select the object, parents and children. //----------------------------------------------------------------------------- -LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end) +LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned) { llassert( obj ); @@ -385,7 +385,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, return NULL; } - if (!canSelectObject(obj)) + if (!canSelectObject(obj,ignore_select_owned)) { //make_ui_sound("UISndInvalidOp"); return NULL; @@ -6771,29 +6771,32 @@ void LLSelectMgr::validateSelection() getSelection()->applyToObjects(&func); } -BOOL LLSelectMgr::canSelectObject(LLViewerObject* object) +BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned) { // Never select dead objects if (!object || object->isDead()) { return FALSE; } - + if (mForceSelection) { return TRUE; } - if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) || - (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced()))) + if(!ignore_select_owned) { - // only select my own objects - return FALSE; + if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) || + (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced()))) + { + // only select my own objects + return FALSE; + } } // Can't select orphans if (object->isOrphaned()) return FALSE; - + // Can't select avatars if (object->isAvatar()) return FALSE; diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 9906dfd524..23c41e4cc1 100755 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -454,7 +454,7 @@ public: // // *NOTE: You must hold on to the object selection handle, otherwise // the objects will be automatically deselected in 1 frame. - LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE); + LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE); // For when you want just a child object. LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES); @@ -609,7 +609,7 @@ public: void validateSelection(); // returns TRUE if it is possible to select this object - BOOL canSelectObject(LLViewerObject* object); + BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE); // Returns TRUE if the viewer has information on all selected objects BOOL selectGetAllRootsValid(); -- cgit v1.2.3 From 16d0b87b3ce7b88069b08981791f470cf6703c64 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Fri, 21 Nov 2014 00:37:15 +0200 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA MODE BLEND, do not render Pathset #3. Fix problem with not existing UUID's and if have a "conflict" when material can't have DIFFUSE_ALPHA_MODE_BLEND and DIFFUSE_ALPHA_MODE_NONE simultaneously. --- indra/newview/llviewertexturelist.cpp | 2 +- indra/newview/llvovolume.cpp | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index b98726900f..322a55383a 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -622,7 +622,7 @@ void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image) { return; } - llassert(new_image); + //llassert(new_image); LLUUID image_id = new_image->getID(); LLViewerFetchedTexture *image = findImage(image_id); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f2199b5189..6839bed761 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2040,20 +2040,32 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { + LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams); + if(pMaterialParams) { LLViewerTexture* image = getTEImage(te); LLGLenum image_format = image ? image->getPrimaryFormat() : GL_RGB; LLMaterialPtr current_material = getTEMaterialParams(te); - const_cast<LLMaterialPtr&>(pMaterialParams)->setDiffuseAlphaMode( - current_material.isNull() ? (GL_RGB == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) - : current_material->getDiffuseAlphaMode() - ); + + U8 new_diffuse_alpha_mode = pMaterialParams->getDiffuseAlphaMode(); + + if(new_diffuse_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + { + new_diffuse_alpha_mode = (GL_RGB == image_format || 0 == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : new_diffuse_alpha_mode); + } + + if(pMaterialParams->getDiffuseAlphaMode() != new_diffuse_alpha_mode) { + //create new material + pMaterial = new LLMaterial(pMaterialParams->asLLSD()); + pMaterial->setDiffuseAlphaMode(new_diffuse_alpha_mode); + LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial); + } } - S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); + S32 res = LLViewerObject::setTEMaterialParams(te, pMaterial); - LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterialParams) ? pMaterialParams->asLLSD() : LLSD("null")) << " res " << res + LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << ((pMaterial) ? pMaterial->asLLSD() : LLSD("null")) << " res " << res << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) << LL_ENDL; setChanged(ALL_CHANGED); -- cgit v1.2.3 From 8cb6fe2695fae0ae37a042ff052c613702970ddd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Fri, 21 Nov 2014 18:19:40 +0200 Subject: MAINT-4682 FIXED Viewer won't clear AGENT_ALWAYS_RUN while sitting --- indra/newview/llviewerkeyboard.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index a4a05587d3..35b55029cc 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -320,8 +320,8 @@ void camera_spin_around_cw( EKeystate s ) void camera_spin_around_ccw_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDERIGHT ) return; + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { //send keystrokes, but do not change camera agent_turn_right(s); @@ -336,8 +336,8 @@ void camera_spin_around_ccw_sitting( EKeystate s ) void camera_spin_around_cw_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_SLIDELEFT ) return; + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { //send keystrokes, but do not change camera agent_turn_left(s); @@ -413,8 +413,8 @@ void camera_move_backward( EKeystate s ) void camera_move_forward_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; - if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled()) + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_FORWARD ) return; + if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { agent_push_forward(s); } @@ -427,9 +427,9 @@ void camera_move_forward_sitting( EKeystate s ) void camera_move_backward_sitting( EKeystate s ) { - if( KEYSTATE_UP == s ) return; + if( KEYSTATE_UP == s && gAgent.mDoubleTapRunMode != LLAgent::DOUBLETAP_BACKWARD ) return; - if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled()) + if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled() || gAgent.getRunning()) { agent_push_backward(s); } -- cgit v1.2.3 From a500cd62ecf35ae853687c45118109269e0e5383 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 25 Nov 2014 12:06:13 +0200 Subject: MAINT-4691 Restored price labels in Object profile panel --- indra/newview/llsidepaneltaskinfo.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 636654ad23..58c3683459 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -502,11 +502,11 @@ void LLSidepanelTaskInfo::refresh() // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - getChild<LLUICtrl>("Cost")->setValue(getString("Cost Per Unit")); + getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Per Unit")); } else { - getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); + getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default")); } LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); @@ -547,16 +547,15 @@ void LLSidepanelTaskInfo::refresh() // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) - getChild<LLUICtrl>("Cost")->setValue(getString("Cost Total")); + getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Total")); else - getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); + getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default")); } // This is a public object. else { getChildView("Cost")->setEnabled(FALSE); - getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default")); - + getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default")); getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null); getChildView("Edit Cost")->setEnabled(FALSE); } -- cgit v1.2.3 From b07bfba19810e4275d9631e067381d501245a276 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 26 Nov 2014 13:32:43 +0200 Subject: MAINT-4691 FIXED Changed text labels --- indra/newview/llsidepaneltaskinfo.cpp | 8 +++++--- indra/newview/skins/default/xui/en/sidepanel_task_info.xml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 58c3683459..17ecfab4fb 100755 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -499,17 +499,19 @@ void LLSidepanelTaskInfo::refresh() // You own these objects. else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) { + LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); + // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Per Unit")); + std::string label_text = is_sale_price_mixed? "Cost Mixed" :"Cost Per Unit"; + edit_price->setLabel(getString(label_text)); } else { - getChild<LLSpinCtrl>("Edit Cost")->setLabel(getString("Cost Default")); + edit_price->setLabel(getString("Cost Default")); } - LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); if (!edit_price->hasFocus()) { // If the sale price is mixed then set the cost to MIXED, otherwise diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 6ee8fc3a4c..b84dce222f 100755 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -48,7 +48,7 @@ </panel.string> <panel.string name="Cost Total"> - Total Price: L$ + Sum Price: L$ </panel.string> <panel.string name="Cost Per Unit"> @@ -444,7 +444,7 @@ control_name="Edit Cost" name="Edit Cost" label="Price: L$" - label_width="65" + label_width="73" width="150" min_val="1" height="20" -- cgit v1.2.3 From 120e052e326097e56ae1d5eea7eb8d2675c1cb44 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 26 Nov 2014 13:34:40 +0200 Subject: MAINT-2336 FIXED Avatar continues to move in edit mode --- indra/newview/llagentcamera.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 2356a84688..b0b2cfd435 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "llmorphview.h" #include "llmoveview.h" #include "llselectmgr.h" #include "llsmoothstep.h" @@ -2269,7 +2270,10 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gFocusMgr.setKeyboardFocus( NULL ); gFocusMgr.setMouseCapture( NULL ); - + if( gMorphView ) + { + gMorphView->setVisible( TRUE ); + } // Remove any pitch or rotation from the avatar LLVector3 at = gAgent.getAtAxis(); at.mV[VZ] = 0.f; -- cgit v1.2.3 From 35a8938892a16c17da8ef7707227f4494bb41eb5 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 25 Nov 2014 16:29:40 +0200 Subject: MAINT-4690 FIXED forced send_agent_update(TRUE) in idle() results in large amounts of useless UDP traffic --- indra/newview/llappviewer.cpp | 36 ++++++++++++++++++++---------------- indra/newview/llappviewer.h | 3 +++ 2 files changed, 23 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f6b6c71cfc..67007bc4cd 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -685,6 +685,8 @@ LLAppViewer::LLAppViewer() mQuitRequested(false), mLogoutRequestSent(false), mYieldTime(-1), + mLastAgentControlFlags(0), + mLastAgentForceUpdate(0), mMainloopTimeout(NULL), mAgentRegionLastAlive(false), mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)), @@ -4811,22 +4813,24 @@ void LLAppViewer::idle() gAgentPilot.updateTarget(); gAgent.autoPilot(&yaw); } - - static LLFrameTimer agent_update_timer; - static U32 last_control_flags; - - // When appropriate, update agent location to the simulator. - F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); - BOOL flags_changed = gAgent.controlFlagsDirty() || (last_control_flags != gAgent.getControlFlags()); - - if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) - { - LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE); - // Send avatar and camera info - last_control_flags = gAgent.getControlFlags(); - send_agent_update(TRUE); - agent_update_timer.reset(); - } + + static LLFrameTimer agent_update_timer; + + // When appropriate, update agent location to the simulator. + F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); + F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time; + BOOL force_update = gAgent.controlFlagsDirty() + || (mLastAgentControlFlags != gAgent.getControlFlags()) + || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); + if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) + { + LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE); + // Send avatar and camera info + mLastAgentControlFlags = gAgent.getControlFlags(); + mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time; + send_agent_update(force_update); + agent_update_timer.reset(); + } } ////////////////////////////////////// diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index e0f3f326c7..e8a1ca036b 100755 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -275,6 +275,8 @@ private: bool mQuitRequested; // User wants to quit, may have modified documents open. bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. S32 mYieldTime; + U32 mLastAgentControlFlags; + F32 mLastAgentForceUpdate; struct SettingsFiles* mSettingsLocationList; LLWatchdogTimeout* mMainloopTimeout; @@ -314,6 +316,7 @@ public: // consts from viewer.h const S32 AGENT_UPDATES_PER_SECOND = 10; +const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1; // Globals with external linkage. From viewer.h // *NOTE:Mani - These will be removed as the Viewer App Cleanup project continues. -- cgit v1.2.3 From c7c549b7e24af3b9ee87d464a03adeab75ee6553 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Wed, 26 Nov 2014 11:39:16 -0500 Subject: LLFloaterPermsResponder switched to new Responder API --- indra/newview/app_settings/logcontrol.xml | 1 + indra/newview/llfloaterperms.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 15cb5bc0eb..29639bb9c2 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,6 +42,7 @@ </array> <key>tags</key> <array> + <string>Avatar</string> <!-- sample entry for debugging specific items <string>Inventory</string> <string>SceneLoadTiming</string> diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 0880a5f35a..849aa7cd14 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -35,6 +35,8 @@ #include "llagent.h" #include "llviewerregion.h" #include "llnotificationsutil.h" +#include "llsdserialize.h" +#include "llvoavatar.h" LLFloaterPerms::LLFloaterPerms(const LLSD& seed) : LLFloater(seed) @@ -171,8 +173,9 @@ public: private: static std::string sPreviousReason; - void error(U32 status, const std::string& reason) + void httpFailure() { + const std::string& reason = getReason(); // Do not display the same error more than once in a row if (reason != sPreviousReason) { @@ -182,8 +185,12 @@ private: LLNotificationsUtil::add("DefaultObjectPermissions", args); } } - void result(const LLSD& content) + + void httpSuccess() { + //const LLSD& content = getContent(); + //dump_sequential_xml("perms_responder_result.xml", content); + // Since we have had a successful POST call be sure to display the next error message // even if it is the same as a previous one. sPreviousReason = ""; -- cgit v1.2.3 From 3ccb8d6a561c692da7a0001467c3192dd298c1fd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 26 Nov 2014 19:22:31 +0200 Subject: MAINT-1861 FIXED Texture doesn't appear in Inventory after using 'Copy to inventory' button --- indra/newview/llpanelobjectinventory.cpp | 1 + indra/newview/llpreview.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 1f16505f71..db944827cd 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -909,6 +909,7 @@ void LLTaskTextureBridge::openItem() LLPreviewTexture* preview = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); if(preview) { + preview->setAuxItem(findItem()); preview->setObjectID(mPanel->getTaskUUID()); } } diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index cab7eff0dc..bf2652cb49 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -39,6 +39,7 @@ #include "llradiogroup.h" #include "llassetstorage.h" #include "llviewerassettype.h" +#include "llviewermessage.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "lldbstrings.h" @@ -369,6 +370,20 @@ void LLPreview::onBtnCopyToInv(void* userdata) self->mNotecardInventoryID, item); } + else if (self->mObjectUUID.notNull()) + { + // item is in in-world inventory + LLViewerObject* object = gObjectList.findObject(self->mObjectUUID); + LLPermissions perm(item->getPermissions()); + if(object + &&(perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) + && perm.allowTransferTo(gAgent.getID()))) + { + // copy to default folder + set_dad_inventory_item(item, LLUUID::null); + object->moveInventory(LLUUID::null, item->getUUID()); + } + } else { LLPointer<LLInventoryCallback> cb = NULL; -- cgit v1.2.3 From 5a1f4ac1a71b8d604cbef5f9f42823b494f04a03 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 27 Nov 2014 17:20:45 +0200 Subject: MAINT-3205 FIXED Normal map thumbnail icon lacks "Multiple" text when last-selected face lacks a normal map --- indra/newview/llpanelface.cpp | 54 +++++++++-------------------------------- indra/newview/lltexturectrl.cpp | 4 +-- 2 files changed, 14 insertions(+), 44 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ced2635520..717aece8dd 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -902,52 +902,22 @@ void LLPanelFace::updateUI() getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha); } } - - if (shinytexture_ctrl) - { - if (identical_spec && (shiny == SHINY_TEXTURE)) - { - shinytexture_ctrl->setTentative( FALSE ); - shinytexture_ctrl->setEnabled( editable ); - shinytexture_ctrl->setImageAssetID( specmap_id ); - } - else if (specmap_id.isNull()) - { - shinytexture_ctrl->setTentative( FALSE ); - shinytexture_ctrl->setEnabled( editable ); - shinytexture_ctrl->setImageAssetID( LLUUID::null ); - } - else - { - shinytexture_ctrl->setTentative( TRUE ); - shinytexture_ctrl->setEnabled( editable ); - shinytexture_ctrl->setImageAssetID( specmap_id ); + + if (shinytexture_ctrl) + { + shinytexture_ctrl->setTentative( !identical_spec ); + shinytexture_ctrl->setEnabled( editable ); + shinytexture_ctrl->setImageAssetID( specmap_id ); } - } - if (bumpytexture_ctrl) - { - if (identical_norm && (bumpy == BUMPY_TEXTURE)) - { - bumpytexture_ctrl->setTentative( FALSE ); - bumpytexture_ctrl->setEnabled( editable ); - bumpytexture_ctrl->setImageAssetID( normmap_id ); - } - else if (normmap_id.isNull()) - { - bumpytexture_ctrl->setTentative( FALSE ); - bumpytexture_ctrl->setEnabled( editable ); - bumpytexture_ctrl->setImageAssetID( LLUUID::null ); - } - else - { - bumpytexture_ctrl->setTentative( TRUE ); - bumpytexture_ctrl->setEnabled( editable ); - bumpytexture_ctrl->setImageAssetID( normmap_id ); - } + if (bumpytexture_ctrl) + { + bumpytexture_ctrl->setTentative( !identical_norm ); + bumpytexture_ctrl->setEnabled( editable ); + bumpytexture_ctrl->setImageAssetID( normmap_id ); } } - + // planar align bool align_planar = false; bool identical_planar_aligned = false; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index fec2fe8c04..374c18b30d 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1511,8 +1511,8 @@ void LLTextureCtrl::draw() gl_draw_x( interior, LLColor4::black ); } - mTentativeLabel->setVisible( !mTexturep.isNull() && getTentative() ); - + mTentativeLabel->setVisible( getTentative() ); + // Show "Loading..." string on the top left corner while this texture is loading. // Using the discard level, do not show the string if the texture is almost but not // fully loaded. -- cgit v1.2.3 From b3c8a559f6e6f340286204328e250312b2e467c5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Fri, 28 Nov 2014 18:17:54 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. --- indra/newview/llfloatermodelpreview.cpp | 75 ++++++++++++++++++++++++++++++--- indra/newview/llfloatermodelpreview.h | 7 +++ 2 files changed, 77 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 73bf7f3e23..f0c580c8ee 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -738,6 +738,11 @@ void LLFloaterModelPreview::toggleGenarateNormals() { bool enabled = childGetValue("gen_normals").asBoolean(); childSetEnabled("crease_angle", enabled); + if(enabled) { + mModelPreview->generateNormals(); + } else { + mModelPreview->restoreNormals(); + } } //static @@ -3836,7 +3841,6 @@ void LLModelPreview::generateNormals() S32 which_lod = mPreviewLOD; - if (which_lod > 4 || which_lod < 0 || mModel[which_lod].empty()) { @@ -3851,18 +3855,79 @@ void LLModelPreview::generateNormals() if (which_lod == 3 && !mBaseModel.empty()) { - for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter) + if(mBaseModelFacesCopy.empty()) + { + mBaseModelFacesCopy.reserve(mBaseModel.size()); + for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it) + { + v_LLVolumeFace_t faces; + (*it)->copyFacesTo(faces); + mBaseModelFacesCopy.push_back(std::move(faces)); + } + } + + for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it) { - (*iter)->generateNormals(angle_cutoff); + (*it)->generateNormals(angle_cutoff); } mVertexBuffer[5].clear(); } - for (LLModelLoader::model_list::iterator iter = mModel[which_lod].begin(); iter != mModel[which_lod].end(); ++iter) + bool perform_copy = mModelFacesCopy[which_lod].empty(); + if(perform_copy) { + mModelFacesCopy[which_lod].reserve(mModel[which_lod].size()); + } + + for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it) { - (*iter)->generateNormals(angle_cutoff); + if(perform_copy) + { + v_LLVolumeFace_t faces; + (*it)->copyFacesTo(faces); + mModelFacesCopy[which_lod].push_back(std::move(faces)); + } + + (*it)->generateNormals(angle_cutoff); + } + + mVertexBuffer[which_lod].clear(); + refresh(); + updateStatusMessages(); +} + +void LLModelPreview::restoreNormals() +{ + S32 which_lod = mPreviewLOD; + + if (which_lod > 4 || which_lod < 0 || + mModel[which_lod].empty()) + { + return; + } + + if(!mBaseModelFacesCopy.empty()) + { + llassert(mBaseModelFacesCopy.size() == mBaseModel.size()); + + vv_LLVolumeFace_t::const_iterator itF = mBaseModelFacesCopy.begin(); + for (LLModelLoader::model_list::iterator it = mBaseModel.begin(), itE = mBaseModel.end(); it != itE; ++it, ++itF) + { + (*it)->copyFacesFrom((*itF)); + } + } + mBaseModelFacesCopy.clear(); + + + if(!mModelFacesCopy[which_lod].empty()) + { + vv_LLVolumeFace_t::const_iterator itF = mModelFacesCopy[which_lod].begin(); + for (LLModelLoader::model_list::iterator it = mModel[which_lod].begin(), itE = mModel[which_lod].end(); it != itE; ++it, ++itF) + { + (*it)->copyFacesFrom((*itF)); + } } + mModelFacesCopy[which_lod].clear(); mVertexBuffer[which_lod].clear(); refresh(); diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 6c0c60b87f..618748bd4e 100755 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -343,6 +343,7 @@ public: void loadModelCallback(S32 lod); void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false); void generateNormals(); + void restoreNormals(); U32 calcResourceCost(); void rebuildUploadData(); void saveUploadData(bool save_skinweights, bool save_joint_poisitions); @@ -447,6 +448,12 @@ private: LLModelLoader::model_list mModel[LLModel::NUM_LODS]; LLModelLoader::model_list mBaseModel; + typedef std::vector<LLVolumeFace> v_LLVolumeFace_t; + typedef std::vector<v_LLVolumeFace_t> vv_LLVolumeFace_t; + + vv_LLVolumeFace_t mModelFacesCopy[LLModel::NUM_LODS]; + vv_LLVolumeFace_t mBaseModelFacesCopy; + U32 mGroup; std::map<LLPointer<LLModel>, U32> mObject; U32 mMaxTriangleLimit; -- cgit v1.2.3 From 1cea21dcb9071bd68b8e36e73c96bd74a8ac6dcd Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 1 Dec 2014 19:31:09 +0200 Subject: MAINT-4700 FIXED Viewer cursor defaults to 'grab' mode when clicking on child prim of linkset that was recently physical and sat-upon --- indra/newview/llselectmgr.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9d088d02f8..b13c30b6d4 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4643,11 +4643,18 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor BOOL mState; virtual bool apply(LLViewerObject* object) { - if ( object->permModify() && // preemptive permissions check - object->isRoot()) // don't send for child objects + if ( object->permModify()) { - object->setFlags( mFlags, mState); - } + if (object->isRoot()) // don't send for child objects + { + object->setFlags( mFlags, mState); + } + else if (FLAGS_WORLD & mFlags && ((LLViewerObject*)object->getRoot())->isSelected()) + { + // FLAGS_WORLD are shared by all items in linkset + object->setFlagsWithoutUpdate(FLAGS_WORLD & mFlags, mState); + } + }; return true; } }; -- cgit v1.2.3 From 909c18ea978059976a25222b446ffaa426147627 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 1 Dec 2014 16:34:43 -0500 Subject: Added missing xui file --- .../default/xui/en/floater_edit_hover_height.xml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 indra/newview/skins/default/xui/en/floater_edit_hover_height.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml new file mode 100755 index 0000000000..29d06b9b4e --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + positioning="cascading" + ignore_ui_scale="false" + legacy_header_height="225" + can_minimize="true" + can_close="true" + can_resize="true" + min_height="65" + min_width="515" + height="65" + layout="topleft" + name="HoverHeight" + single_instance="true" + help_topic="hover_height" + save_rect="true" + save_visibility="true" + title="SET HOVER HEIGHT" + width="515"> + <slider + control_name="HoverHeightSlider" + decimal_digits="3" + follows="top|left" + height="15" + increment="0.001" + max_val="2" + min_val="-2" + initial_value="0.0" + label="Height" + label_width="60" + left="10" + width="501" + layout="topleft" + name="HoverHeightSlider" + top="35" + can_edit_text="true" + > + </slider> +</floater> -- cgit v1.2.3 From 04d9c91a5f27b554e733b77272c8c3afea458810 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Tue, 2 Dec 2014 21:06:00 +0200 Subject: MAINT-3494 FIXED Generate Normals checkbox does not control generation of normals. Patchset #3 (remove std::move()) --- indra/newview/llfloatermodelpreview.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index f0c580c8ee..e81689f69c 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3862,7 +3862,7 @@ void LLModelPreview::generateNormals() { v_LLVolumeFace_t faces; (*it)->copyFacesTo(faces); - mBaseModelFacesCopy.push_back(std::move(faces)); + mBaseModelFacesCopy.push_back(faces); } } @@ -3885,7 +3885,7 @@ void LLModelPreview::generateNormals() { v_LLVolumeFace_t faces; (*it)->copyFacesTo(faces); - mModelFacesCopy[which_lod].push_back(std::move(faces)); + mModelFacesCopy[which_lod].push_back(faces); } (*it)->generateNormals(angle_cutoff); @@ -3915,10 +3915,10 @@ void LLModelPreview::restoreNormals() { (*it)->copyFacesFrom((*itF)); } - } - mBaseModelFacesCopy.clear(); - + mBaseModelFacesCopy.clear(); + } + if(!mModelFacesCopy[which_lod].empty()) { vv_LLVolumeFace_t::const_iterator itF = mModelFacesCopy[which_lod].begin(); @@ -3926,9 +3926,10 @@ void LLModelPreview::restoreNormals() { (*it)->copyFacesFrom((*itF)); } - } - mModelFacesCopy[which_lod].clear(); + mModelFacesCopy[which_lod].clear(); + } + mVertexBuffer[which_lod].clear(); refresh(); updateStatusMessages(); -- cgit v1.2.3 From 8c8bef36c049e78cc524e71fb6f740426fb3ce70 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 3 Dec 2014 11:54:19 +0200 Subject: MAINT-4704 FIXED Don't show warning message for "region" item, when fixed sky is used. --- indra/newview/llviewermenu.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c76e4ca46d..642a6e2a69 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8285,6 +8285,10 @@ class LLWorldEnableEnvSettings : public view_listener_t { result = (LLEnvManagerNew::instance().getSkyPresetName() == "Midnight"); } + else if (tod == "region") + { + return false; + } else { LL_WARNS() << "Unknown time-of-day item: " << tod << LL_ENDL; -- cgit v1.2.3 From 0a32de770d6ec82bb89b86d0d278470602eeb355 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 3 Dec 2014 11:58:41 +0200 Subject: MAINT-1871 FIXED Don't allow moving avatar while changing camera position. --- indra/newview/llagent.cpp | 2 ++ indra/newview/llagent.h | 4 ++++ indra/newview/llfloatercamera.cpp | 3 +++ indra/newview/lljoystickbutton.cpp | 6 ++++++ indra/newview/lljoystickbutton.h | 1 + indra/newview/llviewerkeyboard.cpp | 10 ++++++++++ 6 files changed, 26 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5cb03cd2ae..99fa12fc32 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -398,6 +398,8 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), + mMovementKeysLocked(FALSE), + mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))), mHaveHomePosition(FALSE), diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index a2e9cedd88..33088283da 100755 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -515,6 +515,9 @@ public: void moveYaw(F32 mag, bool reset_view = true); void movePitch(F32 mag); + BOOL isMovementLocked() const { return mMovementKeysLocked; } + void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; } + //-------------------------------------------------------------------- // Move the avatar's frame //-------------------------------------------------------------------- @@ -569,6 +572,7 @@ private: void (*mAutoPilotFinishedCallback)(BOOL, void *); void* mAutoPilotCallbackData; LLUUID mLeaderID; + BOOL mMovementKeysLocked; /** Movement ** ** diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d0939b3eee..ef08db3d33 100755 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -32,6 +32,7 @@ #include "llfloaterreg.h" // Viewer includes +#include "llagent.h" #include "llagentcamera.h" #include "lljoystickbutton.h" #include "llviewercontrol.h" @@ -342,6 +343,8 @@ void LLFloaterCamera::onClose(bool app_quitting) switchMode(CAMERA_CTRL_MODE_PAN); mClosed = TRUE; + + gAgent.setMovementLocked(FALSE); } LLFloaterCamera::LLFloaterCamera(const LLSD& val) diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index d38f90015e..59e14e6cc0 100755 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -424,6 +424,7 @@ void LLJoystickCameraRotate::updateSlop() BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask) { + gAgent.setMovementLocked(TRUE); updateSlop(); // Set initial offset based on initial click location @@ -465,6 +466,11 @@ BOOL LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask) return LLJoystick::handleMouseDown(x, y, mask); } +BOOL LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask) +{ + gAgent.setMovementLocked(FALSE); + return LLJoystick::handleMouseUp(x, y, mask); +} void LLJoystickCameraRotate::onHeldDown() { diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 8d76aa9531..4e6c774cad 100755 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -146,6 +146,7 @@ public: virtual void setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom ); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual void onHeldDown(); virtual void draw(); diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index 35b55029cc..9766a25521 100755 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -149,6 +149,8 @@ void camera_move_forward( EKeystate s ); void agent_push_forward( EKeystate s ) { + if(gAgent.isMovementLocked()) return; + //in free camera control mode we need to intercept keyboard events for avatar movements if (LLFloaterCamera::inFreeCameraMode()) { @@ -164,6 +166,8 @@ void camera_move_backward( EKeystate s ); void agent_push_backward( EKeystate s ) { + if(gAgent.isMovementLocked()) return; + //in free camera control mode we need to intercept keyboard events for avatar movements if (LLFloaterCamera::inFreeCameraMode()) { @@ -199,12 +203,14 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT void agent_slide_left( EKeystate s ) { + if(gAgent.isMovementLocked()) return; agent_slide_leftright(s, 1, LLAgent::DOUBLETAP_SLIDELEFT); } void agent_slide_right( EKeystate s ) { + if(gAgent.isMovementLocked()) return; agent_slide_leftright(s, -1, LLAgent::DOUBLETAP_SLIDERIGHT); } @@ -219,6 +225,8 @@ void agent_turn_left( EKeystate s ) return; } + if(gAgent.isMovementLocked()) return; + if (LLToolCamera::getInstance()->mouseSteerMode()) { agent_slide_left(s); @@ -247,6 +255,8 @@ void agent_turn_right( EKeystate s ) return; } + if(gAgent.isMovementLocked()) return; + if (LLToolCamera::getInstance()->mouseSteerMode()) { agent_slide_right(s); -- cgit v1.2.3 From 4734125659ca7fa5d5f86c306a929a4a12cc80ae Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 2 Dec 2014 19:47:47 +0200 Subject: MAINT-4710 FIXED The 'Copy to inventory' button should be disabled in Texture preview floater when permissions forbid it --- indra/newview/llpreviewtexture.cpp | 13 +++++++++++-- indra/newview/llpreviewtexture.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 5c41c5ad97..fed613543f 100755 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -65,6 +65,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mShowKeepDiscard(FALSE), mCopyToInv(FALSE), mIsCopyable(FALSE), + mIsFullPerm(FALSE), mUpdateDimensions(TRUE), mLastHeight(0), mLastWidth(0), @@ -269,7 +270,7 @@ void LLPreviewTexture::draw() // virtual BOOL LLPreviewTexture::canSaveAs() const { - return mIsCopyable && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); + return mIsFullPerm && !mLoadingFullImage && mImage.notNull() && !mImage->isMissingAsset(); } @@ -516,6 +517,11 @@ void LLPreviewTexture::loadAsset() mUpdateDimensions = TRUE; updateDimensions(); getChildView("save_tex_btn")->setEnabled(canSaveAs()); + if (mObjectUUID.notNull()) + { + // check that we can copy inworld items into inventory + getChildView("Keep")->setEnabled(mIsCopyable); + } } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() @@ -580,7 +586,9 @@ void LLPreviewTexture::updateImageID() mShowKeepDiscard = TRUE; mCopyToInv = FALSE; - mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + LLPermissions perm(item->getPermissions()); + mIsCopyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()); + mIsFullPerm = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); } else // not an item, assume it's an asset id { @@ -588,6 +596,7 @@ void LLPreviewTexture::updateImageID() mShowKeepDiscard = FALSE; mCopyToInv = TRUE; mIsCopyable = TRUE; + mIsFullPerm = TRUE; } } diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 97e74706cc..b104a91c75 100755 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -90,6 +90,7 @@ private: // This is stored off in a member variable, because the save-as // button and drag and drop functionality need to know. BOOL mIsCopyable; + BOOL mIsFullPerm; BOOL mUpdateDimensions; S32 mLastHeight; S32 mLastWidth; -- cgit v1.2.3 From e1134e04eba2d6a29d0f3212d4acde84fc0a4097 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 5 Dec 2014 11:04:11 +0200 Subject: MAINT-4718 FIXED Enable Open menu item even if texture is no-copy. --- indra/newview/llpanelobjectinventory.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index db944827cd..79eb42c20b 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -689,10 +689,6 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else if (canOpenItem()) { items.push_back(std::string("Task Open")); - if (!isItemCopyable()) - { - disabled_items.push_back(std::string("Task Open")); - } } items.push_back(std::string("Task Properties")); if(isItemRenameable()) -- cgit v1.2.3 From c467e4193943522077d2418c864b0ab831390fc2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 8 Dec 2014 11:50:26 +0200 Subject: MAINT-1662 FIXED Disable menu items for attached objects. --- indra/newview/llviewermenu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 642a6e2a69..b39a5bf9da 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4358,7 +4358,10 @@ static bool get_derezzable_objects( break; case DRD_RETURN_TO_OWNER: - can_derez_current = TRUE; + if(!object->isAttachment()) + { + can_derez_current = TRUE; + } break; default: @@ -4766,7 +4769,7 @@ BOOL enable_take() && object->permModify()) || (node->mPermissions->getOwner() == gAgent.getID()))) { - return TRUE; + return !object->isAttachment(); } #endif } -- cgit v1.2.3 From e8ea1a19afb4a33c33fff6ea7fb822433b179ae6 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 8 Dec 2014 16:44:06 +0200 Subject: MAINT-4342 FIXED Height text-box value decreases after it was set to a specific value --- indra/newview/llfloatersnapshot.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 43f6576dc9..5cea096a44 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -367,8 +367,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat")); - enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff); - setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot")); floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); LLPanelSnapshot* active_panel = getActivePanel(floater); @@ -478,8 +476,9 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) default: break; } - - if (previewp) + setAspectRatioCheckboxValue(floater, !floater->impl.mAspectRatioCheckOff && gSavedSettings.getBOOL("KeepAspectForSnapshot")); + + if (previewp) { previewp->setSnapshotType(shot_type); previewp->setSnapshotFormat(shot_format); @@ -627,6 +626,13 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL if (view) { + LLPanelSnapshot* active_panel = getActivePanel(view); + if (checked && active_panel) + { + LLComboBox* combo = view->getChild<LLComboBox>(active_panel->getImageSizeComboName()); + combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index + } + LLSnapshotLivePreview* previewp = getPreviewView(view) ; if(previewp) { @@ -691,7 +697,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde } view->impl.mAspectRatioCheckOff = !enable_cb; - enableAspectRatioCheckbox(view, enable_cb); + if (previewp) { previewp->mKeepAspectRatio = keep_aspect; -- cgit v1.2.3 From c9981ec59c4613531b2d5bb03f6ab8f6d914343c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 8 Dec 2014 13:12:28 -0500 Subject: SL-92 WIP - hover height communicated via appearance messages. --- indra/newview/app_settings/logcontrol.xml | 2 +- indra/newview/llfloaterhoverheight.cpp | 46 +++++++++++++++++++++++++++---- indra/newview/llfloaterhoverheight.h | 2 ++ indra/newview/llvoavatar.cpp | 30 ++++++++++++++++++-- indra/newview/llvoavatar.h | 1 + indra/newview/llvoavatarself.cpp | 2 ++ 6 files changed, 73 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 29639bb9c2..de3732f339 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,8 +42,8 @@ </array> <key>tags</key> <array> - <string>Avatar</string> <!-- sample entry for debugging specific items + <string>Avatar</string> <string>Inventory</string> <string>SceneLoadTiming</string> <string>Avatar</string> diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 6f7f8374d2..f25d491910 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -30,6 +30,28 @@ #include "llfloaterhoverheight.h" #include "llsliderctrl.h" #include "llviewercontrol.h" +#include "llsdserialize.h" +#include "llhttpclient.h" +#include "llagent.h" +#include "llviewerregion.h" +#include "llvoavatarself.h" + +class LLHoverHeightResponder: public LLHTTPClient::Responder +{ +public: + LLHoverHeightResponder(): LLHTTPClient::Responder() {} + +private: + void httpFailure() + { + LL_WARNS() << dumpResponse() << LL_ENDL; + } + + void httpSuccess() + { + LL_INFOS() << dumpResponse() << LL_ENDL; + } +}; LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) { @@ -53,12 +75,6 @@ BOOL LLFloaterHoverHeight::postBuild() // static void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - F32 value = sldrCtrl->getValueF32(); - - LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); - offset[2] = value; - gSavedSettings.setVector3("AvatarPosFinalOffset",offset); } // Do extra send-to-the-server work when slider drag completes, or new @@ -66,4 +82,22 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) void LLFloaterHoverHeight::onFinalCommit() { LL_INFOS() << "FINAL FINAL!!!" << LL_ENDL; + sendHoverHeightUpdate(); +} + +void LLFloaterHoverHeight::sendHoverHeightUpdate() +{ + LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); + F32 value = sldrCtrl->getValueF32(); + + std::string url = gAgent.getRegion()->getCapability("AgentPreferences"); + + if (!url.empty()) + { + LLSD update = LLSD::emptyMap(); + update["hover_height"] = value; + + LL_INFOS() << "updating hover height to " << value << LL_ENDL; + LLHTTPClient::post(url, update, new LLHoverHeightResponder); + } } diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index 1aede19e57..b81f293ae5 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -38,6 +38,8 @@ public: static void onSliderMoved(LLUICtrl* ctrl, void* userData); void onFinalCommit(); + + void sendHoverHeightUpdate(); }; #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 2c1dedede0..d150ace455 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -252,6 +252,8 @@ struct LLAppearanceMessageContents //U32 appearance_flags = 0; std::vector<F32> mParamWeights; std::vector<LLVisualParam*> mParams; + LLVector3 mHoverOffset; + bool mHoverOffsetWasSet; }; struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint> @@ -717,7 +719,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), - mLastUpdateReceivedCOFVersion(-1) + mLastUpdateReceivedCOFVersion(-1), + mHoverOffset(0.0, 0.0, 0.0) { //VTResume(); // VTune @@ -1959,6 +1962,11 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, // Do base class updates... U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp); + //LLTEContents tec; + //S32 te_retval = parseTEMessage(mesgsys, _PREHASH_ObjectData, block_num, tec); + + LL_DEBUGS("Avatar") << avString() << update_type << LL_ENDL; + // Print out arrival information once we have name of avatar. if (has_name && getNVPair("FirstName")) { @@ -3411,7 +3419,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; - root_pos += LLVector3d(gSavedSettings.getVector3("AvatarPosFinalOffset")); + root_pos += LLVector3d(mHoverOffset); LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); @@ -3581,7 +3589,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) else if (mDrawable.notNull()) { LLVector3 pos = mDrawable->getPosition(); - pos += gSavedSettings.getVector3("AvatarPosFinalOffset"); + pos += mHoverOffset; mRoot->setPosition(pos); mRoot->setRotation(mDrawable->getRotation()); } @@ -7007,6 +7015,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe // For future use: //mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0); } + + // Parse the AppearanceData field, if any. + contents.mHoverOffsetWasSet = false; + if (mesgsys->has(_PREHASH_AppearanceHover)) + { + LLVector3 hover; + mesgsys->getVector3Fast(_PREHASH_AppearanceHover, _PREHASH_HoverHeight, hover); + LL_DEBUGS("Avatar") << avString() << " hover received " << hover.mV[ VX ] << "," << hover.mV[ VY ] << "," << hover.mV[ VZ ] << LL_ENDL; + contents.mHoverOffset = hover; + contents.mHoverOffsetWasSet = true; + } // Parse visual params, if any. S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam); @@ -7308,6 +7327,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } } + if (contents.mHoverOffsetWasSet) + { + mHoverOffset = contents.mHoverOffset; + } + setCompositeUpdatesEnabled( TRUE ); // If all of the avatars are completely baked, release the global image caches to conserve memory. diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 42ff7bff92..445f0ff921 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -210,6 +210,7 @@ public: /*virtual*/ LLVector3 getPosAgentFromGlobal(const LLVector3d &position); virtual void updateVisualParams(); + LLVector3 mHoverOffset; /** Inherited ** ** diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 42a7c2e576..f4c6472f7a 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -163,6 +163,8 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, { mMotionController.mIsSelf = TRUE; + mHoverOffset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL; } -- cgit v1.2.3 From 015e979632eb1e9d68ee09ad58f937f2523c2a23 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 10 Dec 2014 12:32:51 +0200 Subject: MAINT-1774 FIXED Don't open preview texture floater if user clicks "Cancel" button. --- indra/newview/llinventorybridge.cpp | 4 ++-- indra/newview/llpreviewtexture.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1910656066..1dc5558555 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4462,11 +4462,11 @@ void LLTextureBridge::performAction(LLInventoryModel* model, std::string action) { if ("save_as" == action) { - LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); - LLPreviewTexture* preview_texture = LLFloaterReg::findTypedInstance<LLPreviewTexture>("preview_texture", mUUID); + LLPreviewTexture* preview_texture = LLFloaterReg::getTypedInstance<LLPreviewTexture>("preview_texture", mUUID); if (preview_texture) { preview_texture->openToSave(); + preview_texture->saveAs(); } } else LLItemBridge::performAction(model, action); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index fed613543f..f91a18d8d3 100755 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -183,12 +183,6 @@ void LLPreviewTexture::draw() if ( mImage.notNull() ) { - // Automatically bring up SaveAs dialog if we opened this to save the texture. - if (mPreviewToSave) - { - mPreviewToSave = FALSE; - saveAs(); - } // Draw the texture gGL.diffuseColor3f( 1.f, 1.f, 1.f ); gl_draw_scaled_image(interior.mLeft, @@ -287,6 +281,12 @@ void LLPreviewTexture::saveAs() // User canceled or we failed to acquire save file. return; } + if(mPreviewToSave) + { + mPreviewToSave = FALSE; + LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID()); + } + // remember the user-approved/edited file name. mSaveFileName = file_picker.getFirstFile(); mLoadingFullImage = TRUE; -- cgit v1.2.3 From 45167dba2efb1ebb88bba923f7fe16e698c20a5a Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 11 Dec 2014 15:34:40 +0200 Subject: MAINT-4740 FIXED Context menus left on screen when closing floater with Ctrl+W --- indra/newview/llviewermenufile.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index b2a37694fe..f8e50ba463 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -503,6 +503,7 @@ class LLFileCloseWindow : public view_listener_t { LLFloater::closeFrontmostFloater(); } + if (gMenuHolder) gMenuHolder->hideMenus(); return true; } }; @@ -525,6 +526,7 @@ class LLFileCloseAllWindows : public view_listener_t bool app_quitting = false; gFloaterView->closeAllChildren(app_quitting); LLFloaterSnapshot::getInstance()->closeFloater(app_quitting); + if (gMenuHolder) gMenuHolder->hideMenus(); return true; } }; -- cgit v1.2.3 From a357a4096cb645956a2432adfd5dcadc55c153f5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 11 Dec 2014 16:33:34 -0500 Subject: SL-92 WIP --- indra/newview/llfloaterhoverheight.cpp | 62 ++++++++++++++-------------------- indra/newview/llfloaterhoverheight.h | 2 +- indra/newview/llstartup.cpp | 2 ++ indra/newview/llvoavatar.cpp | 19 +++++++++-- indra/newview/llvoavatarself.cpp | 39 +++++++++++++++++++-- indra/newview/llvoavatarself.h | 2 ++ 6 files changed, 85 insertions(+), 41 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index f25d491910..bcdab6b3a0 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -36,68 +36,58 @@ #include "llviewerregion.h" #include "llvoavatarself.h" -class LLHoverHeightResponder: public LLHTTPClient::Responder +LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) { -public: - LLHoverHeightResponder(): LLHTTPClient::Responder() {} +} -private: - void httpFailure() - { - LL_WARNS() << dumpResponse() << LL_ENDL; - } +void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) +{ + LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + F32 value = offset[2]; - void httpSuccess() + LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data); + LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider"); + sldrCtrl->setValue(value,FALSE); + if (isAgentAvatarValid()) { - LL_INFOS() << dumpResponse() << LL_ENDL; + gAgentAvatarp->sendHoverHeight(); } -}; - -LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) -{ } BOOL LLFloaterHoverHeight::postBuild() { - - LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); - F32 value = offset[2]; - LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); - sldrCtrl->setValue(value,FALSE); sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL); + // Initialize slider from pref setting. + syncFromPreferenceSetting(this); + // Update slider on future pref changes. + gSavedSettings.getControl("AvatarPosFinalOffset")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); + return TRUE; } // static void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { + LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); + F32 value = sldrCtrl->getValueF32(); + LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + offset[2] = value; + gAgentAvatarp->mHoverOffset = offset; } -// Do extra send-to-the-server work when slider drag completes, or new +// Do send-to-the-server work when slider drag completes, or new // value entered as text. void LLFloaterHoverHeight::onFinalCommit() -{ - LL_INFOS() << "FINAL FINAL!!!" << LL_ENDL; - sendHoverHeightUpdate(); -} - -void LLFloaterHoverHeight::sendHoverHeightUpdate() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); + LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + offset[2] = value; + gSavedSettings.setVector3("AvatarPosFinalOffset",offset); +} - std::string url = gAgent.getRegion()->getCapability("AgentPreferences"); - if (!url.empty()) - { - LLSD update = LLSD::emptyMap(); - update["hover_height"] = value; - - LL_INFOS() << "updating hover height to " << value << LL_ENDL; - LLHTTPClient::post(url, update, new LLHoverHeightResponder); - } -} diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index b81f293ae5..586871374f 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -39,7 +39,7 @@ public: void onFinalCommit(); - void sendHoverHeightUpdate(); + static void syncFromPreferenceSetting(void *user_data); }; #endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9da7717b74..d5f9268a64 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2210,6 +2210,8 @@ bool idle_startup() llassert(LLPathfindingManager::getInstance() != NULL); LLPathfindingManager::getInstance()->initSystem(); + gAgentAvatarp->sendHoverHeight(); + return TRUE; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index d150ace455..118ed10eb2 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3219,6 +3219,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { debug_line += llformat(" - cof rcv:%d", last_received_cof_version); } + if (mHoverOffset[2] != 0.0) + { + debug_line += llformat(" hov_z: %f", mHoverOffset[2]); + } addDebugText(debug_line); } if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) @@ -3589,7 +3593,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) else if (mDrawable.notNull()) { LLVector3 pos = mDrawable->getPosition(); - pos += mHoverOffset; + pos += mHoverOffset * mDrawable->getRotation(); mRoot->setPosition(pos); mRoot->setRotation(mDrawable->getRotation()); } @@ -7327,11 +7331,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } } - if (contents.mHoverOffsetWasSet) + if (contents.mHoverOffsetWasSet && !isSelf()) { + // Got an update for some other avatar. + // (Ignore updates for self because they may be out of date.) mHoverOffset = contents.mHoverOffset; } + if (!contents.mHoverOffsetWasSet) + { + // If we don't get a value at all, we are presumably in a + // region that does not support hover height. +// FIXME RESTORE AFTER TESTING + LL_WARNS() << "zeroing hover because not defined in appearance message" << LL_ENDL; + mHoverOffset = LLVector3(0.0, 0.0, 0.0); + } + setCompositeUpdatesEnabled( TRUE ); // If all of the avatars are completely baked, release the global image caches to conserve memory. diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f4c6472f7a..a5379f24ba 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -127,6 +127,25 @@ struct LocalTextureData LLTextureEntry *mTexEntry; }; +// TODO - this class doesn't really do anything, could just use a base +// class responder if nothing else gets added. +class LLHoverHeightResponder: public LLHTTPClient::Responder +{ +public: + LLHoverHeightResponder(): LLHTTPClient::Responder() {} + +private: + void httpFailure() + { + LL_WARNS() << dumpResponse() << LL_ENDL; + } + + void httpSuccess() + { + LL_INFOS() << dumpResponse() << LL_ENDL; + } +}; + //----------------------------------------------------------------------------- // Callback data //----------------------------------------------------------------------------- @@ -163,8 +182,6 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, { mMotionController.mIsSelf = TRUE; - mHoverOffset = gSavedSettings.getVector3("AvatarPosFinalOffset"); - LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL; } @@ -222,6 +239,8 @@ void LLVOAvatarSelf::initInstance() return; } + mHoverOffset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + //doPeriodically(output_self_av_texture_diagnostics, 30.0); doPeriodically(update_avatar_rez_metrics, 5.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); @@ -2687,6 +2706,22 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const return success; } +//------------------------------------------------------------------------ +// sendHoverHeight() +//------------------------------------------------------------------------ +void LLVOAvatarSelf::sendHoverHeight() const +{ + std::string url = gAgent.getRegion()->getCapability("AgentPreferences"); + + if (!url.empty()) + { + LLSD update = LLSD::emptyMap(); + update["hover_height"] = mHoverOffset[2]; + + LL_DEBUGS("Avatar") << "sending hover height value " << mHoverOffset[2] << LL_ENDL; + LLHTTPClient::post(url, update, new LLHoverHeightResponder); + } +} //------------------------------------------------------------------------ // needsRenderBeam() diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index e03de9fa0b..7b932abd44 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -328,6 +328,8 @@ public: public: bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; + void sendHoverHeight() const; + /** Appearance ** ** *******************************************************************************/ -- cgit v1.2.3 From c2bd14193d0c4dff636f2703ed90cc3d4a23edee Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 12 Dec 2014 12:09:17 +0200 Subject: MAINT-4739 FIXED Restore cursor when WorldMap floater loses focus. --- indra/newview/llfloaterworldmap.cpp | 8 ++++++++ indra/newview/llfloaterworldmap.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index ff66bdedb0..5093a40ce4 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -63,6 +63,7 @@ #include "llviewerregion.h" #include "llviewerstats.h" #include "llviewertexture.h" +#include "llviewerwindow.h" #include "llworldmap.h" #include "llworldmapmessage.h" #include "llworldmapview.h" @@ -1634,3 +1635,10 @@ void LLFloaterWorldMap::onChangeMaturity() gSavedSettings.setBOOL("ShowAdultEvents", FALSE); } } + +void LLFloaterWorldMap::onFocusLost() +{ + gViewerWindow->showCursor(); + LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel; + map_panel->mPanning = FALSE; +} diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 84ca5a7a71..7ce8dae9a9 100755 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -68,6 +68,8 @@ public: /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ void draw(); + /*virtual*/ void onFocusLost(); + // methods for dealing with inventory. The observe() method is // called during program startup. inventoryUpdated() will be // called by a helper object when an interesting change has -- cgit v1.2.3 From 028e9b998ccad361256af5124c81d12eb2f65710 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 16 Dec 2014 11:35:24 +0200 Subject: MAINT-3483 FIXED Cursor is not in input field, after double click on resident in Nearby chat --- indra/newview/llconversationview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 4250aeacd6..b18e543f0a 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -296,7 +296,7 @@ BOOL LLConversationViewSession::handleMouseUp( S32 x, S32 y, MASK mask ) LLFloater* volume_floater = LLFloaterReg::findInstance("floater_voice_volume"); LLFloater* chat_volume_floater = LLFloaterReg::findInstance("chat_voice"); if (result - && getRoot() + && getRoot() && (getRoot()->getCurSelectedItem() == this) && !(volume_floater && volume_floater->isShown() && volume_floater->hasFocus()) && !(chat_volume_floater && chat_volume_floater->isShown() && chat_volume_floater->hasFocus())) { -- cgit v1.2.3 From 5f288e837ce7fe0fe433c8afb7b1201b3d036a3e Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 16 Dec 2014 19:09:38 +0200 Subject: MAINT-2590 FIXED Linked HUDs attached directly from inworld are invisible --- indra/newview/lldrawable.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index c56006d9a3..73930c2115 100755 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1117,7 +1117,14 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() retval = gPipeline.getSpatialPartition((LLViewerObject*) mVObjp); } else if (isRoot()) - { //must be an active volume + { + if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment()) + { + // remove obsolete bridge + mSpatialBridge->markDead(); + setSpatialBridge(NULL); + } + //must be an active volume if (!mSpatialBridge) { if (mVObjp->isHUDAttachment()) -- cgit v1.2.3 From 5c255726f4820ea5007ea939a49eba82f8bdbc0b Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Fri, 12 Dec 2014 20:14:09 +0200 Subject: MAINT-3488 FIXED Pose balls are sometimes invisible after standing up until zooming camera closer --- indra/newview/llviewerdisplay.cpp | 4 ++-- indra/newview/llvovolume.cpp | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index dfbb128d3b..9ef911616e 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -930,8 +930,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction) { gGL.setColorMask(false, false); - - U32 types[] = { + + static const U32 types[] = { LLRenderPass::PASS_SIMPLE, LLRenderPass::PASS_FULLBRIGHT, LLRenderPass::PASS_SHINY diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 008ef792e0..b49543c158 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1742,6 +1742,8 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) } } } + + genBBoxes(FALSE); } // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local else @@ -4973,7 +4975,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) facep->clearVertexBuffer(); } } - + if (is_rigged) { if (!drawablep->isState(LLDrawable::RIGGED)) @@ -4989,7 +4991,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { drawablep->clearState(LLDrawable::RIGGED); } - } } @@ -5464,8 +5465,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFac flexi = flexi || facep->getViewerObject()->getVolume()->isUnique(); } - } } + } if (flexi && buffer_usage && buffer_usage != GL_STREAM_DRAW_ARB) -- cgit v1.2.3 From 6539fe4a671ae73badc3aea6e00d497daafc7733 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Tue, 16 Dec 2014 09:14:18 -0500 Subject: SL-92 WIP - track appearance message timing --- indra/newview/llvoavatar.cpp | 15 +++++++++++++++ indra/newview/llvoavatar.h | 1 + 2 files changed, 16 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 118ed10eb2..765220cdd4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -776,6 +776,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mRuthTimer.reset(); mRuthDebugTimer.reset(); mDebugExistenceTimer.reset(); + mLastAppearanceMessageTimer.reset(); mPelvisOffset = LLVector3(0.0f,0.0f,0.0f); mLastPelvisToFoot = 0.0f; mPelvisFixup = 0.0f; @@ -3223,6 +3224,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { debug_line += llformat(" hov_z: %f", mHoverOffset[2]); } + F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32(); + static char *elapsed_chars = "Xx*..."; + U32 bucket = U32(elapsed*2); + if (bucket < strlen(elapsed_chars)) + { + debug_line += llformat(" %c", elapsed_chars[bucket]); + } addDebugText(debug_line); } if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) @@ -7147,6 +7155,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } + mLastAppearanceMessageTimer.reset(); + ESex old_sex = getSex(); LLAppearanceMessageContents contents; @@ -7331,6 +7341,11 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } } + if (isSelf()) + { + LL_INFOS("Avatar") << "hover was set: " << contents.mHoverOffsetWasSet << " value_z " << contents.mHoverOffset[2] << LL_ENDL; + } + if (contents.mHoverOffsetWasSet && !isSelf()) { // Got an update for some other avatar. diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 445f0ff921..8135c3d4d8 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -992,6 +992,7 @@ public: protected: LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory. + LLFrameTimer mLastAppearanceMessageTimer; // Time since last appearance message received. //-------------------------------------------------------------------- // COF monitoring -- cgit v1.2.3 From 211c18d3b7de319570bb3be7f3607654d7ec98ac Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Tue, 16 Dec 2014 10:47:58 -0500 Subject: linux build fix --- indra/newview/app_settings/logcontrol.xml | 1 + indra/newview/llvoavatar.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index de3732f339..6a798e1d42 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,6 +42,7 @@ </array> <key>tags</key> <array> + <string>Avatar</string> <!-- sample entry for debugging specific items <string>Avatar</string> <string>Inventory</string> diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 765220cdd4..25c7120a19 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3225,7 +3225,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) debug_line += llformat(" hov_z: %f", mHoverOffset[2]); } F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32(); - static char *elapsed_chars = "Xx*..."; + static const char *elapsed_chars = "Xx*..."; U32 bucket = U32(elapsed*2); if (bucket < strlen(elapsed_chars)) { -- cgit v1.2.3 From 04a5080b670781d1f26e0878971013f37b1592d2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 18 Dec 2014 12:10:40 +0200 Subject: MAINT-4726 FIXED Strange camera roll when using freeze frame in snapshot floater --- indra/newview/llfloatersnapshot.cpp | 2 +- indra/newview/llsnapshotlivepreview.cpp | 13 ++++++++----- indra/newview/llsnapshotlivepreview.h | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 5cea096a44..1d0ddc2ced 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -553,7 +553,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data) { view->impl.setStatus(Impl::STATUS_READY); LL_DEBUGS() << "updating snapshot" << LL_ENDL; - previewp->updateSnapshot(TRUE); + previewp->mForceUpdateSnapshot = TRUE; } } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 600ebf5914..050b88413d 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -116,6 +116,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mThumbnailUpdateLock = FALSE ; mThumbnailUpToDate = FALSE ; mBigThumbnailUpToDate = FALSE ; + + mForceUpdateSnapshot = FALSE; } LLSnapshotLivePreview::~LLSnapshotLivePreview() @@ -671,18 +673,19 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) // If we're in freeze-frame mode and camera has moved, update snapshot. LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin(); LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion(); - if (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview && - (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)) + if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview && + (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))) { previewp->mCameraPos = new_camera_pos; previewp->mCameraRot = new_camera_rot; // request a new snapshot whenever the camera moves, with a time delay - BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot"); + BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot; LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL; previewp->updateSnapshot( - autosnap, // whether a new snapshot is needed or merely invalidate the existing one + new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one FALSE, // or if 1st arg is false, whether to produce a new thumbnail image. - autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true. + new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true. + previewp->mForceUpdateSnapshot = FALSE; } // see if it's time yet to snap the shot and bomb out otherwise. diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index e1937187a3..fed33bf37c 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -182,6 +182,7 @@ private: public: static std::set<LLSnapshotLivePreview*> sList; BOOL mKeepAspectRatio ; + BOOL mForceUpdateSnapshot; }; #endif // LL_LLSNAPSHOTLIVEPREVIEW_H -- cgit v1.2.3 From 797f221e6715f5b2423cd68e970b1f2ec2af7015 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 18 Dec 2014 20:05:36 +0200 Subject: MAINT-4708 better grouping of ack messages between viewer and server --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e4e9ed168b..c3aacd1c4f 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -49,6 +49,17 @@ <key>Value</key> <real>300</real> </map> + <key>AckCollectTime</key> + <map> + <key>Comment</key> + <string>Ack messages collection and grouping time</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.1</real> + </map> <key>AdminMenu</key> <map> <key>Comment</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 67007bc4cd..54c5d1b9f4 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5378,7 +5378,7 @@ void LLAppViewer::idleNetwork() } // Handle per-frame message system processing. - gMessageSystem->processAcks(); + gMessageSystem->processAcks(gSavedSettings.getF32("AckCollectTime")); #ifdef TIME_THROTTLE_MESSAGES if (total_time >= CheckMessagesMaxTime) -- cgit v1.2.3 From 553b7ede723ceed310f1dbbfba25f5bf555466e1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 22 Dec 2014 11:14:15 -0500 Subject: Moved AvatarPosFinalOffset to per-account settings file --- indra/newview/app_settings/settings.xml | 15 --------------- indra/newview/app_settings/settings_per_account.xml | 15 +++++++++++++++ indra/newview/llfloaterhoverheight.cpp | 15 +++++++++++---- indra/newview/llvoavatar.cpp | 4 ++-- indra/newview/llvoavatarself.cpp | 5 +++-- 5 files changed, 31 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 138bdde9e9..94d3c8a59f 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -654,21 +654,6 @@ <key>Value</key> <integer>2</integer> </map> - <key>AvatarPosFinalOffset</key> - <map> - <key>Comment</key> - <string>After-everything-else fixup for avatar position.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Vector3</string> - <key>Value</key> - <array> - <real>0.0</real> - <real>0.0</real> - <real>0.0</real> - </array> - </map> <key>AvatarPickerURL</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index fc6f1f6395..7975fe9e3a 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,5 +1,20 @@ <llsd> <map> + <key>AvatarPosFinalOffset</key> + <map> + <key>Comment</key> + <string>After-everything-else fixup for avatar position.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Vector3</string> + <key>Value</key> + <array> + <real>0.0</real> + <real>0.0</real> + <real>0.0</real> + </array> + </map> <key>DoNotDisturbResponseChanged</key> <map> <key>Comment</key> diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index bcdab6b3a0..a858b891a9 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -42,7 +42,7 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) { - LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); F32 value = offset[2]; LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data); @@ -64,7 +64,14 @@ BOOL LLFloaterHoverHeight::postBuild() // Initialize slider from pref setting. syncFromPreferenceSetting(this); // Update slider on future pref changes. - gSavedSettings.getControl("AvatarPosFinalOffset")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); + if (gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")) + { + gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); + } + else + { + LL_WARNS() << "Control not found for AvatarPosFinalOffset" << LL_ENDL; + } return TRUE; } @@ -85,9 +92,9 @@ void LLFloaterHoverHeight::onFinalCommit() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); - LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); offset[2] = value; - gSavedSettings.setVector3("AvatarPosFinalOffset",offset); + gSavedPerAccountSettings.setVector3("AvatarPosFinalOffset",offset); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index da0e72a6ee..a6d006f13b 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7457,7 +7457,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) if (isSelf()) { - LL_INFOS("Avatar") << "hover was set: " << contents.mHoverOffsetWasSet << " value_z " << contents.mHoverOffset[2] << LL_ENDL; + LL_INFOS("Avatar") << avString() << "hover was set: " << contents.mHoverOffsetWasSet << " value_z " << contents.mHoverOffset[2] << LL_ENDL; } if (contents.mHoverOffsetWasSet && !isSelf()) @@ -7471,7 +7471,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { // If we don't get a value at all, we are presumably in a // region that does not support hover height. -// FIXME RESTORE AFTER TESTING + LL_WARNS() << "zeroing hover because not defined in appearance message" << LL_ENDL; mHoverOffset = LLVector3(0.0, 0.0, 0.0); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 3d82a6dab6..6e0c9cb68c 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -239,7 +239,8 @@ void LLVOAvatarSelf::initInstance() return; } - mHoverOffset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + mHoverOffset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); + LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; //doPeriodically(output_self_av_texture_diagnostics, 30.0); doPeriodically(update_avatar_rez_metrics, 5.0); @@ -2734,7 +2735,7 @@ void LLVOAvatarSelf::sendHoverHeight() const LLSD update = LLSD::emptyMap(); update["hover_height"] = mHoverOffset[2]; - LL_DEBUGS("Avatar") << "sending hover height value " << mHoverOffset[2] << LL_ENDL; + LL_DEBUGS("Avatar") << avString() << "sending hover height value " << mHoverOffset[2] << LL_ENDL; LLHTTPClient::post(url, update, new LLHoverHeightResponder); } } -- cgit v1.2.3 From 79a89f5d921f99ba7a990a1dbf7428d1d3758bc6 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 22 Dec 2014 11:18:58 -0500 Subject: SL-92 WIP - moving AvatarPosFinalOffset to per-account settings --- indra/newview/llfloaterhoverheight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index a858b891a9..9efb168b55 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -81,7 +81,7 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); F32 value = sldrCtrl->getValueF32(); - LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); + LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); offset[2] = value; gAgentAvatarp->mHoverOffset = offset; } -- cgit v1.2.3 From 9fcdeae1ddd25cbff8fdb91337598bc84577084a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 23 Dec 2014 13:27:21 +0200 Subject: MAINT-4766 FIXED Reset camera to default after disabling Automatic position for: Appearance option. --- indra/newview/llfloaterpreference.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 598c7f9feb..0c669506fa 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -37,6 +37,7 @@ #include "message.h" #include "llfloaterautoreplacesettings.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcheckboxctrl.h" #include "llcolorswatch.h" #include "llcombobox.h" @@ -74,6 +75,7 @@ #include "llviewermessage.h" #include "llviewershadermgr.h" #include "llviewerthrottle.h" +#include "llvoavatarself.h" #include "llvotree.h" #include "llvosky.h" #include "llfloaterpathfindingconsole.h" @@ -251,6 +253,14 @@ void handleDisplayNamesOptionChanged(const LLSD& newvalue) LLVOAvatar::invalidateNameTags(); } +void handleAppearanceCameraMovementChanged(const LLSD& newvalue) +{ + if(!newvalue.asBoolean() && gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) + { + gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); + } +} /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { @@ -361,6 +371,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); + gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2)); + LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); mCommitCallbackRegistrar.add("Pref.ClearLog", boost::bind(&LLConversationLog::onClearLog, &LLConversationLog::instance())); -- cgit v1.2.3 From 13b119435dc7bd36ead4ea9f06db45e185ae61fd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 23 Dec 2014 16:24:12 +0200 Subject: MAINT-4769 FIXED Teleport history timestamp text is truncated for AM times. --- indra/newview/skins/default/xui/en/panel_teleport_history_item.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml index 26cac06648..5c728718ef 100755 --- a/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history_item.xml @@ -60,7 +60,7 @@ text_color="White" top="4" value="..." - width="45" /> + width="49" /> <button follows="right" height="20" -- cgit v1.2.3 From 5683d7a2f21d54604cb56e36fa8f0562a19480c4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 26 Dec 2014 11:01:55 +0200 Subject: MAINT-4699 FIXED notifications list is out of order --- indra/newview/llviewermessage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 44eb4361f1..0fbecd5180 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2689,7 +2689,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["SUBJECT"] = subj; args["MESSAGE"] = mes; - LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(LLDate(timestamp))); + LLDate notice_date = LLDate(timestamp).notNull() ? LLDate(timestamp) : LLDate::now(); + LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(notice_date)); } // Also send down the old path for now. -- cgit v1.2.3 From 1918428e66b63d66260717f581e865b472f821ea Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 25 Dec 2014 20:36:07 +0200 Subject: MAINT-1863 FIXED 'Delete' button is always disabled for Notecard that was opened from object's content --- indra/newview/llpreviewnotecard.cpp | 42 ++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 337a63e627..307fd55875 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -215,9 +215,12 @@ void LLPreviewNotecard::loadAsset() if(item) { - if (gAgent.allowOperation(PERM_COPY, item->getPermissions(), - GP_OBJECT_MANIPULATE) - || gAgent.isGodlike()) + LLPermissions perm(item->getPermissions()); + BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); + BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); + BOOL allow_modify = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); + + if (allow_copy || gAgent.isGodlike()) { mAssetID = item->getAssetUUID(); if(mAssetID.isNull()) @@ -271,12 +274,17 @@ void LLPreviewNotecard::loadAsset() editor->setEnabled(FALSE); mAssetStatus = PREVIEW_ASSET_LOADED; } - if(!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), - GP_OBJECT_MANIPULATE)) + + if(!allow_modify) { editor->setEnabled(FALSE); getChildView("lock")->setVisible( TRUE); } + + if(allow_modify || is_owner) + { + getChildView("Delete")->setEnabled(TRUE); + } } else { @@ -492,13 +500,27 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) void LLPreviewNotecard::deleteNotecard() { - LLViewerInventoryItem* item = gInventory.getItem(mItemUUID); - if (item != NULL) + if (mObjectUUID.isNull()) { - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - gInventory.changeItemParent(item, trash_id, FALSE); + LLViewerInventoryItem* item = gInventory.getItem(mItemUUID); + if (item != NULL) + { + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + gInventory.changeItemParent(item, trash_id, FALSE); + } + } + else + { + LLViewerObject* object = gObjectList.findObject(mObjectUUID); + if(object) + { + LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID)); + if (item != NULL) + { + object->removeInventory(mItemUUID); + } + } } - closeFloater(); } -- cgit v1.2.3 From 7cf015425677c1112d5c8ec90f77e34320ad1009 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 29 Dec 2014 16:55:09 +0200 Subject: MAINT-1998 FIXED 'Open' menu item is absent in pop-up menu for notecard marked for sale from object's content --- indra/newview/llpanelobjectinventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 79eb42c20b..bf15f56b44 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -654,7 +654,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) return; } - if(gAgent.allowOperation(PERM_OWNER, item->getPermissions(), + if(!gAgent.allowOperation(PERM_OWNER, item->getPermissions(), GP_OBJECT_MANIPULATE) && item->getSaleInfo().isForSale()) { -- cgit v1.2.3 From c7707a10c59199740c57d8eadcab7d9b1c2026f1 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 29 Dec 2014 19:03:18 +0200 Subject: MAINT-1998 FIXED 'Open' menu item should be disabled if agent has no copy permissions. --- indra/newview/llpanelobjectinventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index bf15f56b44..5fd575ee8b 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -689,6 +689,10 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else if (canOpenItem()) { items.push_back(std::string("Task Open")); + if (!isItemCopyable()) + { + disabled_items.push_back(std::string("Task Open")); + } } items.push_back(std::string("Task Properties")); if(isItemRenameable()) -- cgit v1.2.3 From 2dccacd36e67a6e9037d830e6242f33568009637 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 31 Dec 2014 15:39:31 +0200 Subject: MAINT-3418 FIXED Button truncation in some non-English Estate floaters --- indra/newview/skins/default/xui/es/panel_region_debug.xml | 10 +++++----- indra/newview/skins/default/xui/fr/panel_region_debug.xml | 10 +++++----- indra/newview/skins/default/xui/it/panel_region_debug.xml | 10 +++++----- indra/newview/skins/default/xui/pt/panel_region_debug.xml | 10 +++++----- indra/newview/skins/default/xui/ru/panel_region_debug.xml | 10 +++++----- indra/newview/skins/default/xui/tr/panel_region_debug.xml | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/es/panel_region_debug.xml b/indra/newview/skins/default/xui/es/panel_region_debug.xml index f6676967f5..2a98fb808d 100755 --- a/indra/newview/skins/default/xui/es/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/es/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="En el terreno de otros" name="return_other_land" tool_tip="Devolver sólo los objetos que están en terreno de otro"/> <check_box label="En cada región de este estado" name="return_estate_wide" tool_tip="Devolver los objetos de todas las regiones que forman este estado"/> <button label="Devolver" name="return_btn"/> - <button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="280"/> - <button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región"/> - <button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="280"/> - <button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región"/> - <button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región"/> + <button label="Listar los objetos que colisionan..." name="top_colliders_btn" tool_tip="Lista de los objetos con más posibles colisiones potenciales" width="240"/> + <button label="Reiniciar la región" name="restart_btn" tool_tip="Cuenta atrás de 2 minutos y reiniciar la región" left_pad="90" width="160"/> + <button label="Listar los scripts según su uso..." name="top_scripts_btn" tool_tip="Lista de los objetos que más tiempo emplean ejecutando scripts" width="240"/> + <button label="Cancelar reinicio" name="cancel_restart_btn" tool_tip="Cancelar el reinicio de región" left_pad="90" width="160"/> + <button label="Consola de depuración de región" name="region_debug_console_btn" tool_tip="Abrir consola de depuración de región" width="240"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml index d21695e9aa..461ada3108 100755 --- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="Sur le terrain d'un autre résident" name="return_other_land" tool_tip="Ne renvoyer que les objets se trouvant sur le terrain de quelqu'un d'autre"/> <check_box label="Dans toutes les régions de ce domaine" name="return_estate_wide" tool_tip="Renvoyer les objets dans toutes les régions qui constituent ce domaine"/> <button label="Renvoyer" name="return_btn"/> - <button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="320"/> - <button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" width="160"/> - <button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="320"/> - <button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." width="160"/> - <button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région"/> + <button label="Collisions les plus consommatrices" name="top_colliders_btn" tool_tip="Liste des objets avec le plus de collisions potentielles" width="240"/> + <button label="Redémarrer la région" name="restart_btn" tool_tip="Redémarrer la région au bout de 2 minutes" left_pad="90" width="160"/> + <button label="Scripts les plus consommateurs" name="top_scripts_btn" tool_tip="Liste des objets passant le plus de temps à exécuter des scripts" width="240"/> + <button label="Annuler le redémarrage" name="cancel_restart_btn" tool_tip="Annuler le redémarrage de la région." left_pad="90" width="160"/> + <button label="Console de débogage de région" name="region_debug_console_btn" tool_tip="Ouvrir la console de débogage de région" width="240"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_region_debug.xml b/indra/newview/skins/default/xui/it/panel_region_debug.xml index 88c056bf5e..ca39cf6d05 100755 --- a/indra/newview/skins/default/xui/it/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/it/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="Sul terreno di un altro residente" name="return_other_land" tool_tip="Restituisci solo gli oggetti che sono in terreni appartenenti a qualcun altro"/> <check_box label="In tutte le regioni di questa proprietà" name="return_estate_wide" tool_tip="Restituisci tutti gli oggetti nelle varie regioni che costituiscono l'insieme dei possedimenti terrieri"/> <button label="Restituisci" name="return_btn"/> - <button label="Visualizza l'elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="280"/> - <button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione"/> - <button label="Visualizza l'elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="280"/> - <button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione"/> - <button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione"/> + <button label="Visualizza l'elenco dei maggiori collidenti..." name="top_colliders_btn" tool_tip="Elenco degli oggetti che stanno potenzialmente subendo le maggiori collisioni" width="270"/> + <button label="Riavvia la regione" name="restart_btn" tool_tip="Dai 2 minuti di tempo massimo e fai riavviare la regione" left_pad="90" width="140"/> + <button label="Visualizza l'elenco degli script più pesanti..." name="top_scripts_btn" tool_tip="Elenco degli oggetti che impiegano più tempo a far girare gli script" width="270"/> + <button label="Annulla riavvio" name="cancel_restart_btn" tool_tip="Annulla riavvio regione" left_pad="90" width="140"/> + <button label="Console di debug regione" name="region_debug_console_btn" tool_tip="Apri console di debug regione" width="270"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_region_debug.xml b/indra/newview/skins/default/xui/pt/panel_region_debug.xml index 9070563fd0..2647c7a1e2 100755 --- a/indra/newview/skins/default/xui/pt/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/pt/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="No terreno de outra pessoa" name="return_other_land" tool_tip="Devolver apenas objetos que estejam em terrenos de outra pessoa"/> <check_box label="Em todas as regiões desta propriedade" name="return_estate_wide" tool_tip="Devolver objetos em todas as regiões que constituem esta propriedade"/> <button label="Devolver" name="return_btn"/> - <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="280"/> - <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região"/> - <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="280"/> - <button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região"/> - <button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região"/> + <button label="Principais colidentes..." name="top_colliders_btn" tool_tip="Lista dos objetos com maior potencial de colisão" width="240"/> + <button label="Reiniciar a região" name="restart_btn" tool_tip="Após 2 minutos de contagem regressiva, reiniciar a região" left_pad="90" width="160"/> + <button label="Principais scripts..." name="top_scripts_btn" tool_tip="Lista de objetos que mais passam tempo executando scripts" width="240"/> + <button label="Cancelar reinício" name="cancel_restart_btn" tool_tip="Cancelar reinício da região" left_pad="90" width="160"/> + <button label="Console de depuração de região" name="region_debug_console_btn" tool_tip="Abrir console de depuração de região" width="240"/> </panel> diff --git a/indra/newview/skins/default/xui/ru/panel_region_debug.xml b/indra/newview/skins/default/xui/ru/panel_region_debug.xml index d294a9e22e..3eaa0b19e0 100755 --- a/indra/newview/skins/default/xui/ru/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/ru/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="На чужой земле" name="return_other_land" tool_tip="Возвращаются только объекты, расположенные на чужой земле"/> <check_box label="С каждого региона этого землевладения" name="return_estate_wide" tool_tip="Возвращаются объекты со всех регионов, образующих это землевладение"/> <button label="Возврат" name="return_btn"/> - <button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны"/> - <button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион"/> - <button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего"/> - <button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона"/> - <button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона"/> + <button label="Самые активные участники столкновений..." name="top_colliders_btn" tool_tip="Список объектов, для которых столкновения наиболее вероятны" width="255"/> + <button label="Перезагрузить регион" name="restart_btn" tool_tip="Отсчитать 2 минуты и перезагрузить регион" left_pad="85"/> + <button label="Список лучших скриптов..." name="top_scripts_btn" tool_tip="Объекты, в которых скрипты выполняются дольше всего" width="255"/> + <button label="Отменить перезапуск" name="cancel_restart_btn" tool_tip="Отменить перезапуск региона" left_pad="85"/> + <button label="Консоль отладки региона" name="region_debug_console_btn" tool_tip="Открыть консоль отладки региона" width="255"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_region_debug.xml b/indra/newview/skins/default/xui/tr/panel_region_debug.xml index 74a0a1569e..ec654aae82 100755 --- a/indra/newview/skins/default/xui/tr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_debug.xml @@ -27,9 +27,9 @@ <check_box label="Başkasına ait arazi üzerinde" name="return_other_land" tool_tip="Sadece başkasına ait arazi üzerinde olan nesneler iade edilsin"/> <check_box label="Bu gayrimenkulu oluşturan bölgelerin tümünde" name="return_estate_wide" tool_tip="Bu gayrimenkulu oluşturan bölgelerin tümündeki nesneler iade edilsin"/> <button label="İade Et" name="return_btn"/> - <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi"/> - <button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat"/> - <button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/> - <button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et"/> - <button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu"/> + <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi" width="180"/> + <button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat" width="160"/> + <button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi" width="180"/> + <button label="Yeniden Başlatmayı İptal Et" name="cancel_restart_btn" tool_tip="Bölge yeniden başlatmasını iptal et" width="160"/> + <button label="Bölge Hata Ayıklama Konsolu" name="region_debug_console_btn" tool_tip="Açık Bölge Hata Ayıklama Konsolu" width="180"/> </panel> -- cgit v1.2.3 From c7c62b96502a7afc96e58272081b9d70a8260483 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Wed, 31 Dec 2014 14:06:05 +0200 Subject: MAINT-1654 FIXED object context menu redraws and repositions some time after being opened. --- indra/newview/llviewermenu.cpp | 6 ++++++ indra/newview/skins/default/xui/en/menu_object.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b39a5bf9da..b77d3ca1be 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2871,6 +2871,11 @@ bool enable_object_select_in_pathfinding_linksets() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } +bool visible_object_select_in_pathfinding_linksets() +{ + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); +} + bool enable_object_select_in_pathfinding_characters() { return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); @@ -8990,6 +8995,7 @@ void initialize_menus() enable.add("VisibleBuild", boost::bind(&enable_object_build)); commit.add("Pathfinding.Linksets.Select", boost::bind(&LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects)); enable.add("EnableSelectInPathfindingLinksets", boost::bind(&enable_object_select_in_pathfinding_linksets)); + enable.add("VisibleSelectInPathfindingLinksets", boost::bind(&visible_object_select_in_pathfinding_linksets)); commit.add("Pathfinding.Characters.Select", boost::bind(&LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects)); enable.add("EnableSelectInPathfindingCharacters", boost::bind(&enable_object_select_in_pathfinding_characters)); diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 5c98a98d3d..dc9622a27d 100755 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -78,7 +78,7 @@ <menu_item_call.on_enable function="EnableSelectInPathfindingLinksets"/> <menu_item_call.on_visible - function="EnableSelectInPathfindingLinksets"/> + function="VisibleSelectInPathfindingLinksets"/> </menu_item_call> <menu_item_call label="Show in characters" -- cgit v1.2.3 From 57363fdfd6921394be42000869e2d711e7212ea4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 5 Jan 2015 14:13:19 -0500 Subject: SL-92 WIP - More consistent enforcement of min/max hover values. Setting is stored as a per-account F32 value. --- indra/newview/app_settings/settings_per_account.xml | 6 +----- indra/newview/llfloaterhoverheight.cpp | 15 ++++++++------- indra/newview/llvoavatar.cpp | 3 +++ indra/newview/llvoavatar.h | 3 +++ indra/newview/llvoavatarself.cpp | 3 ++- .../skins/default/xui/en/floater_edit_hover_height.xml | 2 -- 6 files changed, 17 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 7975fe9e3a..97d81153a7 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -7,13 +7,9 @@ <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>Vector3</string> + <string>F32</string> <key>Value</key> - <array> <real>0.0</real> - <real>0.0</real> - <real>0.0</real> - </array> </map> <key>DoNotDisturbResponseChanged</key> <map> diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 9efb168b55..dc8a3d6fb8 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -42,12 +42,14 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) { - LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); - F32 value = offset[2]; + F32 value = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data); LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setValue(value,FALSE); + + //value = sldrCtrl->getValueF32(); + //gAgentAvatarp->mHoverOffset = LLVector3(0.0, 0.0, value); if (isAgentAvatarValid()) { gAgentAvatarp->sendHoverHeight(); @@ -57,6 +59,8 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) BOOL LLFloaterHoverHeight::postBuild() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); + sldrCtrl->setMinValue(MIN_HOVER_Z); + sldrCtrl->setMaxValue(MAX_HOVER_Z); sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this)); childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL); @@ -81,8 +85,7 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); F32 value = sldrCtrl->getValueF32(); - LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); - offset[2] = value; + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); gAgentAvatarp->mHoverOffset = offset; } @@ -92,9 +95,7 @@ void LLFloaterHoverHeight::onFinalCommit() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); - LLVector3 offset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); - offset[2] = value; - gSavedPerAccountSettings.setVector3("AvatarPosFinalOffset",offset); + gSavedPerAccountSettings.setF32("AvatarPosFinalOffset",value); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a6d006f13b..fd741e7e5f 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -111,6 +111,9 @@ extern F32 ANIM_SPEED_MAX; extern F32 ANIM_SPEED_MIN; extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG; +const F32 MAX_HOVER_Z = 2.0; +const F32 MIN_HOVER_Z = -2.0; + // #define OUTPUT_BREAST_DATA using namespace LLAvatarAppearanceDefines; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index a3f599e2d7..a12e688087 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1021,6 +1021,9 @@ protected: // Shared with LLVOAvatarSelf extern const F32 SELF_ADDITIONAL_PRI; extern const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL; +extern const F32 MAX_HOVER_Z; +extern const F32 MIN_HOVER_Z; + std::string get_sequential_numbered_file_name(const std::string& prefix, const std::string& suffix); void dump_sequential_xml(const std::string outprefix, const LLSD& content); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6e0c9cb68c..1b5901e581 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -239,7 +239,8 @@ void LLVOAvatarSelf::initInstance() return; } - mHoverOffset = gSavedPerAccountSettings.getVector3("AvatarPosFinalOffset"); + F32 hover_z = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); + mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; //doPeriodically(output_self_av_texture_diagnostics, 30.0); diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml index 29d06b9b4e..8fc20d28fb 100755 --- a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml @@ -23,8 +23,6 @@ follows="top|left" height="15" increment="0.001" - max_val="2" - min_val="-2" initial_value="0.0" label="Height" label_width="60" -- cgit v1.2.3 From 62ab044b1ac9f757be40f951436ff11419feffb4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 5 Jan 2015 15:34:40 -0500 Subject: SL-92 WIP - changed setting name to AvatarHoverOffsetZ --- indra/newview/app_settings/settings_per_account.xml | 4 ++-- indra/newview/llfloaterhoverheight.cpp | 14 +++++++------- indra/newview/llvoavatar.cpp | 4 ++-- indra/newview/llvoavatarself.cpp | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 97d81153a7..d119504017 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -1,9 +1,9 @@ <llsd> <map> - <key>AvatarPosFinalOffset</key> + <key>AvatarHoverOffsetZ</key> <map> <key>Comment</key> - <string>After-everything-else fixup for avatar position.</string> + <string>After-everything-else fixup for avatar Z position.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index dc8a3d6fb8..2ac61efc0c 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -42,16 +42,16 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key) void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) { - F32 value = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); + F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); LLFloaterHoverHeight *self = static_cast<LLFloaterHoverHeight*>(user_data); LLSliderCtrl* sldrCtrl = self->getChild<LLSliderCtrl>("HoverHeightSlider"); sldrCtrl->setValue(value,FALSE); - //value = sldrCtrl->getValueF32(); - //gAgentAvatarp->mHoverOffset = LLVector3(0.0, 0.0, value); if (isAgentAvatarValid()) { + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + gAgentAvatarp->mHoverOffset = offset; gAgentAvatarp->sendHoverHeight(); } } @@ -68,13 +68,13 @@ BOOL LLFloaterHoverHeight::postBuild() // Initialize slider from pref setting. syncFromPreferenceSetting(this); // Update slider on future pref changes. - if (gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")) + if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")) { - gSavedPerAccountSettings.getControl("AvatarPosFinalOffset")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); + gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this)); } else { - LL_WARNS() << "Control not found for AvatarPosFinalOffset" << LL_ENDL; + LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL; } return TRUE; @@ -95,7 +95,7 @@ void LLFloaterHoverHeight::onFinalCommit() { LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); - gSavedPerAccountSettings.setF32("AvatarPosFinalOffset",value); + gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index fd741e7e5f..6669a797ce 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7470,12 +7470,12 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) mHoverOffset = contents.mHoverOffset; } - if (!contents.mHoverOffsetWasSet) + if (!contents.mHoverOffsetWasSet && !isSelf()) { // If we don't get a value at all, we are presumably in a // region that does not support hover height. - LL_WARNS() << "zeroing hover because not defined in appearance message" << LL_ENDL; + LL_WARNS() << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL; mHoverOffset = LLVector3(0.0, 0.0, 0.0); } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 1b5901e581..ed560b1c30 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -239,7 +239,7 @@ void LLVOAvatarSelf::initInstance() return; } - F32 hover_z = gSavedPerAccountSettings.getF32("AvatarPosFinalOffset"); + F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; -- cgit v1.2.3 From 07812106ed54d834a2cf0be28f312bbf0ad34a1d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Mon, 5 Jan 2015 18:13:33 -0500 Subject: Moved mHoverOffset to LLCharacter so it's accessible inside animations. Apply offset when constrained to ground. --- indra/newview/llvoavatar.cpp | 6 +++--- indra/newview/llvoavatar.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6669a797ce..cbfda020b4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -721,11 +721,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), - mLastUpdateReceivedCOFVersion(-1), - mHoverOffset(0.0, 0.0, 0.0) + mLastUpdateReceivedCOFVersion(-1) + //mHoverOffset(0.0, 0.0, 0.0) { //VTResume(); // VTune - + mHoverOffset = LLVector3(0.0, 0.0, 0.0); // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index a12e688087..0daf679e8e 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -213,8 +213,6 @@ public: /*virtual*/ LLVector3 getPosAgentFromGlobal(const LLVector3d &position); virtual void updateVisualParams(); - LLVector3 mHoverOffset; - /** Inherited ** ** *******************************************************************************/ -- cgit v1.2.3 From a555f635da29262a543ec2828a311e3f98a8ebdb Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 6 Jan 2015 18:20:42 +0200 Subject: MAINT-729 FIXED Hide popup menu (which belongs to old chiclet) when new chiclet arrives. --- indra/newview/llchiclet.cpp | 8 ++++++++ indra/newview/llchiclet.h | 2 ++ indra/newview/llscriptfloater.cpp | 1 + 3 files changed, 11 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c0823182c0..46b7679915 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -376,6 +376,14 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) return TRUE; } +void LLIMChiclet::hidePopupMenu() +{ + if (mPopupMenu) + { + mPopupMenu->setVisible(FALSE); + } +} + bool LLIMChiclet::canCreateMenu() { if(mPopupMenu) diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index d5e3a55fdf..9201c6bc00 100755 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -305,6 +305,8 @@ public: */ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + void hidePopupMenu(); + protected: LLIMChiclet(const LLIMChiclet::Params& p); diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 590a1c2647..1d021ec28f 100755 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -378,6 +378,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) { // Pass the new_message icon state further. set_new_message = chicletp->getShowNewMessagesIcon(); + chicletp->hidePopupMenu(); } } -- cgit v1.2.3 From 21c61014453042247d83b22024ed6d4b7e22635c Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 8 Jan 2015 11:05:25 +0200 Subject: MAINT-3240 Don't show avatar if it's in mute list --- indra/newview/llvoavatar.cpp | 29 +++++++++++++++++++++++------ indra/newview/llvoavatar.h | 4 ++++ 2 files changed, 27 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 444a26779a..3686ccb48f 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3121,10 +3121,9 @@ bool LLVOAvatar::isVisuallyMuted() U32 max_cost = (U32) (max_render_cost*(LLVOAvatar::sLODFactor+0.5)); - muted = LLMuteList::getInstance()->isMuted(getID()) || - (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) || - (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) || - (mVisualComplexity > max_cost && max_render_cost > 0); + muted = (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) || + (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) || + (mVisualComplexity > max_cost && max_render_cost > 0); // Could be part of the grand || collection above, but yanked out to make the logic visible if (!muted) @@ -3156,7 +3155,7 @@ bool LLVOAvatar::isVisuallyMuted() } } - return muted; + return muted || isInMuteList(); } void LLVOAvatar::forceUpdateVisualMuteSettings() @@ -3165,6 +3164,24 @@ void LLVOAvatar::forceUpdateVisualMuteSettings() mCachedVisualMuteUpdateTime = LLFrameTimer::getTotalSeconds() - 1.0; } +bool LLVOAvatar::isInMuteList() +{ + bool muted = false; + F64 now = LLFrameTimer::getTotalSeconds(); + if (now < mCachedMuteListUpdateTime) + { + muted = mCachedInMuteList; + } + else + { + muted = LLMuteList::getInstance()->isMuted(getID()); + + const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1; + mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES; + mCachedInMuteList = muted; + } + return muted; +} //------------------------------------------------------------------------ // updateCharacter() @@ -8049,7 +8066,7 @@ void LLVOAvatar::updateImpostors() BOOL LLVOAvatar::isImpostor() { - return sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD)) ? TRUE : FALSE; + return (sUseImpostors && (isVisuallyMuted() || (mUpdatePeriod >= IMPOSTOR_PERIOD))) || isInMuteList() ? TRUE : FALSE; } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 2223acc893..7034f8349f 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -383,6 +383,7 @@ public: public: U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0); bool isVisuallyMuted(); + bool isInMuteList(); void setCachedVisualMute(bool muted) { mCachedVisualMute = muted; }; void forceUpdateVisualMuteSettings(); @@ -422,6 +423,9 @@ private: bool mCachedVisualMute; // cached return value for isVisuallyMuted() F64 mCachedVisualMuteUpdateTime; // Time to update mCachedVisualMute + bool mCachedInMuteList; + F64 mCachedMuteListUpdateTime; + VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV //-------------------------------------------------------------------- -- cgit v1.2.3 From bf5145422384386cdb31429ad01d79f7719161a5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 9 Jan 2015 12:10:32 +0200 Subject: MAINT-4169 FIXED grey out all but domain name in SL-links, same as it's done for non-Linden URLs --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c3aacd1c4f..269b357b80 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15607,7 +15607,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>HTTPNoProtocolShowGreyQuery</key> + <key>ShowGreyQueryInUrls</key> <map> <key>Comment</key> <string>Enable(disable) appearance of port, query and fragment parts of url for HTTP and HTTPNoProtocol entries in grey.</string> -- cgit v1.2.3 From 8f04b738d28d54430b4e22e06930b056bdbdf195 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 12 Jan 2015 11:54:24 +0200 Subject: MAINT-2742 FIXED Duplicate Display Names appear once in share picker --- indra/newview/llcallingcard.cpp | 8 ++++---- indra/newview/llcallingcard.h | 6 +++--- indra/newview/llfloateravatarpicker.cpp | 4 ++-- indra/newview/llfloaterworldmap.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index afbb73ee08..b6c5496c17 100755 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -860,7 +860,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship { LLAvatarName av_name; LLAvatarNameCache::get( buddy_id, &av_name); - buddy_map_t::value_type value(av_name.getDisplayName(), buddy_id); + buddy_map_t::value_type value(buddy_id, av_name.getDisplayName()); if(buddy->isOnline() && buddy->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) { mMappable.insert(value); @@ -871,7 +871,7 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy) { gCacheName->getFullName(buddy_id, mFullName); - buddy_map_t::value_type value(mFullName, buddy_id); + buddy_map_t::value_type value(buddy_id, mFullName); if(buddy->isOnline()) { mOnline.insert(value); @@ -883,8 +883,8 @@ bool LLCollectAllBuddies::operator()(const LLUUID& buddy_id, LLRelationship* bud { LLAvatarName av_name; LLAvatarNameCache::get(buddy_id, &av_name); - mFullName = av_name.getDisplayName(); - buddy_map_t::value_type value(mFullName, buddy_id); + mFullName = av_name.getCompleteName(); + buddy_map_t::value_type value(buddy_id, mFullName); if(buddy->isOnline()) { mOnline.insert(value); diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 8803cce59d..6e5fc01cd8 100755 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -233,7 +233,7 @@ public: LLCollectMappableBuddies() {} virtual ~LLCollectMappableBuddies() {} virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy); - typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t; + typedef std::map<LLUUID, std::string> buddy_map_t; buddy_map_t mMappable; std::string mFullName; }; @@ -245,7 +245,7 @@ public: LLCollectOnlineBuddies() {} virtual ~LLCollectOnlineBuddies() {} virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy); - typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t; + typedef std::map<LLUUID, std::string> buddy_map_t; buddy_map_t mOnline; std::string mFullName; }; @@ -258,7 +258,7 @@ public: LLCollectAllBuddies() {} virtual ~LLCollectAllBuddies() {} virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy); - typedef std::map<std::string, LLUUID, LLDictionaryLess> buddy_map_t; + typedef std::map<LLUUID, std::string> buddy_map_t; buddy_map_t mOnline; buddy_map_t mOffline; std::string mFullName; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 513c33e60d..566a3c9cd3 100755 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -348,11 +348,11 @@ void LLFloaterAvatarPicker::populateFriend() for(it = collector.mOnline.begin(); it!=collector.mOnline.end(); it++) { - friends_scroller->addStringUUIDItem(it->first, it->second); + friends_scroller->addStringUUIDItem(it->second, it->first); } for(it = collector.mOffline.begin(); it!=collector.mOffline.end(); it++) { - friends_scroller->addStringUUIDItem(it->first, it->second); + friends_scroller->addStringUUIDItem(it->second, it->first); } friends_scroller->sortByColumnIndex(0, TRUE); } diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 5093a40ce4..6837f6159f 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -891,7 +891,7 @@ void LLFloaterWorldMap::buildAvatarIDList() end = collector.mMappable.end(); for( ; it != end; ++it) { - list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second); + list->addSimpleElement((*it).second, ADD_BOTTOM, (*it).first); } list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() ); -- cgit v1.2.3 From fd83804a1ca95d7bbe10fb3a7586b12d3cbd6085 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 16 Jan 2015 11:55:36 +0200 Subject: MAINT-4799 FIXED Show complete avatar names in confirmation dialog. --- indra/newview/llavataractions.cpp | 2 +- indra/newview/lltooldraganddrop.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 8235b13118..0e30c079ff 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -785,7 +785,7 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name const std::string& separator = LLTrans::getString("words_separator"); for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; ) { - residents_string.append((*it).getDisplayName()); + residents_string.append((*it).getCompleteName()); if (++it == avatar_names.end()) { break; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 8561d265de..b077cad9f8 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -34,6 +34,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llavatarnamecache.h" #include "lldictionary.h" #include "llfloaterreg.h" #include "llfloatertools.h" @@ -1705,9 +1706,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ return true; } - + std::string dest_name = session->mName; + LLAvatarName av_name; + if(LLAvatarNameCache::get(dest_agent, &av_name)) + { + dest_name = av_name.getCompleteName(); + } // If an IM session with destination agent is found item offer will be logged in this session. - show_object_sharing_confirmation(session->mName, inv_obj, dest, dest_agent, session_id); + show_object_sharing_confirmation(dest_name, inv_obj, dest, dest_agent, session_id); } } else -- cgit v1.2.3 From d5fe509c154913d76673d60ab153297a357466bb Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Thu, 15 Jan 2015 17:50:40 +0200 Subject: MAINT-4777 FIXED Confusing 'Save changes?' dialog when hitting the Delete button in notecard edit floater --- indra/newview/llpreviewnotecard.cpp | 62 ++++++++++++++-------- indra/newview/llpreviewnotecard.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 12 +++++ 3 files changed, 53 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 307fd55875..1308d1e9a7 100755 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -500,28 +500,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) void LLPreviewNotecard::deleteNotecard() { - if (mObjectUUID.isNull()) - { - LLViewerInventoryItem* item = gInventory.getItem(mItemUUID); - if (item != NULL) - { - const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - gInventory.changeItemParent(item, trash_id, FALSE); - } - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectUUID); - if(object) - { - LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID)); - if (item != NULL) - { - object->removeInventory(mItemUUID); - } - } - } - closeFloater(); + LLNotificationsUtil::add("DeleteNotecard", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleConfirmDeleteDialog,this, _1, _2)); } // static @@ -627,4 +606,43 @@ bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const return false; } +bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option != 0) + { + // canceled + return false; + } + + if (mObjectUUID.isNull()) + { + // move item from agent's inventory into trash + LLViewerInventoryItem* item = gInventory.getItem(mItemUUID); + if (item != NULL) + { + const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + gInventory.changeItemParent(item, trash_id, FALSE); + } + } + else + { + // delete item from inventory of in-world object + LLViewerObject* object = gObjectList.findObject(mObjectUUID); + if(object) + { + LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(object->getInventoryObject(mItemUUID)); + if (item != NULL) + { + object->removeInventory(mItemUUID); + } + } + } + + // close floater, ignore unsaved changes + mForceClose = TRUE; + closeFloater(); + return false; +} + // EOF diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index b53c0da6be..1cf08dedd6 100755 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -93,6 +93,7 @@ protected: S32 status, LLExtStat ext_status); bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response); + bool handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response); protected: LLViewerTextEditor* mEditor; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b4d8046d18..1f816dc806 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1195,6 +1195,18 @@ Save Changes? yestext="Save"/> </notification> + <notification + icon="alertmodal.tga" + name="DeleteNotecard" + type="alertmodal"> +Delete Notecard? + <tag>confirm</tag> + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + <notification icon="alertmodal.tga" name="GestureSaveFailedTooManySteps" -- cgit v1.2.3 From f743470f5f3534d0e3b688abc0874d428813be73 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Fri, 16 Jan 2015 18:11:10 +0200 Subject: MAINT-4804 FIXED Viewer gets stuck in mode sending email with snapshot if that fails --- indra/newview/llpostcard.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp index 649bb2fb2c..5987044bff 100755 --- a/indra/newview/llpostcard.cpp +++ b/indra/newview/llpostcard.cpp @@ -95,6 +95,12 @@ public: { } + /*virtual*/ void httpFailure() + { + LL_WARNS() << "Sending postcard failed, status: " << getStatus() << LL_ENDL; + LLPostCard::reportPostResult(false); + } + /*virtual*/ void uploadComplete(const LLSD& content) { LL_INFOS() << "Postcard sent" << LL_ENDL; -- cgit v1.2.3 From f097c731d654b2fbcb73ee0bbf5b7263be109e23 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Wed, 4 Mar 2015 13:10:58 +0200 Subject: MAINT-4169 ShowGreyQueryInUrls debug setting was removed and the grey part of the link always appears. --- indra/newview/app_settings/settings.xml | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 269b357b80..9f3fc26c90 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15607,17 +15607,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowGreyQueryInUrls</key> - <map> - <key>Comment</key> - <string>Enable(disable) appearance of port, query and fragment parts of url for HTTP and HTTPNoProtocol entries in grey.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> </map> </llsd> -- cgit v1.2.3 From bb3517c24e77e7fdea915a8a57326e10e8261d7c Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Wed, 7 Jan 2015 02:04:03 +0200 Subject: MAINT-4773 FIXED Some transparent textures are rendered as white. This bug fix related also to MAINT-4092. In 4092 sometimes when we don't have information about the texture during the setup the materail (LLVOVolume::setTEMaterialParams()), we should substitute the material with disabled "diffuse alpha mode" (for detail in cases see MAINT-4092 JIRA ticket comment). This bug fix cover the case when after the loading texture we have all information about alpha mode, and in this case we should restore diffuse alpha mode if need. In short: now we always believe that information about the material is valid (LLVOVolume::setTEMaterialParams()). Of course before setup it we check information about texture (if it possible) , if texture is not exist in database or not 32 bit depth (for diffuse) we made changes. But in all other cases (if we can't receive information about texture) we remeber this case in mWaitingTextureInfo multimap. When information about texture will be available we get it in: LLVOVolume::notify AboutCreatingTexture() or Volume::notifyAboutMissingAsset() and again, we recheck it and if need change (substitute) the material parameters. I suppose that this solution is better than was before. If this patch will be accepted , I think that MAINT-4092 should be rechecked again. --- indra/newview/llface.cpp | 42 ++++++-- indra/newview/llface.h | 7 +- indra/newview/llviewertexture.cpp | 37 ++++++- indra/newview/llviewertexture.h | 11 +- indra/newview/llvovolume.cpp | 220 ++++++++++++++++++++++++++++++++++++-- indra/newview/llvovolume.h | 26 ++++- 6 files changed, 313 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index dc74f4a6ef..de349a03d4 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -330,24 +330,52 @@ void LLFace::dirtyTexture() { vobj->mLODChanged = TRUE; - LLVOAvatar* avatar = vobj->getAvatar(); - if (avatar) - { //avatar render cost may have changed - avatar->updateVisualComplexity(); - } + LLVOAvatar* avatar = vobj->getAvatar(); + if (avatar) + { //avatar render cost may have changed + avatar->updateVisualComplexity(); + } } gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); } } } - + gPipeline.markTextured(drawablep); } +void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutCreatingTexture(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + +void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutMissingAsset(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); - + if(mTexture[ch] == new_texture) { return ; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index d3a561facc..ee545acb94 100755 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -218,7 +218,7 @@ public: void setHasMedia(bool has_media) { mHasMedia = has_media ;} BOOL hasMedia() const ; - BOOL switchTexture() ; + BOOL switchTexture() ; //vertex buffer tracking void setVertexBuffer(LLVertexBuffer* buffer); @@ -230,10 +230,13 @@ public: static U32 getRiggedDataMask(U32 type); + void notifyAboutCreatingTexture(LLViewerTexture *texture); + void notifyAboutMissingAsset(LLViewerTexture *texture); + public: //aligned members LLVector4a mExtents[2]; -private: +private: F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; public: diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 4e2eef39d6..e684be4361 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -655,12 +655,36 @@ S8 LLViewerTexture::getType() const void LLViewerTexture::cleanup() { + notifyAboutMissingAsset(); + mFaceList[LLRender::DIFFUSE_MAP].clear(); mFaceList[LLRender::NORMAL_MAP].clear(); mFaceList[LLRender::SPECULAR_MAP].clear(); mVolumeList.clear(); } +void LLViewerTexture::notifyAboutCreatingTexture() +{ + for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) + { + for(U32 f = 0; f < mNumFaces[ch]; f++) + { + mFaceList[ch][f]->notifyAboutCreatingTexture(this); + } + } +} + +void LLViewerTexture::notifyAboutMissingAsset() +{ + for(U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) + { + for(U32 f = 0; f < mNumFaces[ch]; f++) + { + mFaceList[ch][f]->notifyAboutMissingAsset(this); + } + } +} + // virtual void LLViewerTexture::dump() { @@ -1281,7 +1305,7 @@ void LLViewerFetchedTexture::addToCreateTexture() llassert(mNumFaces[j] <= mFaceList[j].size()); for(U32 i = 0; i < mNumFaces[j]; i++) - { + { mFaceList[j][i]->dirtyTexture(); } } @@ -1431,9 +1455,11 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - - res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); - + + res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, TRUE, mBoostLevel); + + notifyAboutCreatingTexture(); + setActive(); if (!needsToSaveRawImage()) @@ -1441,6 +1467,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mNeedsAux = FALSE; destroyRawImage(); } + return res; } @@ -2132,6 +2159,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) } if (is_missing) { + notifyAboutMissingAsset(); + if (mUrl.empty()) { LL_WARNS() << mID << ": Marking image as missing" << LL_ENDL; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 05912404e4..aed7e94945 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -169,9 +169,13 @@ public: /*virtual*/ void updateBindStatsForTester() ; protected: void cleanup() ; - void init(bool firstinit) ; + void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; + + void notifyAboutMissingAsset(); + void notifyAboutCreatingTexture(); + private: friend class LLBumpImageList; friend class LLUIImageList; @@ -307,10 +311,11 @@ public: void addToCreateTexture(); + // ONLY call from LLViewerTextureList BOOL createTexture(S32 usename = 0); - void destroyTexture() ; - + void destroyTexture() ; + virtual void processTextureStats() ; F32 calcDecodePriority() ; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b49543c158..b483ec283c 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2040,27 +2040,225 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) return res; } +bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) +{ //Ok, here we have confirmation about texture creation, check our wait-list + //and make changes, or return false + + std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID()); + + typedef std::map<U8, LLMaterialPtr> map_te_material; + map_te_material new_material; + + for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it) + { + LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); + + //here we just interesting in DIFFUSE_MAP only! + if(LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) + { //ok let's check the diffuse mode + switch(cur_material->getDiffuseAlphaMode()) + { + case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND: + case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE: + case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: + { //uups... we have non 32 bit texture with LLMaterial::DIFFUSE_ALPHA_MODE_* => LLMaterial::DIFFUSE_ALPHA_MODE_NONE + + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + + } break; + } //switch + } //if + } //for + + //setup new materials + for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) + { + LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second); + } + + //clear wait-list + mWaitingTextureInfo.erase(range.first, range.second); + + return 0 != new_material.size(); +} + +bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) +{ //Ok, here if we wait information about texture and it's missing + //then depending from the texture map (diffuse, normal, or specular) + //make changes in material and confirm it. If not return false. + std::pair<mmap_UUID_MAP_t::iterator, mmap_UUID_MAP_t::iterator> range = mWaitingTextureInfo.equal_range(texture->getID()); + if(range.first == range.second) return false; + + typedef std::map<U8, LLMaterialPtr> map_te_material; + map_te_material new_material; + + for(mmap_UUID_MAP_t::iterator range_it = range.first; range_it != range.second; ++range_it) + { + LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); + + switch(range_it->second.map) + { + case LLRender::DIFFUSE_MAP: + { + if(LLMaterial::DIFFUSE_ALPHA_MODE_NONE != cur_material->getDiffuseAlphaMode()) + { //missing texture + !LLMaterial::DIFFUSE_ALPHA_MODE_NONE => LLMaterial::DIFFUSE_ALPHA_MODE_NONE + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + } + } break; + case LLRender::NORMAL_MAP: + { //missing texture => reset material texture id + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setNormalID(LLUUID::null); + } break; + case LLRender::SPECULAR_MAP: + { //missing texture => reset material texture id + LLMaterialPtr mat = NULL; + map_te_material::iterator it = new_material.find(range_it->second.te); + if(new_material.end() == it) { + mat = new LLMaterial(cur_material->asLLSD()); + new_material.insert(map_te_material::value_type(range_it->second.te, mat)); + } else { + mat = it->second; + } + + mat->setSpecularID(LLUUID::null); + } break; + } //switch + } //for + + //setup new materials + for(map_te_material::const_iterator it = new_material.begin(), end = new_material.end(); it != end; ++it) + { + LLMaterialMgr::getInstance()->put(getID(), it->first, *it->second); + LLViewerObject::setTEMaterialParams(it->first, it->second); + } + + //clear wait-list + mWaitingTextureInfo.erase(range.first, range.second); + + return 0 != new_material.size(); +} + S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams) { LLMaterialPtr pMaterial = const_cast<LLMaterialPtr&>(pMaterialParams); if(pMaterialParams) - { - LLViewerTexture* image = getTEImage(te); - LLGLenum image_format = image ? image->getPrimaryFormat() : GL_RGB; - LLMaterialPtr current_material = getTEMaterialParams(te); + { //check all of them according to material settings + + LLViewerTexture *img_diffuse = getTEImage(te); + LLViewerTexture *img_normal = getTENormalMap(te); + LLViewerTexture *img_specular = getTESpecularMap(te); + + llassert(NULL != img_diffuse); + + LLMaterialPtr new_material = NULL; + + //diffuse + if(NULL != img_diffuse) + { //guard + if(0 == img_diffuse->getPrimaryFormat() && !img_diffuse->isMissingAsset()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(img_diffuse->getID(), material_info(LLRender::DIFFUSE_MAP, te))); + } + else + { + bool bSetDiffuseNone = false; + if(img_diffuse->isMissingAsset()) + { + bSetDiffuseNone = true; + } + else + { + switch(pMaterialParams->getDiffuseAlphaMode()) + { + case LLMaterial::DIFFUSE_ALPHA_MODE_BLEND: + case LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE: + case LLMaterial::DIFFUSE_ALPHA_MODE_MASK: + { //all of them modes available only for 32 bit textures + if(GL_RGBA != img_diffuse->getPrimaryFormat()) + { + bSetDiffuseNone = true; + } + } break; + } + } //else - U8 new_diffuse_alpha_mode = pMaterialParams->getDiffuseAlphaMode(); - if(new_diffuse_alpha_mode == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + if(bSetDiffuseNone) + { //upps... we should substitute this material with LLMaterial::DIFFUSE_ALPHA_MODE_NONE + new_material = new LLMaterial(pMaterialParams->asLLSD()); + new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + } + } + } + + //normal + if(LLUUID::null != pMaterialParams->getNormalID()) { - new_diffuse_alpha_mode = (GL_RGB == image_format || 0 == image_format ? LLMaterial::DIFFUSE_ALPHA_MODE_NONE : new_diffuse_alpha_mode); + if(img_normal && img_normal->isMissingAsset() && img_normal->getID() == pMaterialParams->getNormalID()) + { + if(!new_material) { + new_material = new LLMaterial(pMaterialParams->asLLSD()); + } + new_material->setNormalID(LLUUID::null); + } + else if(NULL == img_normal || 0 == img_normal->getPrimaryFormat()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getNormalID(), material_info(LLRender::NORMAL_MAP,te))); + } + + } + + + //specular + if(LLUUID::null != pMaterialParams->getSpecularID()) + { + if(img_specular && img_specular->isMissingAsset() && img_specular->getID() == pMaterialParams->getSpecularID()) + { + if(!new_material) { + new_material = new LLMaterial(pMaterialParams->asLLSD()); + } + new_material->setSpecularID(LLUUID::null); + } + else if(NULL == img_specular || 0 == img_specular->getPrimaryFormat()) + { //ok here we don't have information about texture, let's belief and leave material settings + //but we remember this case + mWaitingTextureInfo.insert(mmap_UUID_MAP_t::value_type(pMaterialParams->getSpecularID(), material_info(LLRender::SPECULAR_MAP, te))); + } } - if(pMaterialParams->getDiffuseAlphaMode() != new_diffuse_alpha_mode) { - //create new material - pMaterial = new LLMaterial(pMaterialParams->asLLSD()); - pMaterial->setDiffuseAlphaMode(new_diffuse_alpha_mode); + if(new_material) { + pMaterial = new_material; LLMaterialMgr::getInstance()->put(getID(),te,*pMaterial); } } diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 7503f8c5aa..bbaca316b0 100755 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -372,17 +372,37 @@ private: // statics public: - static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop + static F32 sLODSlopDistanceFactor;// Changing this to zero, effectively disables the LOD transition slop static F32 sLODFactor; // LOD scale factor static F32 sDistanceFactor; // LOD distance factor - + static LLPointer<LLObjectMediaDataClient> sObjectMediaClient; static LLPointer<LLObjectMediaNavigateClient> sObjectMediaNavigateClient; protected: static S32 sNumLODChanges; - + friend class LLVolumeImplFlexible; + +public: + bool notifyAboutCreatingTexture(LLViewerTexture *texture); + bool notifyAboutMissingAsset(LLViewerTexture *texture); + +private: + struct material_info + { + LLRender::eTexIndex map; + U8 te; + + material_info(LLRender::eTexIndex map_, U8 te_) + : map(map_) + , te(te_) + {} + }; + + typedef std::multimap<LLUUID, material_info> mmap_UUID_MAP_t; + mmap_UUID_MAP_t mWaitingTextureInfo; + }; #endif // LL_LLVOVOLUME_H -- cgit v1.2.3 From ee63c30ea748857f68ac352a9751816644322ec3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 8 Jan 2015 10:35:36 -0500 Subject: SL-92 WIP - remove hover for self if we receive an appearance with no hover specified --- indra/newview/llvoavatar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index aa7b848d0e..059a03a072 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -7470,7 +7470,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) mHoverOffset = contents.mHoverOffset; } - if (!contents.mHoverOffsetWasSet && !isSelf()) + if (!contents.mHoverOffsetWasSet) { // If we don't get a value at all, we are presumably in a // region that does not support hover height. -- cgit v1.2.3 From d5ab47b1bc9eac98c1f443fa965a91a8f2cf0af7 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Tue, 13 Jan 2015 17:18:15 -0500 Subject: SL-92 WIP - added signal for simulator features received. Use to keep hover floater UI synced with region support for hover. --- indra/newview/llfloaterhoverheight.cpp | 40 ++++++++++++++++++++++ indra/newview/llfloaterhoverheight.h | 7 ++++ indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewerregion.cpp | 30 ++++++++++++++++ indra/newview/llviewerregion.h | 12 ++++++- indra/newview/llvoavatar.cpp | 2 ++ .../default/xui/en/floater_edit_hover_height.xml | 1 + 7 files changed, 92 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 2ac61efc0c..69b58b3af5 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -77,6 +77,13 @@ BOOL LLFloaterHoverHeight::postBuild() LL_WARNS() << "Control not found for AvatarHoverOffsetZ" << LL_ENDL; } + updateEditEnabled(); + + if (!mRegionBoundarySlot.connected()) + { + mRegionBoundarySlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this)); + } + return TRUE; } @@ -98,4 +105,37 @@ void LLFloaterHoverHeight::onFinalCommit() gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value); } +void LLFloaterHoverHeight::onRegionChanged() +{ + LLViewerRegion *region = gAgent.getRegion(); + if (region && region->simulatorFeaturesReceived()) + { + updateEditEnabled(); + } + else if (region) + { + region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLFloaterHoverHeight::onSimulatorFeaturesReceived,this,_1)); + } +} + +void LLFloaterHoverHeight::onSimulatorFeaturesReceived(const LLUUID ®ion_id) +{ + LLViewerRegion *region = gAgent.getRegion(); + if (region && (region->getRegionID()==region_id)) + { + updateEditEnabled(); + } +} + +void LLFloaterHoverHeight::updateEditEnabled() +{ + bool enabled = gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled(); + LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); + sldrCtrl->setEnabled(enabled); + if (enabled) + { + syncFromPreferenceSetting(this); + } +} + diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index 586871374f..8fd24d8813 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -40,6 +40,13 @@ public: void onFinalCommit(); static void syncFromPreferenceSetting(void *user_data); + + void onRegionChanged(); + void onSimulatorFeaturesReceived(const LLUUID ®ion_id); + void updateEditEnabled(); + + + boost::signals2::connection mRegionBoundarySlot; }; #endif diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 302dd6f889..c7bf8a1c31 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3885,7 +3885,7 @@ class LLEnableHoverHeight : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return true; + return gAgent.getRegion() && gAgent.getRegion()->avatarHoverHeightEnabled(); } }; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 11cbf3fc24..b05e771f96 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -424,6 +424,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mCacheDirty(FALSE), mReleaseNotesRequested(FALSE), mCapabilitiesReceived(false), + mSimulatorFeaturesReceived(false), mBitsReceived(0.f), mPacketsReceived(0.f), mDead(FALSE), @@ -2027,6 +2028,26 @@ void LLViewerRegion::getInfo(LLSD& info) info["Region"]["Handle"]["y"] = (LLSD::Integer)y; } +boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb) +{ + return mSimulatorFeaturesReceivedSignal.connect(cb); +} + +void LLViewerRegion::setSimulatorFeaturesReceived(bool received) +{ + mSimulatorFeaturesReceived = received; + if (received) + { + mSimulatorFeaturesReceivedSignal(getRegionID()); + mSimulatorFeaturesReceivedSignal.disconnect_all_slots(); + } +} + +bool LLViewerRegion::simulatorFeaturesReceived() const +{ + return mSimulatorFeaturesReceived; +} + void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) const { sim_features = mSimulatorFeatures; @@ -2040,6 +2061,9 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) LLSDSerialize::toPrettyXML(sim_features, str); LL_INFOS() << str.str() << LL_ENDL; mSimulatorFeatures = sim_features; + + setSimulatorFeaturesReceived(true); + } //this is called when the parent is not cacheable. @@ -3088,6 +3112,12 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") && mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); } + +bool LLViewerRegion::avatarHoverHeightEnabled() const +{ + return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") && + mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean()); +} /* Static Functions */ void log_capabilities(const CapabilityMap &capmap) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 1e225553b8..aaa1466939 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -309,12 +309,19 @@ public: bool meshRezEnabled() const; bool meshUploadEnabled() const; + // has region received its simulator features list? Requires an additional query after caps received. + void setSimulatorFeaturesReceived(bool); + bool simulatorFeaturesReceived() const; + boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb); + void getSimulatorFeatures(LLSD& info) const; void setSimulatorFeatures(const LLSD& info); bool dynamicPathfindingEnabled() const; + bool avatarHoverHeightEnabled() const; + typedef enum { CACHE_MISS_TYPE_FULL = 0, @@ -512,6 +519,7 @@ private: BOOL mCacheDirty; BOOL mAlive; // can become false if circuit disconnects BOOL mCapabilitiesReceived; + BOOL mSimulatorFeaturesReceived; BOOL mReleaseNotesRequested; BOOL mDead; //if true, this region is in the process of deleting. BOOL mPaused; //pause processing the objects in the region @@ -532,11 +540,13 @@ private: CacheMissItem::cache_miss_list_t mCacheMissList; caps_received_signal_t mCapabilitiesReceivedSignal; + caps_received_signal_t mSimulatorFeaturesReceivedSignal; + LLSD mSimulatorFeatures; // the materials capability throttle LLFrameTimer mMaterialsCapThrottleTimer; -LLFrameTimer mRenderInfoRequestTimer; + LLFrameTimer mRenderInfoRequestTimer; }; inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 059a03a072..10bc6ad336 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3220,6 +3220,8 @@ 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]); + bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled(); + debug_line += hover_enabled ? " H" : " h"; if (mHoverOffset[2] != 0.0) { debug_line += llformat(" hov_z: %f", mHoverOffset[2]); diff --git a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml index 8fc20d28fb..8ec6735a01 100755 --- a/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_hover_height.xml @@ -18,6 +18,7 @@ title="SET HOVER HEIGHT" width="515"> <slider + enabled="false" control_name="HoverHeightSlider" decimal_digits="3" follows="top|left" -- cgit v1.2.3 From be83e48fc12fbaf225f9f3e6ad5042320595ce26 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Wed, 14 Jan 2015 17:40:44 -0500 Subject: SL-92 WIP - more on region notification and managing hover --- indra/newview/llfloaterhoverheight.cpp | 6 +++-- indra/newview/llfloaterhoverheight.h | 2 +- indra/newview/llvoavatar.cpp | 13 +++------ indra/newview/llvoavatarself.cpp | 48 +++++++++++++++++++++++++++++++--- indra/newview/llvoavatarself.h | 5 ++++ 5 files changed, 59 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 69b58b3af5..7d0c011b74 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -52,6 +52,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) { LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); gAgentAvatarp->mHoverOffset = offset; + LL_INFOS("Avatar") << "set hover from preference setting" << offset[2] << LL_ENDL; gAgentAvatarp->sendHoverHeight(); } } @@ -79,9 +80,9 @@ BOOL LLFloaterHoverHeight::postBuild() updateEditEnabled(); - if (!mRegionBoundarySlot.connected()) + if (!mRegionChangedSlot.connected()) { - mRegionBoundarySlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this)); + mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this)); } return TRUE; @@ -93,6 +94,7 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); F32 value = sldrCtrl->getValueF32(); LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << "set hover from slider moved" << offset[2] << LL_ENDL; gAgentAvatarp->mHoverOffset = offset; } diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index 8fd24d8813..8809fc1bf8 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -46,7 +46,7 @@ public: void updateEditEnabled(); - boost::signals2::connection mRegionBoundarySlot; + boost::signals2::connection mRegionChangedSlot; }; #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 10bc6ad336..b5bf174045 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -722,7 +722,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), mLastUpdateReceivedCOFVersion(-1) - //mHoverOffset(0.0, 0.0, 0.0) { //VTResume(); // VTune mHoverOffset = LLVector3(0.0, 0.0, 0.0); @@ -7460,19 +7459,15 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) } } - if (isSelf()) - { - LL_INFOS("Avatar") << avString() << "hover was set: " << contents.mHoverOffsetWasSet << " value_z " << contents.mHoverOffset[2] << LL_ENDL; - } - if (contents.mHoverOffsetWasSet && !isSelf()) { - // Got an update for some other avatar. - // (Ignore updates for self because they may be out of date.) + // Got an update for some other avatar + // Ignore updates for self, because we have a more authoritative value in the preferences. mHoverOffset = contents.mHoverOffset; + LL_INFOS("Avatar") << avString() << "setting hover from message" << mHoverOffset[2] << LL_ENDL; } - if (!contents.mHoverOffsetWasSet) + if (!contents.mHoverOffsetWasSet && !isSelf()) { // If we don't get a value at all, we are presumably in a // region that does not support hover height. diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ed560b1c30..5341c6f1c8 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -239,15 +239,40 @@ void LLVOAvatarSelf::initInstance() return; } - F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); - mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); - LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; + setHoverIfRegionEnabled(); //doPeriodically(output_self_av_texture_diagnostics, 30.0); doPeriodically(update_avatar_rez_metrics, 5.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); } +void LLVOAvatarSelf::setHoverIfRegionEnabled() +{ + if (getRegion() && getRegion()->simulatorFeaturesReceived()) + { + if (getRegion()->avatarHoverHeightEnabled()) + { + F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); + mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; + } + else + { + mHoverOffset = LLVector3(0.0, 0.0, 0.0); + LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL; + } + } + else + { + LL_INFOS("Avatar") << avString() << " region or simulator features not known, no change on hover" << LL_ENDL; + if (getRegion()) + { + getRegion()->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1)); + } + + } +} + bool LLVOAvatarSelf::checkStuckAppearance() { const F32 CONDITIONAL_UNSTICK_INTERVAL = 300.0; @@ -850,6 +875,12 @@ void LLVOAvatarSelf::removeMissingBakedTextures() } } +void LLVOAvatarSelf::onSimulatorFeaturesReceived(const LLUUID& region_id) +{ + LL_INFOS("Avatar") << "simulator features received, setting hover based on region props" << LL_ENDL; + setHoverIfRegionEnabled(); +} + //virtual void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { @@ -868,6 +899,17 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) //LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region // << " while pos_from_new_region is " << pos_from_new_region // << LL_ENDL; + + // Update hover height, or schedule callback, based on whether + // it's supported in this region. + if (regionp->simulatorFeaturesReceived()) + { + setHoverIfRegionEnabled(); + } + else + { + regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1)); + } } if (!regionp || (regionp->getHandle() != mLastRegionHandle)) diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index a47b6c3463..6e585520da 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -75,6 +75,9 @@ protected: // LLViewerObject interface and related //-------------------------------------------------------------------- public: + boost::signals2::connection mRegionChangedSlot; + + void onSimulatorFeaturesReceived(const LLUUID& region_id); /*virtual*/ void updateRegion(LLViewerRegion *regionp); /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); @@ -327,6 +330,8 @@ public: public: bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; + // -- care and feeding of hover height. + void setHoverIfRegionEnabled(); void sendHoverHeight() const; /** Appearance -- cgit v1.2.3 From d2de97ad8e84eedd42f4a0fe5b258617a96f154b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Thu, 15 Jan 2015 16:45:24 -0500 Subject: SL-92 WIP - more on hover management --- indra/newview/llfloaterhoverheight.cpp | 24 +++++++++++++++++++----- indra/newview/llfloaterhoverheight.h | 4 ++-- indra/newview/llvoavatar.cpp | 18 ++++++++++-------- indra/newview/llvoavatarself.cpp | 32 ++++++++++++++++++++++++++------ indra/newview/llvoavatarself.h | 4 ++++ 5 files changed, 61 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 7d0c011b74..8908626de6 100755 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -51,9 +51,9 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data) if (isAgentAvatarValid()) { LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); - gAgentAvatarp->mHoverOffset = offset; - LL_INFOS("Avatar") << "set hover from preference setting" << offset[2] << LL_ENDL; - gAgentAvatarp->sendHoverHeight(); + LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset); + //gAgentAvatarp->sendHoverHeight(); } } @@ -84,18 +84,28 @@ BOOL LLFloaterHoverHeight::postBuild() { mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterHoverHeight::onRegionChanged,this)); } + // Set up based on initial region. + onRegionChanged(); return TRUE; } +void LLFloaterHoverHeight::onClose(bool app_quitting) +{ + if (mRegionChangedSlot.connected()) + { + mRegionChangedSlot.disconnect(); + } +} + // static void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); F32 value = sldrCtrl->getValueF32(); LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); - LL_INFOS("Avatar") << "set hover from slider moved" << offset[2] << LL_ENDL; - gAgentAvatarp->mHoverOffset = offset; + LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset, false); } // Do send-to-the-server work when slider drag completes, or new @@ -105,6 +115,10 @@ void LLFloaterHoverHeight::onFinalCommit() LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider"); F32 value = sldrCtrl->getValueF32(); gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value); + + LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); + LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset, true); // will send update this time. } void LLFloaterHoverHeight::onRegionChanged() diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h index 8809fc1bf8..ee065bc184 100755 --- a/indra/newview/llfloaterhoverheight.h +++ b/indra/newview/llfloaterhoverheight.h @@ -45,8 +45,8 @@ public: void onSimulatorFeaturesReceived(const LLUUID ®ion_id); void updateEditEnabled(); - - boost::signals2::connection mRegionChangedSlot; + /*virtual*/ void onClose(bool app_quitting); + boost::signals2::connection mRegionChangedSlot; }; #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b5bf174045..38420a31bc 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -724,7 +724,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastUpdateReceivedCOFVersion(-1) { //VTResume(); // VTune - mHoverOffset = LLVector3(0.0, 0.0, 0.0); + setHoverOffset(LLVector3(0.0, 0.0, 0.0)); + // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); @@ -3221,9 +3222,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]); bool hover_enabled = getRegion() && getRegion()->avatarHoverHeightEnabled(); debug_line += hover_enabled ? " H" : " h"; - if (mHoverOffset[2] != 0.0) + const LLVector3& hover_offset = getHoverOffset(); + if (hover_offset[2] != 0.0) { - debug_line += llformat(" hov_z: %f", mHoverOffset[2]); + debug_line += llformat(" hov_z: %f", hover_offset[2]); } F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32(); static const char *elapsed_chars = "Xx*..."; @@ -3432,7 +3434,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; - root_pos += LLVector3d(mHoverOffset); + root_pos += LLVector3d(getHoverOffset()); LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); @@ -3602,7 +3604,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) else if (mDrawable.notNull()) { LLVector3 pos = mDrawable->getPosition(); - pos += mHoverOffset * mDrawable->getRotation(); + pos += getHoverOffset() * mDrawable->getRotation(); mRoot->setPosition(pos); mRoot->setRotation(mDrawable->getRotation()); } @@ -7463,8 +7465,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) { // Got an update for some other avatar // Ignore updates for self, because we have a more authoritative value in the preferences. - mHoverOffset = contents.mHoverOffset; - LL_INFOS("Avatar") << avString() << "setting hover from message" << mHoverOffset[2] << LL_ENDL; + setHoverOffset(contents.mHoverOffset); + LL_INFOS("Avatar") << avString() << "setting hover from message" << contents.mHoverOffset[2] << LL_ENDL; } if (!contents.mHoverOffsetWasSet && !isSelf()) @@ -7472,7 +7474,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) // If we don't get a value at all, we are presumably in a // region that does not support hover height. LL_WARNS() << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL; - mHoverOffset = LLVector3(0.0, 0.0, 0.0); + setHoverOffset(LLVector3(0.0, 0.0, 0.0)); } setCompositeUpdatesEnabled( TRUE ); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 5341c6f1c8..bd7ab41258 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -178,7 +178,10 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mScreenp(NULL), mLastRegionHandle(0), mRegionCrossingCount(0), - mInitialBakesLoaded(false) + mInitialBakesLoaded(false), + // Value outside legal range, so will always be a mismatch the + // first time through. + mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f)) { mMotionController.mIsSelf = TRUE; @@ -253,12 +256,12 @@ void LLVOAvatarSelf::setHoverIfRegionEnabled() if (getRegion()->avatarHoverHeightEnabled()) { F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); - mHoverOffset = LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)); - LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << mHoverOffset[2] << LL_ENDL; + setHoverOffset(LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z))); + LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << hover_z << LL_ENDL; } else { - mHoverOffset = LLVector3(0.0, 0.0, 0.0); + setHoverOffset(LLVector3(0.0, 0.0, 0.0)); LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL; } } @@ -2776,10 +2779,27 @@ void LLVOAvatarSelf::sendHoverHeight() const if (!url.empty()) { LLSD update = LLSD::emptyMap(); - update["hover_height"] = mHoverOffset[2]; + const LLVector3& hover_offset = getHoverOffset(); + update["hover_height"] = hover_offset[2]; - LL_DEBUGS("Avatar") << avString() << "sending hover height value " << mHoverOffset[2] << LL_ENDL; + LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL; LLHTTPClient::post(url, update, new LLHoverHeightResponder); + + mLastHoverOffsetSent = hover_offset; + } +} + +void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_update) +{ + if (getHoverOffset() != hover_offset) + { + LL_INFOS("Avatar") << avString() << " setting hover due to change " << hover_offset[2] << LL_ENDL; + LLVOAvatar::setHoverOffset(hover_offset, send_update); + } + if (send_update && (hover_offset != mLastHoverOffsetSent)) + { + LL_INFOS("Avatar") << avString() << " sending hover due to change " << hover_offset[2] << LL_ENDL; + sendHoverHeight(); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6e585520da..6d190b5cfe 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -333,6 +333,10 @@ public: // -- care and feeding of hover height. void setHoverIfRegionEnabled(); void sendHoverHeight() const; + /*virtual*/ void setHoverOffset(const LLVector3& hover_offset, bool send_update=true); + +private: + mutable LLVector3 mLastHoverOffsetSent; /** Appearance ** ** -- cgit v1.2.3 From 2eecf882b1cdc63615f3ecd01860d0d5bbdd60b0 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Fri, 23 Jan 2015 15:03:04 +0200 Subject: MAINT-4833 Fixed Warning treated as error --- indra/newview/llvovolume.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b483ec283c..fd2e96744a 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2150,6 +2150,9 @@ bool LLVOVolume::notifyAboutMissingAsset(LLViewerTexture *texture) mat->setSpecularID(LLUUID::null); } break; + case LLRender::NUM_TEXTURE_CHANNELS: + //nothing to do, make compiler happy + break; } //switch } //for -- cgit v1.2.3 From 52d257f23432462bb4396dd851a9e0e8403a9d65 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 17 Mar 2015 16:32:44 -0400 Subject: MAINT-4995: fix stored favorites for login bar (close input files before opening them for writing) --- indra/newview/llfavoritesbar.cpp | 115 ++++++++++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 6c5b5be720..190ec4abe3 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -480,7 +480,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (item->getParentUUID() == favorites_id) { - LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL; + LL_WARNS("FavoritesBar") << "Attemt to copy a favorite item into the same folder." << LL_ENDL; break; } @@ -632,7 +632,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con // landmarks to an empty favorites bar. updateButtons(); - LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL; + LL_INFOS("FavoritesBar") << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL; } //virtual @@ -871,7 +871,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params); if (NULL == fav_btn) { - LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL; + LL_WARNS("FavoritesBar") << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL; return NULL; } @@ -1160,7 +1160,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata) void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) { std::string action = userdata.asString(); - LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL; + LL_INFOS("FavoritesBar") << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL; LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID); if (!item) @@ -1444,6 +1444,7 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id) boost::bind(&LLFavoritesOrderStorage::onLandmarkLoaded, this, asset_id, _1)); if (lm) { + LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " already loaded" << LL_ENDL; onLandmarkLoaded(asset_id, lm); } } @@ -1459,7 +1460,11 @@ void LLFavoritesOrderStorage::destroyClass() file.open(old_filename); if (file.is_open()) { + file.close(); std::string new_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); + LL_INFOS("FavoritesBar") << "moving favorites from old name '" << old_filename + << "' to new name '" << new_filename << "'" + << LL_ENDL; LLFile::copy(old_filename,new_filename); LLFile::remove(old_filename); } @@ -1485,7 +1490,15 @@ void LLFavoritesOrderStorage::load() if (file.is_open()) { LLSDSerialize::fromXML(settings_llsd, file); + LL_INFOS("FavoritesBar") << "loaded favorites order from '" << filename << "' " + << (settings_llsd.isMap() ? "" : "un") << "successfully" + << LL_ENDL; + file.close(); } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites order file at '" << filename << "'" << LL_ENDL; + } for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); iter != settings_llsd.endMap(); ++iter) @@ -1499,14 +1512,14 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() // Do not change the file if we are not logged in yet. if (!LLLoginInstance::getInstance()->authSuccess()) { - LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL; + LL_WARNS("FavoritesBar") << "Cannot save favorites: not logged in" << LL_ENDL; return; } std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); if (user_dir.empty()) { - LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL; + LL_WARNS("FavoritesBar") << "Cannot save favorites: empty user dir name" << LL_ENDL; return; } @@ -1517,7 +1530,15 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() if (in_file.is_open()) { LLSDSerialize::fromXML(fav_llsd, in_file); + LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' " + << (fav_llsd.isMap() ? "" : "un") << "successfully" + << LL_ENDL; + in_file.close(); } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; + } const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); LLInventoryModel::cat_array_t cats; @@ -1534,13 +1555,13 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); if (slurl_iter != mSLURLs.end()) { - LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; + LL_DEBUGS("FavoritesBar") << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; value["slurl"] = slurl_iter->second; user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; } else { - LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; + LL_WARNS("FavoritesBar") << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; } } @@ -1548,12 +1569,25 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() LLAvatarNameCache::get( gAgentID, &av_name ); // Note : use the "John Doe" and not the "john.doe" version of the name // as we'll compare it with the stored credentials in the login panel. - LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL; fav_llsd[av_name.getUserName()] = user_llsd; llofstream file; file.open(filename); - LLSDSerialize::toPrettyXML(fav_llsd, file); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, file); + LL_INFOS("FavoritesBar") << "saved favorites for '" << av_name.getUserName() + << "' to '" << filename << "' " + << LL_ENDL; + file.close(); + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName() + << "' at '" << filename << "' " + << LL_ENDL; + } + } void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() @@ -1562,29 +1596,38 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLSD fav_llsd; llifstream file; file.open(filename); - if (!file.is_open()) return; - LLSDSerialize::fromXML(fav_llsd, file); - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - // Note : use the "John Doe" and not the "john.doe" version of the name. - // See saveFavoritesSLURLs() here above for the reason why. - LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL; - if (fav_llsd.has(av_name.getUserName())) - { - fav_llsd.erase(av_name.getUserName()); - } - - llofstream out_file; - out_file.open(filename); - LLSDSerialize::toPrettyXML(fav_llsd, out_file); - + if (file.is_open()) + { + LLSDSerialize::fromXML(fav_llsd, file); + file.close(); + + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name. + // See saveFavoritesSLURLs() here above for the reason why. + if (fav_llsd.has(av_name.getUserName())) + { + LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL; + fav_llsd.erase(av_name.getUserName()); + } + + llofstream out_file; + out_file.open(filename); + if ( out_file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, out_file); + LL_INFOS("FavoritesBar") << "saved favorites to '" << filename << "' " + << LL_ENDL; + out_file.close(); + } + } } void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark) { - if (!landmark) return; - + if (landmark) + { + LL_DEBUGS("FavoritesBar") << "landmark for " << asset_id << " loaded" << LL_ENDL; LLVector3d pos_global; if (!landmark->getGlobalPos(pos_global)) { @@ -1595,14 +1638,16 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar if (!pos_global.isExactlyZero()) { + LL_DEBUGS("FavoritesBar") << "requestion slurl for landmark " << asset_id << LL_ENDL; LLLandmarkActions::getSLURLfromPosGlobal(pos_global, boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1)); } + } } void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) { - LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL; + LL_DEBUGS("FavoritesBar") << "Saving landmark SLURL '" << slurl << "' for " << asset_id << LL_ENDL; mSLURLs[asset_id] = slurl; } @@ -1627,7 +1672,15 @@ void LLFavoritesOrderStorage::save() llofstream file; file.open(filename); - LLSDSerialize::toPrettyXML(settings_llsd, file); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(settings_llsd, file); + LL_INFOS("FavoritesBar") << "saved favorites order to '" << filename << "' " << LL_ENDL; + } + else + { + LL_WARNS("FavoritesBar") << "failed to open favorites order file '" << filename << "' " << LL_ENDL; + } } } -- cgit v1.2.3 From d3477b738881acbdf2bd1cc7bfaadaaae3890be6 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 17 Mar 2015 18:09:01 -0400 Subject: improve file name handling and clean up some error checks --- indra/newview/llfavoritesbar.cpp | 256 +++++++++++++++++++++------------------ indra/newview/llfavoritesbar.h | 18 +-- 2 files changed, 143 insertions(+), 131 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 190ec4abe3..3da162c5ef 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1449,6 +1449,19 @@ void LLFavoritesOrderStorage::getSLURL(const LLUUID& asset_id) } } +// static +std::string LLFavoritesOrderStorage::getStoredFavoritesFilename() +{ + std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); + + return (user_dir.empty() ? "" + : gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + "stored_favorites_" + + LLGridManager::getInstance()->getGrid() + + ".xml") + ); +} + // static void LLFavoritesOrderStorage::destroyClass() { @@ -1461,7 +1474,7 @@ void LLFavoritesOrderStorage::destroyClass() if (file.is_open()) { file.close(); - std::string new_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); + std::string new_filename = getStoredFavoritesFilename(); LL_INFOS("FavoritesBar") << "moving favorites from old name '" << old_filename << "' to new name '" << new_filename << "'" << LL_ENDL; @@ -1479,10 +1492,19 @@ void LLFavoritesOrderStorage::destroyClass() } } +std::string LLFavoritesOrderStorage::getSavedOrderFileName() +{ + // If we quit from the login screen we will not have an SL account + // name. Don't try to save, otherwise we'll dump a file in + // C:\Program Files\SecondLife\ or similar. JC + std::string user_dir = gDirUtilp->getLindenUserDir(); + return (user_dir.empty() ? "" : gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME)); +} + void LLFavoritesOrderStorage::load() { // load per-resident sorting information - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + std::string filename = getSavedOrderFileName(); LLSD settings_llsd; llifstream file; @@ -1516,109 +1538,107 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() return; } - std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); - if (user_dir.empty()) - { - LL_WARNS("FavoritesBar") << "Cannot save favorites: empty user dir name" << LL_ENDL; - return; - } - - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); - llifstream in_file; - in_file.open(filename); - LLSD fav_llsd; - if (in_file.is_open()) - { - LLSDSerialize::fromXML(fav_llsd, in_file); - LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' " - << (fav_llsd.isMap() ? "" : "un") << "successfully" - << LL_ENDL; - in_file.close(); - } - else + std::string filename = getStoredFavoritesFilename(); + if (!filename.empty()) { - LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; - } - - const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + llifstream in_file; + in_file.open(filename); + LLSD fav_llsd; + if (in_file.is_open()) + { + LLSDSerialize::fromXML(fav_llsd, in_file); + LL_INFOS("FavoritesBar") << "loaded favorites from '" << filename << "' " + << (fav_llsd.isMap() ? "" : "un") << "successfully" + << LL_ENDL; + in_file.close(); + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites from '" << filename << "'" << LL_ENDL; + } - LLSD user_llsd; - for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) - { - LLSD value; - value["name"] = (*it)->getName(); - value["asset_id"] = (*it)->getAssetUUID(); + const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); - slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); - if (slurl_iter != mSLURLs.end()) - { - LL_DEBUGS("FavoritesBar") << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; - value["slurl"] = slurl_iter->second; - user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; - } - else - { - LL_WARNS("FavoritesBar") << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; - } - } + LLSD user_llsd; + for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); it++) + { + LLSD value; + value["name"] = (*it)->getName(); + value["asset_id"] = (*it)->getAssetUUID(); + + slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); + if (slurl_iter != mSLURLs.end()) + { + LL_DEBUGS("FavoritesBar") << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; + value["slurl"] = slurl_iter->second; + user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; + } + else + { + LL_WARNS("FavoritesBar") << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; + } + } - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - // Note : use the "John Doe" and not the "john.doe" version of the name - // as we'll compare it with the stored credentials in the login panel. - fav_llsd[av_name.getUserName()] = user_llsd; + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name + // as we'll compare it with the stored credentials in the login panel. + fav_llsd[av_name.getUserName()] = user_llsd; - llofstream file; - file.open(filename); - if ( file.is_open() ) - { - LLSDSerialize::toPrettyXML(fav_llsd, file); - LL_INFOS("FavoritesBar") << "saved favorites for '" << av_name.getUserName() - << "' to '" << filename << "' " - << LL_ENDL; - file.close(); - } - else - { - LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName() - << "' at '" << filename << "' " - << LL_ENDL; + llofstream file; + file.open(filename); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, file); + LL_INFOS("FavoritesBar") << "saved favorites for '" << av_name.getUserName() + << "' to '" << filename << "' " + << LL_ENDL; + file.close(); + } + else + { + LL_WARNS("FavoritesBar") << "unable to open favorites storage for '" << av_name.getUserName() + << "' at '" << filename << "' " + << LL_ENDL; + } } - } void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); - LLSD fav_llsd; - llifstream file; - file.open(filename); - if (file.is_open()) + std::string filename = getStoredFavoritesFilename(); + if (!filename.empty()) { - LLSDSerialize::fromXML(fav_llsd, file); - file.close(); - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - // Note : use the "John Doe" and not the "john.doe" version of the name. - // See saveFavoritesSLURLs() here above for the reason why. - if (fav_llsd.has(av_name.getUserName())) + LLSD fav_llsd; + llifstream file; + file.open(filename); + if (file.is_open()) { - LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL; - fav_llsd.erase(av_name.getUserName()); - } + LLSDSerialize::fromXML(fav_llsd, file); + file.close(); - llofstream out_file; - out_file.open(filename); - if ( out_file.is_open() ) - { - LLSDSerialize::toPrettyXML(fav_llsd, out_file); - LL_INFOS("FavoritesBar") << "saved favorites to '" << filename << "' " - << LL_ENDL; - out_file.close(); + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + // Note : use the "John Doe" and not the "john.doe" version of the name. + // See saveFavoritesSLURLs() here above for the reason why. + if (fav_llsd.has(av_name.getUserName())) + { + LL_INFOS("FavoritesBar") << "Removed favorites for " << av_name.getUserName() << LL_ENDL; + fav_llsd.erase(av_name.getUserName()); + } + + llofstream out_file; + out_file.open(filename); + if ( out_file.is_open() ) + { + LLSDSerialize::toPrettyXML(fav_llsd, out_file); + LL_INFOS("FavoritesBar") << "saved favorites to '" << filename << "' " + << LL_ENDL; + out_file.close(); + } } } } @@ -1638,7 +1658,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar if (!pos_global.isExactlyZero()) { - LL_DEBUGS("FavoritesBar") << "requestion slurl for landmark " << asset_id << LL_ENDL; + LL_DEBUGS("FavoritesBar") << "requesting slurl for landmark " << asset_id << LL_ENDL; LLLandmarkActions::getSLURLfromPosGlobal(pos_global, boost::bind(&LLFavoritesOrderStorage::storeFavoriteSLURL, this, asset_id, _1)); } @@ -1653,37 +1673,39 @@ void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::st void LLFavoritesOrderStorage::save() { - // nothing to save if clean - if (!mIsDirty) return; - - // If we quit from the login screen we will not have an SL account - // name. Don't try to save, otherwise we'll dump a file in - // C:\Program Files\SecondLife\ or similar. JC - std::string user_dir = gDirUtilp->getLindenUserDir(); - if (!user_dir.empty()) - { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); - LLSD settings_llsd; - - for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) - { - settings_llsd[iter->first.asString()] = iter->second; - } - - llofstream file; - file.open(filename); - if ( file.is_open() ) + if (mIsDirty) + { + // something changed, so save it + std::string filename = LLFavoritesOrderStorage::getInstance()->getSavedOrderFileName(); + if (!filename.empty()) { - LLSDSerialize::toPrettyXML(settings_llsd, file); - LL_INFOS("FavoritesBar") << "saved favorites order to '" << filename << "' " << LL_ENDL; + LLSD settings_llsd; + + for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) + { + settings_llsd[iter->first.asString()] = iter->second; + } + + llofstream file; + file.open(filename); + if ( file.is_open() ) + { + LLSDSerialize::toPrettyXML(settings_llsd, file); + LL_INFOS("FavoritesBar") << "saved favorites order to '" << filename << "' " << LL_ENDL; + } + else + { + LL_WARNS("FavoritesBar") << "failed to open favorites order file '" << filename << "' " << LL_ENDL; + } } else { - LL_WARNS("FavoritesBar") << "failed to open favorites order file '" << filename << "' " << LL_ENDL; + LL_DEBUGS("FavoritesBar") << "no user directory available to store favorites order file" << LL_ENDL; } - } + } } + void LLFavoritesOrderStorage::cleanup() { // nothing to clean diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index 5ca1d3e8ed..a370724947 100755 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -162,19 +162,7 @@ private: boost::signals2::connection mEndDragConnection; }; -/* -class AddFavoriteLandmarkCallback : public LLInventoryCallback -{ -public: - AddFavoriteLandmarkCallback() : mTargetLandmarkId(LLUUID::null) {} - void setTargetLandmarkId(const LLUUID& target_uuid) { mTargetLandmarkId = target_uuid; } - -private: - void fire(const LLUUID& inv_item); - LLUUID mTargetLandmarkId; -}; -*/ /** * Class to store sorting order of favorites landmarks in a local file. EXT-3985. * It replaced previously implemented solution to store sort index in landmark's name as a "<N>@" prefix. @@ -222,14 +210,16 @@ private: friend class LLSingleton<LLFavoritesOrderStorage>; LLFavoritesOrderStorage() : mIsDirty(false) { load(); } ~LLFavoritesOrderStorage() { save(); } - + /** * Removes sort indexes for items which are not in Favorites bar for now. */ void cleanup(); const static std::string SORTING_DATA_FILE_NAME; - + std::string getSavedOrderFileName(); + static std::string getStoredFavoritesFilename(); + void load(); void save(); -- cgit v1.2.3 From 794ae5cdcadcfaa655815bfa1e6c6823e03ee1f6 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 23 Mar 2015 22:34:34 -0400 Subject: correct merge error --- indra/newview/llvoavatarself.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ff718b2c70..1e9945b514 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -177,8 +177,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, LLVOAvatar(id, pcode, regionp), mScreenp(NULL), mLastRegionHandle(0), - mRegionCrossingCount(0) - mInitialBakesLoaded(false), + mRegionCrossingCount(0), // Value outside legal range, so will always be a mismatch the // first time through. mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f)) -- cgit v1.2.3 From 5eeea87ef4f44baa156c898ae393d5e7edb757de Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Wed, 4 Mar 2015 19:40:29 +0200 Subject: MAINT-4943 FIXED Crash on location --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fd2e96744a..47d4e5565b 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2054,7 +2054,7 @@ bool LLVOVolume::notifyAboutCreatingTexture(LLViewerTexture *texture) LLMaterialPtr cur_material = getTEMaterialParams(range_it->second.te); //here we just interesting in DIFFUSE_MAP only! - if(LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) + if(NULL != cur_material.get() && LLRender::DIFFUSE_MAP == range_it->second.map && GL_RGBA != texture->getPrimaryFormat()) { //ok let's check the diffuse mode switch(cur_material->getDiffuseAlphaMode()) { -- cgit v1.2.3 From 1c496b21b286f131652150eed4d13870127bd001 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Wed, 4 Mar 2015 14:29:41 -0500 Subject: MAINT-4858 FIX --- indra/newview/llvoavatar.cpp | 73 +++++++++++++++++++++++++++++++------------- indra/newview/llvoavatar.h | 1 + 2 files changed, 53 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3f75131780..a90fade3c9 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3178,12 +3178,8 @@ void LLVOAvatar::forceUpdateVisualMuteSettings() } -//------------------------------------------------------------------------ -// updateCharacter() -// called on both your avatar and other avatars -//------------------------------------------------------------------------ -BOOL LLVOAvatar::updateCharacter(LLAgent &agent) -{ +void LLVOAvatar::updateDebugText() +{ // clear debug text mDebugText.clear(); @@ -3226,6 +3222,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (hover_offset[2] != 0.0) { debug_line += llformat(" hov_z: %f", hover_offset[2]); + debug_line += llformat(" %s", (mIsSitting ? "S" : "T")); + debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-")); } F32 elapsed = mLastAppearanceMessageTimer.getElapsedTimeF32(); static const char *elapsed_chars = "Xx*..."; @@ -3241,7 +3239,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) if (!mBakedTextureDebugText.empty()) addDebugText(mBakedTextureDebugText); } - + if (LLVOAvatar::sShowAnimationDebug) { for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin(); @@ -3270,6 +3268,27 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } } + if (!mDebugText.size() && mText.notNull()) + { + mText->markDead(); + mText = NULL; + } + else if (mDebugText.size()) + { + setDebugText(mDebugText); + } + mDebugText.clear(); + +} + +//------------------------------------------------------------------------ +// updateCharacter() +// called on both your avatar and other avatars +//------------------------------------------------------------------------ +BOOL LLVOAvatar::updateCharacter(LLAgent &agent) +{ + updateDebugText(); + if (!mIsBuilt) { return FALSE; @@ -3378,9 +3397,15 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) LLVector3 xyVel = getVelocity(); xyVel.mV[VZ] = 0.0f; speed = xyVel.length(); - + // remembering the value here prevents a display glitch if the + // animation gets toggled during this update. + bool was_sit_ground_constrained = isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED); + if (!(mIsSitting && getParent())) { + // This case includes all configurations except sitting on an + // object, so does include ground sit. + //-------------------------------------------------------------------- // get timing info // handle initial condition case @@ -3434,7 +3459,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // correct for the fact that the pelvis is not necessarily the center // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; - root_pos += LLVector3d(getHoverOffset()); + if (!mIsSitting && !was_sit_ground_constrained) + { + root_pos += LLVector3d(getHoverOffset()); + } LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); @@ -3624,7 +3652,21 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { updateMotions(LLCharacter::NORMAL_UPDATE); } - + + // Special handling for sitting on ground. + if (!getParent() && (mIsSitting || was_sit_ground_constrained)) + { + + F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ]; + if (off_z != 0.0) + { + LLVector3 pos = mRoot->getWorldPosition(); + pos.mV[VZ] += off_z; + mRoot->touch(); + mRoot->setWorldPosition(pos); + } + } + // update head position updateHeadOffset(); @@ -3708,17 +3750,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) mRoot->updateWorldMatrixChildren(); - if (!mDebugText.size() && mText.notNull()) - { - mText->markDead(); - mText = NULL; - } - else if (mDebugText.size()) - { - setDebugText(mDebugText); - } - mDebugText.clear(); - //mesh vertices need to be reskinned mNeedsSkin = TRUE; return TRUE; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 82b95145e5..2e72633d39 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -233,6 +233,7 @@ private: //aligned members // Updates //-------------------------------------------------------------------- public: + void updateDebugText(); virtual BOOL updateCharacter(LLAgent &agent); void idleUpdateVoiceVisualizer(bool voice_enabled); void idleUpdateMisc(bool detailed_update); -- cgit v1.2.3 From bed810216db009a7c5b1e9eacfb8f0b1307d7a72 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" <vir@lindenlab.com> Date: Fri, 6 Mar 2015 13:51:12 -0500 Subject: MAINT-4967 FIX - log spam removed --- indra/newview/app_settings/logcontrol.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 6a798e1d42..de3732f339 100755 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,7 +42,6 @@ </array> <key>tags</key> <array> - <string>Avatar</string> <!-- sample entry for debugging specific items <string>Avatar</string> <string>Inventory</string> -- cgit v1.2.3 From 282ad9417561d0d1df7e2bf81ef96caf53ff50d1 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 16 Mar 2015 18:03:05 +0200 Subject: MAINT-4974 FIXED Complete name should be used in LLAvatarActions::buildResidentsString only when building name string for share confirmation dialogs --- indra/newview/llavataractions.cpp | 14 +++++++++++--- indra/newview/llavataractions.h | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 0e30c079ff..8dc8a2ff20 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -745,7 +745,7 @@ namespace action_give_inventory } std::string residents; - LLAvatarActions::buildResidentsString(avatar_names, residents); + LLAvatarActions::buildResidentsString(avatar_names, residents, true); std::string items; build_items_string(inventory_selected_uuids, items); @@ -777,7 +777,7 @@ namespace action_give_inventory } // static -void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string) +void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name) { llassert(avatar_names.size() > 0); @@ -785,7 +785,15 @@ void LLAvatarActions::buildResidentsString(std::vector<LLAvatarName> avatar_name const std::string& separator = LLTrans::getString("words_separator"); for (std::vector<LLAvatarName>::const_iterator it = avatar_names.begin(); ; ) { - residents_string.append((*it).getCompleteName()); + if(complete_name) + { + residents_string.append((*it).getCompleteName()); + } + else + { + residents_string.append((*it).getDisplayName()); + } + if (++it == avatar_names.end()) { break; diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 85813f2152..bd0ac24e93 100755 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -221,7 +221,7 @@ public: * @param avatar_names - a vector of given avatar names from which resulting string is built * @param residents_string - the resulting string */ - static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string); + static void buildResidentsString(std::vector<LLAvatarName> avatar_names, std::string& residents_string, bool complete_name = false); /** * Builds a string of residents' display names separated by "words_separator" string. -- cgit v1.2.3 From ad854873709a9ed756231b39c24542cdfab51887 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Tue, 17 Mar 2015 12:31:07 +0200 Subject: MAINT-4971 FIXED [MAINT-RC] Own avatar is often totally invisible at login with no way to fix apart from a relog. Other avatars are also often invisible. --- indra/newview/llvoavatar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3686ccb48f..7292af99a4 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -716,7 +716,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), mLastUpdateRequestCOFVersion(-1), - mLastUpdateReceivedCOFVersion(-1) + mLastUpdateReceivedCOFVersion(-1), + mCachedMuteListUpdateTime(0), + mCachedInMuteList(false) { //VTResume(); // VTune -- cgit v1.2.3 From c489f1f8647a77c8c7d5fb5b721433dd72cb49c8 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 23 Mar 2015 14:32:13 -0400 Subject: increment viewer version to 3.7.27 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index e5403775b2..0bbe2c1160 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.26 +3.7.27 -- cgit v1.2.3 From 078c5a2cb7cac57a1a0f7c89a77dd460a4c3a3ba Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 24 Mar 2015 16:52:09 +0200 Subject: MAINT-5024 crash in LLInspectToast --- indra/newview/llinspecttoast.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index 0bc7bd188d..d04378daaf 100755 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -89,6 +89,11 @@ void LLInspectToast::onOpen(const LLSD& notification_id) mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1)); LLPanel * panel = toast->getPanel(); + if (panel == NULL) + { + LL_WARNS() << "Could not get toast's panel." << LL_ENDL; + return; + } panel->setVisible(TRUE); panel->setMouseOpaque(FALSE); if(mPanel != NULL && mPanel->getParent() == this) -- cgit v1.2.3 From 18bacca5ca066c6fb1b38a82e322b624923b7340 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 24 Mar 2015 18:30:40 +0200 Subject: MAINT-5023 URIparser crash in LLUrlEntryBase::urlToLabelWithGreyQuery --- indra/newview/llstartup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9da7717b74..319d220b51 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1352,11 +1352,11 @@ bool idle_startup() { LLStringUtil::format_map_t args; args["[NUMBER]"] = llformat("%d", num_retries + 1); - set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD); + set_startup_status(0.4f, LLTrans::getString("LoginRetrySeedCapGrant", args), gAgent.mMOTD.c_str()); } else { - set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD); + set_startup_status(0.4f, LLTrans::getString("LoginRequestSeedCapGrant"), gAgent.mMOTD.c_str()); } } display_startup(); @@ -2070,7 +2070,7 @@ bool idle_startup() update_texture_fetch(); set_startup_status(0.60f + 0.30f * timeout_frac, LLTrans::getString("LoginPrecaching"), - gAgent.mMOTD); + gAgent.mMOTD.c_str()); display_startup(); } -- cgit v1.2.3 From 3f558469daa061d7edcafd377f1e539069f25c8d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 27 Mar 2015 13:53:38 +0200 Subject: MAINT-4718 FIXED Context menu Open button is always disabled for no-copy textures in task inventory --- indra/newview/llpanelobjectinventory.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5fd575ee8b..bf15f56b44 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -689,10 +689,6 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else if (canOpenItem()) { items.push_back(std::string("Task Open")); - if (!isItemCopyable()) - { - disabled_items.push_back(std::string("Task Open")); - } } items.push_back(std::string("Task Properties")); if(isItemRenameable()) -- cgit v1.2.3 From 90573badb4fcea3ae771c466e859854547ed7ad5 Mon Sep 17 00:00:00 2001 From: ruslantproductengine <ruslantproductengine@lindenlab.com> Date: Mon, 30 Mar 2015 20:11:27 +0300 Subject: MAINT-3585 FIXED (Crashes when attempting to upload image.) --- indra/newview/lllocalbitmaps.cpp | 3 --- indra/newview/llviewerdisplay.cpp | 8 -------- indra/newview/llviewerdisplay.h | 2 -- 3 files changed, 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 4a89fc92b4..619140e922 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -844,9 +844,6 @@ 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 9ef911616e..ea9463da04 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1344,14 +1344,6 @@ 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 dcc78fe42f..f6467d7f93 100755 --- a/indra/newview/llviewerdisplay.h +++ b/indra/newview/llviewerdisplay.h @@ -34,8 +34,6 @@ 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 59e58c9328f414ae95b6a09129de3a9942aab083 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Thu, 2 Apr 2015 15:53:07 -0400 Subject: improve notice clarity --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b4d8046d18..34897e61e4 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10398,7 +10398,7 @@ Cannot create large prims that intersect other players. Please re-try when othe icon="alertmodal.tga" name="DefaultObjectPermissions" type="alert"> - There was a problem saving the default permissions due to the following reason: [REASON]. Please try setting the default permissions later. + There was a problem saving the default object permissions: [REASON]. Please try setting the default permissions later. <tag>fail</tag> <usetemplate name="okbutton" -- cgit v1.2.3 From 6324e580001b3b3f2a6e851a483b235529be13c6 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Thu, 2 Apr 2015 21:11:22 -0400 Subject: improve logging of errors in default permissions cap --- indra/newview/llfloaterperms.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 849aa7cd14..042cf47070 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -195,7 +195,7 @@ private: // even if it is the same as a previous one. sPreviousReason = ""; LLFloaterPermsDefault::setCapSent(true); - LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL; + LL_INFOS("ObjectPermissionsFloater") << "Default permissions successfully sent to simulator" << LL_ENDL; } }; @@ -223,8 +223,20 @@ void LLFloaterPermsDefault::updateCap() report["default_object_perm_masks"]["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]); + { + LL_DEBUGS("ObjectPermissionsFloater") << "Sending default permissions to '" + << object_url << "'\n"; + std::ostringstream sent_perms_log; + LLSDSerialize::toPrettyXML(report, sent_perms_log); + LL_CONT << sent_perms_log.str() << LL_ENDL; + } + LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); } + else + { + LL_DEBUGS("ObjectPermissionsFloater") << "AgentPreferences cap not available." << LL_ENDL; + } } void LLFloaterPermsDefault::setCapSent(bool cap_sent) -- cgit v1.2.3 From e19809cb916df8b2ba965662607abe604d7a2bf5 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Thu, 2 Apr 2015 21:12:43 -0400 Subject: improve logging of machine id generation --- indra/newview/llmachineid.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index cd6473921d..b5fd3df0f3 100755 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -88,7 +88,7 @@ S32 LLMachineID::init() if (FAILED(hres)) { - LL_DEBUGS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL; + LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL; CoUninitialize(); return 1; // Program has failed. } @@ -106,7 +106,7 @@ S32 LLMachineID::init() if (FAILED(hres)) { - LL_DEBUGS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL; + LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL; CoUninitialize(); return 1; // Program has failed. } @@ -132,7 +132,7 @@ S32 LLMachineID::init() if (FAILED(hres)) { - LL_DEBUGS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL; + LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL; pLoc->Release(); CoUninitialize(); return 1; // Program has failed. @@ -157,7 +157,7 @@ S32 LLMachineID::init() if (FAILED(hres)) { - LL_DEBUGS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL; + LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL; pSvc->Release(); pLoc->Release(); CoUninitialize(); @@ -178,7 +178,7 @@ S32 LLMachineID::init() if (FAILED(hres)) { - LL_DEBUGS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL; + LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL; pSvc->Release(); pLoc->Release(); CoUninitialize(); @@ -205,7 +205,7 @@ S32 LLMachineID::init() // Get the value of the Name property hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); - LL_DEBUGS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; + LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; // use characters in the returned Serial Number to create a byte array of size len BSTR serialNumber ( vtProp.bstrVal); unsigned int j = 0; @@ -252,7 +252,7 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) if (has_static_unique_id) { memcpy ( unique_id, &static_unique_id, len); - LL_DEBUGS("AppInit") << "UniqueID: 0x"; + LL_INFOS_ONCE("AppInit") << "UniqueID: 0x"; // Code between here and LL_ENDL is not executed unless the LL_DEBUGS // actually produces output for (size_t i = 0; i < len; ++i) -- cgit v1.2.3 From 4aafdfd1c6ee76484b83a4e91a73af357aba0de7 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Thu, 2 Apr 2015 21:21:21 -0400 Subject: add catch for possible exception in llsechandler_basic destructor (crash on exit) --- indra/newview/llsechandler_basic.cpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index fc9d9f0842..588c585f52 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -1364,6 +1364,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() } catch (...) { + LL_WARNS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL; // it's good practice to clean up any secure information on error // (even though this file isn't really secure. Perhaps in the future // it may be, however. @@ -1372,20 +1373,35 @@ void LLSecAPIBasicHandler::_writeProtectedData() // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() // Decided throwing an exception here was overkill until we figure out why this happens //throw LLProtectedDataException("Error writing Protected Data Store"); - LL_INFOS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL; } - // move the temporary file to the specified file location. - if((((LLFile::isfile(mProtectedDataFilename) != 0) && - (LLFile::remove(mProtectedDataFilename) != 0))) || - (LLFile::rename(tmp_filename, mProtectedDataFilename))) + try + { + // move the temporary file to the specified file location. + if((( (LLFile::isfile(mProtectedDataFilename) != 0) + && (LLFile::remove(mProtectedDataFilename) != 0))) + || (LLFile::rename(tmp_filename, mProtectedDataFilename))) + { + LL_WARNS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL; + LLFile::remove(tmp_filename); + + // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() + // Decided throwing an exception here was overkill until we figure out why this happens + //throw LLProtectedDataException("Could not overwrite protected data store"); + } + } + catch (...) { + LL_WARNS() << "LLProtectedDataException(Error renaming '" << tmp_filename + << "' to '" << mProtectedDataFilename << "')" << LL_ENDL; + // it's good practice to clean up any secure information on error + // (even though this file isn't really secure. Perhaps in the future + // it may be, however. LLFile::remove(tmp_filename); - // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData() + //crash in LLSecAPIBasicHandler::_writeProtectedData() // Decided throwing an exception here was overkill until we figure out why this happens - //throw LLProtectedDataException("Could not overwrite protected data store"); - LL_INFOS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL; + //throw LLProtectedDataException("Error writing Protected Data Store"); } } -- cgit v1.2.3 From 66bc5107863e8226e91818cd9d3c075d0514dbe5 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Thu, 2 Apr 2015 21:43:34 -0400 Subject: detect xml errors in parsing xml files and remove those files --- indra/newview/llappviewer.cpp | 31 +++++++++++++++++++------------ indra/newview/llnotificationstorage.cpp | 10 +++++++--- indra/newview/llviewertexturelist.cpp | 22 +++++++++++++++++----- indra/newview/llviewertexturelist.h | 3 +-- 4 files changed, 44 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4bf719ec31..dd6b2802cd 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4653,7 +4653,12 @@ void LLAppViewer::loadNameCache() llifstream name_cache_stream(filename); if(name_cache_stream.is_open()) { - LLAvatarNameCache::importFile(name_cache_stream); + if ( ! LLAvatarNameCache::importFile(name_cache_stream)) + { + LL_WARNS("AppInit") << "removing invalid '" << filename << "'" << LL_ENDL; + name_cache_stream.close(); + LLFile::remove(filename); + } } if (!gCacheName) return; @@ -4668,7 +4673,7 @@ void LLAppViewer::loadNameCache() } void LLAppViewer::saveNameCache() - { +{ // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); @@ -4676,16 +4681,18 @@ void LLAppViewer::saveNameCache() if(name_cache_stream.is_open()) { LLAvatarNameCache::exportFile(name_cache_stream); -} - - if (!gCacheName) return; - - std::string name_cache; - name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - llofstream cache_file(name_cache); - if(cache_file.is_open()) - { - gCacheName->exportFile(cache_file); + } + + // real names cache + if (gCacheName) + { + std::string name_cache; + name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); + llofstream cache_file(name_cache); + if(cache_file.is_open()) + { + gCacheName->exportFile(cache_file); + } } } diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index e9970de58c..3418b33d37 100755 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -123,14 +123,18 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_n { LLPointer<LLSDParser> parser = new LLSDXMLParser(); didFileRead = (parser->parse(notifyFile, pNotificationData, LLSDSerialize::SIZE_UNLIMITED) >= 0); + notifyFile.close(); + if (!didFileRead) { LL_WARNS("LLNotificationStorage") << "Failed to parse open notifications from file '" << mFileName - << "'" << LL_ENDL; + << "'" << LL_ENDL; + LLFile::remove(filename); + LL_WARNS("LLNotificationStorage") << "Removed invalid open notifications file '" << mFileName + << "'" << LL_ENDL; } } - - LL_INFOS("LLNotificationStorage") << "ending read '" << filename << "'" << LL_ENDL; + if (!didFileRead) { if(is_new_filename) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 8c27ddc63c..0865d90005 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -165,7 +165,7 @@ void LLViewerTextureList::doPreloadImages() static std::string get_texture_list_name() { - return std::string("texture_list_") + gSavedSettings.getString("LoginLocation") + ".xml"; + return gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "texture_list_" + gSavedSettings.getString("LoginLocation") + ".xml"); } void LLViewerTextureList::doPrefetchImages() @@ -178,13 +178,22 @@ void LLViewerTextureList::doPrefetchImages() // Pre-fetch textures from last logout LLSD imagelist; - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); + std::string filename = get_texture_list_name(); llifstream file; file.open(filename); if (file.is_open()) { - LLSDSerialize::fromXML(imagelist, file); - } + if ( ! LLSDSerialize::fromXML(imagelist, file) ) + { + file.close(); + LL_WARNS() << "XML parse error reading texture list '" << filename << "'" << LL_ENDL; + LL_WARNS() << "Removing invalid texture list '" << filename << "'" << LL_ENDL; + LLFile::remove(filename); + return; + } + file.close(); + } + S32 texture_count = 0; for (LLSD::array_iterator iter = imagelist.beginArray(); iter != imagelist.endArray(); ++iter) { @@ -198,10 +207,12 @@ void LLViewerTextureList::doPrefetchImages() LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, texture_type); if (image) { + texture_count += 1; image->addTextureStats((F32)pixel_area); } } } + LL_DEBUGS() << "fetched " << texture_count << " images from " << filename << LL_ENDL; } /////////////////////////////////////////////////////////////////////////////// @@ -261,9 +272,10 @@ void LLViewerTextureList::shutdown() if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) { - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); + std::string filename = get_texture_list_name(); llofstream file; file.open(filename); + LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL; LLSDSerialize::toPrettyXML(imagelist, file); } diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 2f84d0947a..fbbfe9a7d4 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -61,8 +61,6 @@ typedef void (*LLImageCallback)(BOOL success, class LLViewerTextureList { - LOG_CLASS(LLViewerTextureList); - friend class LLTextureView; friend class LLViewerTextureManager; friend class LLLocalBitmap; @@ -206,6 +204,7 @@ private: private: static S32 sNumImages; static void (*sUUIDCallback)(void**, const LLUUID &); + LOG_CLASS(LLViewerTextureList); }; class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList> -- cgit v1.2.3 From 3a57b18896eacb6fea6680d0eccaaeddb0b700b0 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 7 Apr 2015 17:28:05 -0400 Subject: convert llifstream and llofstream to std::ifstream and std::ofstream respectively --- indra/newview/llagentpilot.cpp | 8 ++--- indra/newview/llappviewer.cpp | 12 +++---- indra/newview/llavatariconctrl.cpp | 4 +-- indra/newview/llcommandlineparser.cpp | 2 +- indra/newview/llfavoritesbar.cpp | 14 ++++---- indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llfloaterabout.cpp | 4 +-- indra/newview/llfloatermodelpreview.cpp | 4 +-- indra/newview/llfloaterspellchecksettings.cpp | 5 +-- indra/newview/lllocationhistory.cpp | 4 +-- indra/newview/lllogchat.cpp | 2 +- indra/newview/llpanellogin.cpp | 4 +-- indra/newview/llpanelmaininventory.cpp | 18 +++++----- indra/newview/llsearchhistory.cpp | 4 +-- indra/newview/llsechandler_basic.cpp | 6 ++-- indra/newview/llsyntaxid.cpp | 4 +-- indra/newview/llteleporthistorystorage.cpp | 4 +-- indra/newview/llurlhistory.cpp | 51 ++++++++++++++------------- indra/newview/llurlwhitelist.cpp | 4 +-- indra/newview/llviewermedia.cpp | 4 +-- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 4 +-- indra/newview/llvoiceclient.cpp | 11 ++++-- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwldaycycle.cpp | 4 +-- indra/newview/llwlparammanager.cpp | 2 +- 26 files changed, 97 insertions(+), 88 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index 44589f0d57..cfc445f998 100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -84,7 +84,7 @@ void LLAgentPilot::loadTxt(const std::string& filename) return; } - llifstream file(filename); + llifstream file(filename.c_str()); if (!file) { @@ -125,7 +125,7 @@ void LLAgentPilot::loadXML(const std::string& filename) return; } - llifstream file(filename); + llifstream file(filename.c_str()); if (!file) { @@ -168,7 +168,7 @@ void LLAgentPilot::save() void LLAgentPilot::saveTxt(const std::string& filename) { llofstream file; - file.open(filename); + file.open(filename.c_str()); if (!file) { @@ -191,7 +191,7 @@ void LLAgentPilot::saveTxt(const std::string& filename) void LLAgentPilot::saveXML(const std::string& filename) { llofstream file; - file.open(filename); + file.open(filename.c_str()); if (!file) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dd6b2802cd..9668da2522 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3273,7 +3273,7 @@ void LLAppViewer::writeDebugInfo(bool isStatic) : getDynamicDebugFile() ); LL_INFOS() << "Opening debug file " << *debug_filename << LL_ENDL; - llofstream out_file(*debug_filename); + llofstream out_file(debug_filename->c_str()); isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file) : LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file); @@ -3762,7 +3762,7 @@ void LLAppViewer::handleViewerCrash() { std::string filename; filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log"); - llofstream file(filename, llofstream::binary); + llofstream file(filename.c_str(), std::ios_base::binary); if(file.good()) { LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL; @@ -4650,7 +4650,7 @@ void LLAppViewer::loadNameCache() std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); LL_INFOS("AvNameCache") << filename << LL_ENDL; - llifstream name_cache_stream(filename); + llifstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { if ( ! LLAvatarNameCache::importFile(name_cache_stream)) @@ -4665,7 +4665,7 @@ void LLAppViewer::loadNameCache() std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - llifstream cache_file(name_cache); + llifstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { if(gCacheName->importFile(cache_file)) return; @@ -4677,7 +4677,7 @@ void LLAppViewer::saveNameCache() // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); - llofstream name_cache_stream(filename); + llofstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { LLAvatarNameCache::exportFile(name_cache_stream); @@ -4688,7 +4688,7 @@ void LLAppViewer::saveNameCache() { std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - llofstream cache_file(name_cache); + llofstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { gCacheName->exportFile(cache_file); diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 746b541f9d..281e591b48 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -76,7 +76,7 @@ void LLAvatarIconIDCache::load () // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); - llifstream file(resolved_filename); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) return; @@ -114,7 +114,7 @@ void LLAvatarIconIDCache::save () std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); // open a file for writing - llofstream file (resolved_filename); + llofstream file (resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 06164e9597..1819fc74ee 100755 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -622,7 +622,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG LLSD clpConfigLLSD; llifstream input_stream; - input_stream.open(config_filename, std::ios::in | std::ios::binary); + input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary); if(input_stream.is_open()) { diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 3da162c5ef..fc9e85caf8 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1470,7 +1470,7 @@ void LLFavoritesOrderStorage::destroyClass() std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); llifstream file; - file.open(old_filename); + file.open(old_filename.c_str()); if (file.is_open()) { file.close(); @@ -1508,7 +1508,7 @@ void LLFavoritesOrderStorage::load() LLSD settings_llsd; llifstream file; - file.open(filename); + file.open(filename.c_str()); if (file.is_open()) { LLSDSerialize::fromXML(settings_llsd, file); @@ -1542,7 +1542,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() if (!filename.empty()) { llifstream in_file; - in_file.open(filename); + in_file.open(filename.c_str()); LLSD fav_llsd; if (in_file.is_open()) { @@ -1589,7 +1589,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() fav_llsd[av_name.getUserName()] = user_llsd; llofstream file; - file.open(filename); + file.open(filename.c_str()); if ( file.is_open() ) { LLSDSerialize::toPrettyXML(fav_llsd, file); @@ -1614,7 +1614,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() { LLSD fav_llsd; llifstream file; - file.open(filename); + file.open(filename.c_str()); if (file.is_open()) { LLSDSerialize::fromXML(fav_llsd, file); @@ -1631,7 +1631,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() } llofstream out_file; - out_file.open(filename); + out_file.open(filename.c_str()); if ( out_file.is_open() ) { LLSDSerialize::toPrettyXML(fav_llsd, out_file); @@ -1687,7 +1687,7 @@ void LLFavoritesOrderStorage::save() } llofstream file; - file.open(filename); + file.open(filename.c_str()); if ( file.is_open() ) { LLSDSerialize::toPrettyXML(settings_llsd, file); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index af84aea6a6..ea39f812fd 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -331,7 +331,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) U32 version; cleanupFeatureTables(); // in case an earlier attempt left partial results - file.open(filename); /*Flawfinder: ignore*/ + file.open(filename.c_str()); /*Flawfinder: ignore*/ if (!file) { diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 7ac3ac2f61..b342d8fdf3 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -156,7 +156,7 @@ BOOL LLFloaterAbout::postBuild() std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); llifstream contrib_file; std::string contributors; - contrib_file.open(contributors_path); /* Flawfinder: ignore */ + contrib_file.open(contributors_path.c_str()); /* Flawfinder: ignore */ if (contrib_file.is_open()) { std::getline(contrib_file, contributors); // all names are on a single line @@ -173,7 +173,7 @@ BOOL LLFloaterAbout::postBuild() // Get the Versions and Copyrights, created at build time std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt"); llifstream licenses_file; - licenses_file.open(licenses_path); /* Flawfinder: ignore */ + licenses_file.open(licenses_path.c_str()); /* Flawfinder: ignore */ if (licenses_file.is_open()) { std::string license_line; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index ec905558aa..b9113d265a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2155,7 +2155,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) S32 file_size = (S32) stat.st_size; - llifstream ifstream(filename, std::ifstream::in | std::ifstream::binary); + llifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); LLSD data; LLSDSerialize::fromBinary(data, ifstream, file_size); ifstream.close(); @@ -3513,7 +3513,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw data["instance"][i] = instance.asLLSD(); } - llofstream out(filename, std::ios_base::out | std::ios_base::binary); + llofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary); LLSDSerialize::toBinary(data, out); out.flush(); out.close(); diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 54c7b4c37d..5124dae147 100755 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -350,7 +350,8 @@ void LLFloaterSpellCheckerImport::onBtnOK() custom_dict_info["language"] = dict_language; LLSD custom_dict_map; - llifstream custom_file_in(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); + std::string custom_filename(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); + llifstream custom_file_in(custom_filename.c_str()); if (custom_file_in.is_open()) { LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); @@ -372,7 +373,7 @@ void LLFloaterSpellCheckerImport::onBtnOK() custom_dict_map.append(custom_dict_info); } - llofstream custom_file_out(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml", std::ios::trunc); + llofstream custom_file_out(custom_filename.c_str(), std::ios::trunc); if (custom_file_out.is_open()) { LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 680b35b550..162d6e003e 100755 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -127,7 +127,7 @@ void LLLocationHistory::save() const } // open a file for writing - llofstream file (resolved_filename); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -148,7 +148,7 @@ void LLLocationHistory::load() // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); - llifstream file(resolved_filename); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index cadbc16f1e..7ddacf3033 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -302,7 +302,7 @@ void LLLogChat::saveHistory(const std::string& filename, return; } - llofstream file (LLLogChat::makeLogFileName(filename), std::ios_base::app); + llofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app); if (!file.is_open()) { LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 89c898001f..cc8c3edd51 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -308,10 +308,10 @@ void LLPanelLogin::addFavoritesToStartLocation() LLSD fav_llsd; llifstream file; - file.open(filename); + file.open(filename.c_str()); if (!file.is_open()) { - file.open(old_filename); + file.open(old_filename.c_str()); if (!file.is_open()) return; } LLSDSerialize::fromXML(fav_llsd, file); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 37273a7793..17c0b226d0 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -160,10 +160,9 @@ BOOL LLPanelMainInventory::postBuild() } // Now load the stored settings from disk, if available. - std::ostringstream filterSaveName; - filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME); - LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName.str() << LL_ENDL; - llifstream file(filterSaveName.str()); + std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); + LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL; + llifstream file(filterSaveName.c_str()); LLSD savedFilterState; if (file.is_open()) { @@ -243,16 +242,17 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) } } - std::ostringstream filterSaveName; - filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME); - llofstream filtersFile(filterSaveName.str()); + std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); + llofstream filtersFile(filterSaveName.c_str()); if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) { - LL_WARNS() << "Could not write to filters save file " << filterSaveName.str() << LL_ENDL; + LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL; } else + { filtersFile.close(); - + } + gInventory.removeObserver(this); delete mSavedFolderState; } diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp index 7b4bf63740..0ea05a03d6 100755 --- a/indra/newview/llsearchhistory.cpp +++ b/indra/newview/llsearchhistory.cpp @@ -43,7 +43,7 @@ bool LLSearchHistory::load() { // build filename for each user std::string resolved_filename = getHistoryFilePath(); - llifstream file(resolved_filename); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; @@ -76,7 +76,7 @@ bool LLSearchHistory::save() // build filename for each user std::string resolved_filename = getHistoryFilePath(); // open a file for writing - llofstream file (resolved_filename); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 588c585f52..40516f9bbb 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -640,7 +640,7 @@ LLBasicCertificateStore::~LLBasicCertificateStore() // persist the store void LLBasicCertificateStore::save() { - llofstream file_store(mFilename, llofstream::binary); + llofstream file_store(mFilename.c_str(), std::ios_base::binary); if(!file_store.fail()) { for(iterator cert = begin(); @@ -1331,7 +1331,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() std::string tmp_filename = mProtectedDataFilename + ".tmp"; llofstream protected_data_stream(tmp_filename.c_str(), - llofstream::binary); + std::ios_base::binary); try { @@ -1568,7 +1568,7 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword() { const S32 HASHED_LENGTH = 32; std::vector<U8> buffer(HASHED_LENGTH); - llifstream password_file(mLegacyPasswordPath, llifstream::binary); + llifstream password_file(mLegacyPasswordPath.c_str(), llifstream::binary); if(password_file.fail()) { diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index a763d42a8d..802dff1ead 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -83,7 +83,7 @@ public: const std::string xml = str.str(); // save the str to disk, usually to the cache. - llofstream file(mFileSpec, std::ios_base::out); + llofstream file(mFileSpec.c_str(), std::ios_base::out); file.write(xml.c_str(), str.str().size()); file.close(); @@ -269,7 +269,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { LLSD content; llifstream file; - file.open(mFullFileSpec); + file.open(mFullFileSpec.c_str()); if (file.is_open()) { if (LLSDSerialize::fromXML(content, file) != LLSDParser::PARSE_FAILURE) diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index f88f88a4fa..8a5704939a 100755 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -164,7 +164,7 @@ void LLTeleportHistoryStorage::save() std::string resolvedFilename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for writing - llofstream file (resolvedFilename); + llofstream file(resolvedFilename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open teleport history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -186,7 +186,7 @@ void LLTeleportHistoryStorage::load() std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for reading - llifstream file(resolved_filename); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load teleport history from file \"" << mFilename << "\"" << LL_ENDL; diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index 8eea2b242a..f7064e152a 100755 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -40,29 +40,32 @@ const int MAX_URL_COUNT = 10; // static bool LLURLHistory::loadFile(const std::string& filename) { + bool dataloaded = false; + sHistorySD = LLSD(); LLSD data; - { - std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter(); - - llifstream file((temp_str + filename)); - - if (file.is_open()) - { - LL_INFOS() << "Loading history.xml file at " << filename << LL_ENDL; - LLSDSerialize::fromXML(data, file); - } - - if (data.isUndefined()) - { - LL_INFOS() << "file missing, ill-formed, " - "or simply undefined; not changing the" - " file" << LL_ENDL; - sHistorySD = LLSD(); - return false; - } - } - sHistorySD = data; - return true; + + std::string user_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); + + llifstream file(user_filename.c_str()); + if (file.is_open()) + { + LLSDSerialize::fromXML(data, file); + if (data.isUndefined()) + { + LL_WARNS() << "error loading " << user_filename << LL_ENDL; + } + else + { + LL_INFOS() << "Loaded history file at " << user_filename << LL_ENDL; + sHistorySD = data; + dataloaded = true; + } + } + else + { + LL_INFOS() << "Unable to open history file at " << user_filename << LL_ENDL; + } + return dataloaded; } // static @@ -76,10 +79,10 @@ bool LLURLHistory::saveFile(const std::string& filename) } temp_str += gDirUtilp->getDirDelimiter() + filename; - llofstream out(temp_str); + llofstream out(temp_str.c_str()); if (!out.good()) { - LL_WARNS() << "Unable to open " << filename << " for output." << LL_ENDL; + LL_WARNS() << "Unable to open " << temp_str << " for output." << LL_ENDL; return false; } diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index 8211ce12f6..3a7285974e 100755 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -87,7 +87,7 @@ bool LLUrlWhiteList::load () std::string resolvedFilename = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, mFilename ); // open a file for reading - llifstream file ( resolvedFilename ); + llifstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // add each line in the file to the list @@ -122,7 +122,7 @@ bool LLUrlWhiteList::save () } // open a file for writing - llofstream file ( resolvedFilename ); + llofstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // for each entry we have diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index c758bbcc9e..509227c683 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1278,7 +1278,7 @@ void LLViewerMedia::loadCookieFile() } // open the file for reading - llifstream file(resolved_filename); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL; @@ -1320,7 +1320,7 @@ void LLViewerMedia::saveCookieFile() } // open a file for writing - llofstream file (resolved_filename); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 74b8e693c4..db49fcb0d8 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3001,7 +3001,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); - llifstream ifs(filename_and_local_path); + llifstream ifs(filename_and_local_path.c_str()); if(ifs.good()) { char buffer[MAX_STRING]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 0865d90005..378bb18ecd 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -180,7 +180,7 @@ void LLViewerTextureList::doPrefetchImages() LLSD imagelist; std::string filename = get_texture_list_name(); llifstream file; - file.open(filename); + file.open(filename.c_str()); if (file.is_open()) { if ( ! LLSDSerialize::fromXML(imagelist, file) ) @@ -274,7 +274,7 @@ void LLViewerTextureList::shutdown() { std::string filename = get_texture_list_name(); llofstream file; - file.open(filename); + file.open(filename.c_str()); LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL; LLSDSerialize::toPrettyXML(imagelist, file); } diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 962cdf0268..e24884fe81 100755 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1024,10 +1024,15 @@ void LLSpeakerVolumeStorage::load() LLSD settings_llsd; llifstream file; - file.open(filename); + file.open(filename.c_str()); if (file.is_open()) { - LLSDSerialize::fromXML(settings_llsd, file); + if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXML(settings_llsd, file)) + { + LL_WARNS("Voice") << "failed to parse " << filename << LL_ENDL; + + } + } for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); @@ -1062,7 +1067,7 @@ void LLSpeakerVolumeStorage::save() } llofstream file; - file.open(filename); + file.open(filename.c_str()); LLSDSerialize::toPrettyXML(settings_llsd, file); } } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index c854e1fc66..374792193c 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -150,7 +150,7 @@ void LLWaterParamManager::savePreset(const std::string & name) paramsData = mParamList[name].getAll(); // write to file - llofstream presetsXML(pathName); + llofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index e9b0baf612..88079c5d26 100755 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -109,7 +109,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path) { LL_INFOS("Windlight") << "Loading DayCycle settings from " << file_path << LL_ENDL; - llifstream day_cycle_xml(file_path); + llifstream day_cycle_xml(file_path.c_str()); if (day_cycle_xml.is_open()) { // load and parse it @@ -137,7 +137,7 @@ void LLWLDayCycle::save(const std::string& file_path) { LLSD day_data = asLLSD(); - llofstream day_cycle_xml(file_path); + llofstream day_cycle_xml(file_path.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY); day_cycle_xml.close(); diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 91ea10d43d..2b6d88efef 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -334,7 +334,7 @@ void LLWLParamManager::savePreset(LLWLParamKey key) paramsData = mParamList[key].getAll(); // write to file - llofstream presetsXML(pathName); + llofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); -- cgit v1.2.3 From 8b42c7898ef756a4a81daa08b2a5acce2894f4b8 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 7 Apr 2015 17:59:28 -0400 Subject: replace llifstream and llofstream with std::ifstream and std::ofstream respectively --- indra/newview/llagentpilot.cpp | 8 ++++---- indra/newview/llappviewer.cpp | 12 ++++++------ indra/newview/llautoreplace.cpp | 6 +++--- indra/newview/llavatariconctrl.cpp | 4 ++-- indra/newview/llcommandlineparser.cpp | 2 +- indra/newview/llfavoritesbar.cpp | 14 +++++++------- indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llfloaterabout.cpp | 4 ++-- indra/newview/llfloaterautoreplacesettings.cpp | 4 ++-- indra/newview/llfloatermodelpreview.cpp | 4 ++-- indra/newview/llfloaterspellchecksettings.cpp | 4 ++-- indra/newview/lllocationhistory.cpp | 4 ++-- indra/newview/lllogchat.cpp | 2 +- indra/newview/llnotificationstorage.cpp | 4 ++-- indra/newview/llpanellogin.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 4 ++-- indra/newview/llsearchhistory.cpp | 4 ++-- indra/newview/llsechandler_basic.cpp | 10 +++++----- indra/newview/llsyntaxid.cpp | 4 ++-- indra/newview/llteleporthistorystorage.cpp | 4 ++-- indra/newview/llurlhistory.cpp | 4 ++-- indra/newview/llurlwhitelist.cpp | 4 ++-- indra/newview/llviewermedia.cpp | 4 ++-- indra/newview/llviewernetwork.cpp | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 4 ++-- indra/newview/llvoiceclient.cpp | 4 ++-- indra/newview/llwaterparammanager.cpp | 4 ++-- indra/newview/llwearablelist.cpp | 2 +- indra/newview/llwldaycycle.cpp | 4 ++-- indra/newview/llwlparammanager.cpp | 4 ++-- indra/newview/tests/llsechandler_basic_test.cpp | 4 ++-- indra/newview/tests/llslurl_test.cpp | 6 +++--- indra/newview/tests/llviewernetwork_test.cpp | 4 ++-- 34 files changed, 77 insertions(+), 77 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index cfc445f998..4b3b0e42e0 100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -84,7 +84,7 @@ void LLAgentPilot::loadTxt(const std::string& filename) return; } - llifstream file(filename.c_str()); + std::ifstream file(filename.c_str()); if (!file) { @@ -125,7 +125,7 @@ void LLAgentPilot::loadXML(const std::string& filename) return; } - llifstream file(filename.c_str()); + std::ifstream file(filename.c_str()); if (!file) { @@ -167,7 +167,7 @@ void LLAgentPilot::save() void LLAgentPilot::saveTxt(const std::string& filename) { - llofstream file; + std::ofstream file; file.open(filename.c_str()); if (!file) @@ -190,7 +190,7 @@ void LLAgentPilot::saveTxt(const std::string& filename) void LLAgentPilot::saveXML(const std::string& filename) { - llofstream file; + std::ofstream file; file.open(filename.c_str()); if (!file) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9668da2522..b2c74854ff 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3273,7 +3273,7 @@ void LLAppViewer::writeDebugInfo(bool isStatic) : getDynamicDebugFile() ); LL_INFOS() << "Opening debug file " << *debug_filename << LL_ENDL; - llofstream out_file(debug_filename->c_str()); + std::ofstream out_file(debug_filename->c_str()); isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file) : LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file); @@ -3762,7 +3762,7 @@ void LLAppViewer::handleViewerCrash() { std::string filename; filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log"); - llofstream file(filename.c_str(), std::ios_base::binary); + std::ofstream file(filename.c_str(), std::ios_base::binary); if(file.good()) { LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL; @@ -4650,7 +4650,7 @@ void LLAppViewer::loadNameCache() std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); LL_INFOS("AvNameCache") << filename << LL_ENDL; - llifstream name_cache_stream(filename.c_str()); + std::ifstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { if ( ! LLAvatarNameCache::importFile(name_cache_stream)) @@ -4665,7 +4665,7 @@ void LLAppViewer::loadNameCache() std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - llifstream cache_file(name_cache.c_str()); + std::ifstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { if(gCacheName->importFile(cache_file)) return; @@ -4677,7 +4677,7 @@ void LLAppViewer::saveNameCache() // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); - llofstream name_cache_stream(filename.c_str()); + std::ofstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { LLAvatarNameCache::exportFile(name_cache_stream); @@ -4688,7 +4688,7 @@ void LLAppViewer::saveNameCache() { std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - llofstream cache_file(name_cache.c_str()); + std::ofstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { gCacheName->exportFile(cache_file); diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index dd9354fe3a..62e32eac00 100755 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -148,7 +148,7 @@ void LLAutoReplace::loadFromSettings() if(gDirUtilp->fileExists(filename)) { LLSD userSettings; - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -173,7 +173,7 @@ void LLAutoReplace::loadFromSettings() if(gDirUtilp->fileExists(defaultName)) { LLSD appDefault; - llifstream file; + std::ifstream file; file.open(defaultName.c_str()); if (file.is_open()) { @@ -209,7 +209,7 @@ void LLAutoReplace::loadFromSettings() void LLAutoReplace::saveToUserSettings() { std::string filename=getUserSettingsFileName(); - llofstream file; + std::ofstream file; file.open(filename.c_str()); LLSDSerialize::toPrettyXML(mSettings.asLLSD(), file); file.close(); diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 281e591b48..fd96e65edd 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -76,7 +76,7 @@ void LLAvatarIconIDCache::load () // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); - llifstream file(resolved_filename.c_str()); + std::ifstream file(resolved_filename.c_str()); if (!file.is_open()) return; @@ -114,7 +114,7 @@ void LLAvatarIconIDCache::save () std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); // open a file for writing - llofstream file (resolved_filename.c_str()); + std::ofstream file (resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 1819fc74ee..9d4f7f6dd8 100755 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -621,7 +621,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG // members of a control group. LLSD clpConfigLLSD; - llifstream input_stream; + std::ifstream input_stream; input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary); if(input_stream.is_open()) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index fc9e85caf8..4c8a4ece70 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1469,7 +1469,7 @@ void LLFavoritesOrderStorage::destroyClass() std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); - llifstream file; + std::ifstream file; file.open(old_filename.c_str()); if (file.is_open()) { @@ -1507,7 +1507,7 @@ void LLFavoritesOrderStorage::load() std::string filename = getSavedOrderFileName(); LLSD settings_llsd; - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1541,7 +1541,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() std::string filename = getStoredFavoritesFilename(); if (!filename.empty()) { - llifstream in_file; + std::ifstream in_file; in_file.open(filename.c_str()); LLSD fav_llsd; if (in_file.is_open()) @@ -1588,7 +1588,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() // as we'll compare it with the stored credentials in the login panel. fav_llsd[av_name.getUserName()] = user_llsd; - llofstream file; + std::ofstream file; file.open(filename.c_str()); if ( file.is_open() ) { @@ -1613,7 +1613,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() if (!filename.empty()) { LLSD fav_llsd; - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1630,7 +1630,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() fav_llsd.erase(av_name.getUserName()); } - llofstream out_file; + std::ofstream out_file; out_file.open(filename.c_str()); if ( out_file.is_open() ) { @@ -1686,7 +1686,7 @@ void LLFavoritesOrderStorage::save() settings_llsd[iter->first.asString()] = iter->second; } - llofstream file; + std::ofstream file; file.open(filename.c_str()); if ( file.is_open() ) { diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index ea39f812fd..12afb552eb 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -326,7 +326,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) { LL_INFOS("RenderInit") << "Attempting to parse feature table from " << filename << LL_ENDL; - llifstream file; + std::ifstream file; std::string name; U32 version; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index b342d8fdf3..5529111b7f 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -154,7 +154,7 @@ BOOL LLFloaterAbout::postBuild() // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); - llifstream contrib_file; + std::ifstream contrib_file; std::string contributors; contrib_file.open(contributors_path.c_str()); /* Flawfinder: ignore */ if (contrib_file.is_open()) @@ -172,7 +172,7 @@ BOOL LLFloaterAbout::postBuild() // Get the Versions and Copyrights, created at build time std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt"); - llifstream licenses_file; + std::ifstream licenses_file; licenses_file.open(licenses_path.c_str()); /* Flawfinder: ignore */ if (licenses_file.is_open()) { diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 6e56e929df..a16ecf2a80 100755 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -353,7 +353,7 @@ void LLFloaterAutoReplaceSettings::onImportList() LLFilePicker& picker = LLFilePicker::instance(); if( picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) { - llifstream file; + std::ifstream file; file.open(picker.getFirstFile().c_str()); LLSD newList; if (file.is_open()) @@ -545,7 +545,7 @@ void LLFloaterAutoReplaceSettings::onExportList() LLFilePicker& picker = LLFilePicker::instance(); if( picker.getSaveFile( LLFilePicker::FFSAVE_XML, listFileName) ) { - llofstream file; + std::ofstream file; file.open(picker.getFirstFile().c_str()); LLSDSerialize::toPrettyXML(*list, file); file.close(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index b9113d265a..e3ca48e4ae 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2155,7 +2155,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) S32 file_size = (S32) stat.st_size; - llifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); + std::ifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); LLSD data; LLSDSerialize::fromBinary(data, ifstream, file_size); ifstream.close(); @@ -3513,7 +3513,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw data["instance"][i] = instance.asLLSD(); } - llofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary); + std::ofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary); LLSDSerialize::toBinary(data, out); out.flush(); out.close(); diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 5124dae147..63346f42ef 100755 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -351,7 +351,7 @@ void LLFloaterSpellCheckerImport::onBtnOK() LLSD custom_dict_map; std::string custom_filename(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); - llifstream custom_file_in(custom_filename.c_str()); + std::ifstream custom_file_in(custom_filename.c_str()); if (custom_file_in.is_open()) { LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); @@ -373,7 +373,7 @@ void LLFloaterSpellCheckerImport::onBtnOK() custom_dict_map.append(custom_dict_info); } - llofstream custom_file_out(custom_filename.c_str(), std::ios::trunc); + std::ofstream custom_file_out(custom_filename.c_str(), std::ios::trunc); if (custom_file_out.is_open()) { LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 162d6e003e..57f53bd0d9 100755 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -127,7 +127,7 @@ void LLLocationHistory::save() const } // open a file for writing - llofstream file(resolved_filename.c_str()); + std::ofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -148,7 +148,7 @@ void LLLocationHistory::load() // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); - llifstream file(resolved_filename.c_str()); + std::ifstream file(resolved_filename.c_str()); if (!file.is_open()) { diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 7ddacf3033..8585fa6078 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -302,7 +302,7 @@ void LLLogChat::saveHistory(const std::string& filename, return; } - llofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app); + std::ofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app); if (!file.is_open()) { LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL; diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 3418b33d37..315084788e 100755 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -87,7 +87,7 @@ LLNotificationStorage::~LLNotificationStorage() bool LLNotificationStorage::writeNotifications(const LLSD& pNotificationData) const { - llofstream notifyFile(mFileName.c_str()); + std::ofstream notifyFile(mFileName.c_str()); bool didFileOpen = notifyFile.is_open(); if (!didFileOpen) @@ -113,7 +113,7 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_n pNotificationData.clear(); - llifstream notifyFile(filename.c_str()); + std::ifstream notifyFile(filename.c_str()); didFileRead = notifyFile.is_open(); if (!didFileRead) { diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index cc8c3edd51..8b9cd9c88a 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -307,7 +307,7 @@ void LLPanelLogin::addFavoritesToStartLocation() updateLoginButtons(); LLSD fav_llsd; - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (!file.is_open()) { diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 17c0b226d0..87f27ea8ef 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -162,7 +162,7 @@ BOOL LLPanelMainInventory::postBuild() // Now load the stored settings from disk, if available. std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL; - llifstream file(filterSaveName.c_str()); + std::ifstream file(filterSaveName.c_str()); LLSD savedFilterState; if (file.is_open()) { @@ -243,7 +243,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) } std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); - llofstream filtersFile(filterSaveName.c_str()); + std::ofstream filtersFile(filterSaveName.c_str()); if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) { LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL; diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp index 0ea05a03d6..0bc88590da 100755 --- a/indra/newview/llsearchhistory.cpp +++ b/indra/newview/llsearchhistory.cpp @@ -43,7 +43,7 @@ bool LLSearchHistory::load() { // build filename for each user std::string resolved_filename = getHistoryFilePath(); - llifstream file(resolved_filename.c_str()); + std::ifstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; @@ -76,7 +76,7 @@ bool LLSearchHistory::save() // build filename for each user std::string resolved_filename = getHistoryFilePath(); // open a file for writing - llofstream file(resolved_filename.c_str()); + std::ofstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 40516f9bbb..c904b95666 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -640,7 +640,7 @@ LLBasicCertificateStore::~LLBasicCertificateStore() // persist the store void LLBasicCertificateStore::save() { - llofstream file_store(mFilename.c_str(), std::ios_base::binary); + std::ofstream file_store(mFilename.c_str(), std::ios_base::binary); if(!file_store.fail()) { for(iterator cert = begin(); @@ -1245,8 +1245,8 @@ void LLSecAPIBasicHandler::_readProtectedData() { // attempt to load the file into our map LLPointer<LLSDParser> parser = new LLSDXMLParser(); - llifstream protected_data_stream(mProtectedDataFilename.c_str(), - llifstream::binary); + std::ifstream protected_data_stream(mProtectedDataFilename.c_str(), + std::ifstream::binary); if (!protected_data_stream.fail()) { U8 salt[STORE_SALT_SIZE]; @@ -1330,7 +1330,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() // an error. std::string tmp_filename = mProtectedDataFilename + ".tmp"; - llofstream protected_data_stream(tmp_filename.c_str(), + std::ofstream protected_data_stream(tmp_filename.c_str(), std::ios_base::binary); try { @@ -1568,7 +1568,7 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword() { const S32 HASHED_LENGTH = 32; std::vector<U8> buffer(HASHED_LENGTH); - llifstream password_file(mLegacyPasswordPath.c_str(), llifstream::binary); + std::ifstream password_file(mLegacyPasswordPath.c_str(), std::ifstream::binary); if(password_file.fail()) { diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 802dff1ead..cbbc238b24 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -83,7 +83,7 @@ public: const std::string xml = str.str(); // save the str to disk, usually to the cache. - llofstream file(mFileSpec.c_str(), std::ios_base::out); + std::ofstream file(mFileSpec.c_str(), std::ios_base::out); file.write(xml.c_str(), str.str().size()); file.close(); @@ -268,7 +268,7 @@ void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { LLSD content; - llifstream file; + std::ifstream file; file.open(mFullFileSpec.c_str()); if (file.is_open()) { diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index 8a5704939a..36257c8bf2 100755 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -164,7 +164,7 @@ void LLTeleportHistoryStorage::save() std::string resolvedFilename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for writing - llofstream file(resolvedFilename.c_str()); + std::ofstream file(resolvedFilename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open teleport history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -186,7 +186,7 @@ void LLTeleportHistoryStorage::load() std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for reading - llifstream file(resolved_filename.c_str()); + std::ifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load teleport history from file \"" << mFilename << "\"" << LL_ENDL; diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index f7064e152a..d45891ec45 100755 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -46,7 +46,7 @@ bool LLURLHistory::loadFile(const std::string& filename) std::string user_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); - llifstream file(user_filename.c_str()); + std::ifstream file(user_filename.c_str()); if (file.is_open()) { LLSDSerialize::fromXML(data, file); @@ -79,7 +79,7 @@ bool LLURLHistory::saveFile(const std::string& filename) } temp_str += gDirUtilp->getDirDelimiter() + filename; - llofstream out(temp_str.c_str()); + std::ofstream out(temp_str.c_str()); if (!out.good()) { LL_WARNS() << "Unable to open " << temp_str << " for output." << LL_ENDL; diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index 3a7285974e..c401f86212 100755 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -87,7 +87,7 @@ bool LLUrlWhiteList::load () std::string resolvedFilename = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, mFilename ); // open a file for reading - llifstream file(resolvedFilename.c_str()); + std::ifstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // add each line in the file to the list @@ -122,7 +122,7 @@ bool LLUrlWhiteList::save () } // open a file for writing - llofstream file(resolvedFilename.c_str()); + std::ofstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // for each entry we have diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 509227c683..69b1ee93dc 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1278,7 +1278,7 @@ void LLViewerMedia::loadCookieFile() } // open the file for reading - llifstream file(resolved_filename.c_str()); + std::ifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL; @@ -1320,7 +1320,7 @@ void LLViewerMedia::saveCookieFile() } // open a file for writing - llofstream file(resolved_filename.c_str()); + std::ofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index faa58d423f..0a283efae2 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -135,7 +135,7 @@ void LLGridManager::initialize(const std::string& grid_file) "Aditi"); LLSD other_grids; - llifstream llsd_xml; + std::ifstream llsd_xml; if (!grid_file.empty()) { LL_INFOS("GridManager")<<"Grid configuration file '"<<grid_file<<"'"<<LL_ENDL; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index db49fcb0d8..a2d9e936d5 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3001,7 +3001,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); - llifstream ifs(filename_and_local_path.c_str()); + std::ifstream ifs(filename_and_local_path.c_str()); if(ifs.good()) { char buffer[MAX_STRING]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 378bb18ecd..384589607c 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -179,7 +179,7 @@ void LLViewerTextureList::doPrefetchImages() // Pre-fetch textures from last logout LLSD imagelist; std::string filename = get_texture_list_name(); - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -273,7 +273,7 @@ void LLViewerTextureList::shutdown() if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) { std::string filename = get_texture_list_name(); - llofstream file; + std::ofstream file; file.open(filename.c_str()); LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL; LLSDSerialize::toPrettyXML(imagelist, file); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index e24884fe81..351494aae7 100755 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1023,7 +1023,7 @@ void LLSpeakerVolumeStorage::load() LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; LLSD settings_llsd; - llifstream file; + std::ifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1066,7 +1066,7 @@ void LLSpeakerVolumeStorage::save() settings_llsd[iter->first.asString()] = volume; } - llofstream file; + std::ofstream file; file.open(filename.c_str()); LLSDSerialize::toPrettyXML(settings_llsd, file); } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 374792193c..e0b89e3eb9 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -110,7 +110,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) bool LLWaterParamManager::loadPreset(const std::string& path) { - llifstream xml_file; + std::ifstream xml_file; std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); xml_file.open(path.c_str()); @@ -150,7 +150,7 @@ void LLWaterParamManager::savePreset(const std::string & name) paramsData = mParamList[name].getAll(); // write to file - llofstream presetsXML(pathName.c_str()); + std::ofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index b61fbbd073..b5d22b42a8 100755 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -113,7 +113,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID else if (status >= 0) { // read the file - llifstream ifs(filename, llifstream::binary); + std::ifstream ifs(filename, std::ifstream::binary); if( !ifs.is_open() ) { LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL; diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 88079c5d26..3f5579d0fb 100755 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -109,7 +109,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path) { LL_INFOS("Windlight") << "Loading DayCycle settings from " << file_path << LL_ENDL; - llifstream day_cycle_xml(file_path.c_str()); + std::ifstream day_cycle_xml(file_path.c_str()); if (day_cycle_xml.is_open()) { // load and parse it @@ -137,7 +137,7 @@ void LLWLDayCycle::save(const std::string& file_path) { LLSD day_data = asLLSD(); - llofstream day_cycle_xml(file_path.c_str()); + std::ofstream day_cycle_xml(file_path.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY); day_cycle_xml.close(); diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 2b6d88efef..ed0b733ade 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -293,7 +293,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir) bool LLWLParamManager::loadPreset(const std::string& path) { - llifstream xml_file; + std::ifstream xml_file; std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); xml_file.open(path.c_str()); @@ -334,7 +334,7 @@ void LLWLParamManager::savePreset(LLWLParamKey key) paramsData = mParamList[key].getAll(); // write to file - llofstream presetsXML(pathName.c_str()); + std::ofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index 2a8dc15346..a2f91fa55d 100755 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -585,7 +585,7 @@ namespace tut LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); LLXORCipher cipher2(unique_id, sizeof(unique_id)); cipher2.encrypt((U8*)&decoded_password[0], length); - llofstream password_file("test_password.dat", std::ofstream::binary); + std::ofstream password_file("test_password.dat", std::ofstream::binary); password_file.write(&decoded_password[0], length); password_file.close(); @@ -719,7 +719,7 @@ namespace tut test_store=NULL; // instantiate a cert store from a file - llofstream certstorefile("mycertstore.pem", std::ios::out); + std::ofstream certstorefile("mycertstore.pem", std::ios::out); certstorefile << mPemChildCert << std::endl << mPemTestCert << std::endl; certstorefile.close(); // validate loaded certs diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 2bc0d5a086..272c2d4eb7 100755 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -152,7 +152,7 @@ namespace tut template<> template<> void slurlTestObject::test<1>() { - llofstream gridfile(TEST_FILENAME); + std::ofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -269,7 +269,7 @@ namespace tut template<> template<> void slurlTestObject::test<2>() { - llofstream gridfile(TEST_FILENAME); + std::ofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -302,7 +302,7 @@ namespace tut template<> template<> void slurlTestObject::test<3>() { - llofstream gridfile(TEST_FILENAME); + std::ofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 0eb0ab6500..2b0330a5b3 100755 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -245,7 +245,7 @@ namespace tut template<> template<> void viewerNetworkTestObject::test<2>() { - llofstream gridfile(TEST_FILENAME); + std::ofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -376,7 +376,7 @@ namespace tut void viewerNetworkTestObject::test<7>() { // adding a grid with simply a name will populate the values. - llofstream gridfile(TEST_FILENAME); + std::ofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); -- cgit v1.2.3 From 1abc87139b09d4d333c72eb5ffb576895f1c2a0f Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Wed, 8 Apr 2015 13:00:35 -0400 Subject: fix validity errors in settings files --- indra/newview/app_settings/settings.xml | 3 ++- indra/newview/app_settings/settings_per_account.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 138bdde9e9..408d82ff69 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5019,6 +5019,7 @@ <key>Type</key> <string>LLSD</string> <key>Value</key> + <array/> </map> <key>LSLFindCaseInsensitivity</key> <map> @@ -11774,7 +11775,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <integer>0.0</integer> + <real>0.0</real> </map> <key>TextureFetchSource</key> <map> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index d119504017..c62b45ed81 100755 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -97,7 +97,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>true</integer> + <integer>1</integer> </map> <key>InstantMessageLogPath</key> <map> -- cgit v1.2.3 From 5c6cf3e7fb9f592e3a293921175b64b515bac23f Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Fri, 10 Apr 2015 11:02:37 -0400 Subject: restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes --- indra/newview/llagentpilot.cpp | 8 ++++---- indra/newview/llappviewer.cpp | 12 ++++++------ indra/newview/llautoreplace.cpp | 6 +++--- indra/newview/llavatariconctrl.cpp | 4 ++-- indra/newview/llcommandlineparser.cpp | 2 +- indra/newview/llfavoritesbar.cpp | 14 +++++++------- indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llfloaterabout.cpp | 4 ++-- indra/newview/llfloaterautoreplacesettings.cpp | 4 ++-- indra/newview/llfloatermodelpreview.cpp | 4 ++-- indra/newview/llfloaterspellchecksettings.cpp | 4 ++-- indra/newview/lllocationhistory.cpp | 4 ++-- indra/newview/lllogchat.cpp | 2 +- indra/newview/llnotificationstorage.cpp | 4 ++-- indra/newview/llpanellogin.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 4 ++-- indra/newview/llsearchhistory.cpp | 4 ++-- indra/newview/llsechandler_basic.cpp | 10 +++++----- indra/newview/llsyntaxid.cpp | 4 ++-- indra/newview/llteleporthistorystorage.cpp | 4 ++-- indra/newview/llurlhistory.cpp | 4 ++-- indra/newview/llurlwhitelist.cpp | 4 ++-- indra/newview/llviewermedia.cpp | 4 ++-- indra/newview/llviewernetwork.cpp | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 6 +++--- indra/newview/llvoiceclient.cpp | 4 ++-- indra/newview/llwaterparammanager.cpp | 4 ++-- indra/newview/llwearablelist.cpp | 2 +- indra/newview/llwldaycycle.cpp | 4 ++-- indra/newview/llwlparammanager.cpp | 4 ++-- indra/newview/tests/llsechandler_basic_test.cpp | 4 ++-- indra/newview/tests/llslurl_test.cpp | 6 +++--- indra/newview/tests/llviewernetwork_test.cpp | 4 ++-- 34 files changed, 78 insertions(+), 78 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index 4b3b0e42e0..cfc445f998 100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -84,7 +84,7 @@ void LLAgentPilot::loadTxt(const std::string& filename) return; } - std::ifstream file(filename.c_str()); + llifstream file(filename.c_str()); if (!file) { @@ -125,7 +125,7 @@ void LLAgentPilot::loadXML(const std::string& filename) return; } - std::ifstream file(filename.c_str()); + llifstream file(filename.c_str()); if (!file) { @@ -167,7 +167,7 @@ void LLAgentPilot::save() void LLAgentPilot::saveTxt(const std::string& filename) { - std::ofstream file; + llofstream file; file.open(filename.c_str()); if (!file) @@ -190,7 +190,7 @@ void LLAgentPilot::saveTxt(const std::string& filename) void LLAgentPilot::saveXML(const std::string& filename) { - std::ofstream file; + llofstream file; file.open(filename.c_str()); if (!file) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b2c74854ff..9668da2522 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3273,7 +3273,7 @@ void LLAppViewer::writeDebugInfo(bool isStatic) : getDynamicDebugFile() ); LL_INFOS() << "Opening debug file " << *debug_filename << LL_ENDL; - std::ofstream out_file(debug_filename->c_str()); + llofstream out_file(debug_filename->c_str()); isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file) : LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file); @@ -3762,7 +3762,7 @@ void LLAppViewer::handleViewerCrash() { std::string filename; filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log"); - std::ofstream file(filename.c_str(), std::ios_base::binary); + llofstream file(filename.c_str(), std::ios_base::binary); if(file.good()) { LL_INFOS() << "Handle viewer crash generating stats log." << LL_ENDL; @@ -4650,7 +4650,7 @@ void LLAppViewer::loadNameCache() std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); LL_INFOS("AvNameCache") << filename << LL_ENDL; - std::ifstream name_cache_stream(filename.c_str()); + llifstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { if ( ! LLAvatarNameCache::importFile(name_cache_stream)) @@ -4665,7 +4665,7 @@ void LLAppViewer::loadNameCache() std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - std::ifstream cache_file(name_cache.c_str()); + llifstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { if(gCacheName->importFile(cache_file)) return; @@ -4677,7 +4677,7 @@ void LLAppViewer::saveNameCache() // display names cache std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "avatar_name_cache.xml"); - std::ofstream name_cache_stream(filename.c_str()); + llofstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { LLAvatarNameCache::exportFile(name_cache_stream); @@ -4688,7 +4688,7 @@ void LLAppViewer::saveNameCache() { std::string name_cache; name_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "name.cache"); - std::ofstream cache_file(name_cache.c_str()); + llofstream cache_file(name_cache.c_str()); if(cache_file.is_open()) { gCacheName->exportFile(cache_file); diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index 62e32eac00..dd9354fe3a 100755 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -148,7 +148,7 @@ void LLAutoReplace::loadFromSettings() if(gDirUtilp->fileExists(filename)) { LLSD userSettings; - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -173,7 +173,7 @@ void LLAutoReplace::loadFromSettings() if(gDirUtilp->fileExists(defaultName)) { LLSD appDefault; - std::ifstream file; + llifstream file; file.open(defaultName.c_str()); if (file.is_open()) { @@ -209,7 +209,7 @@ void LLAutoReplace::loadFromSettings() void LLAutoReplace::saveToUserSettings() { std::string filename=getUserSettingsFileName(); - std::ofstream file; + llofstream file; file.open(filename.c_str()); LLSDSerialize::toPrettyXML(mSettings.asLLSD(), file); file.close(); diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index fd96e65edd..281e591b48 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -76,7 +76,7 @@ void LLAvatarIconIDCache::load () // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); - std::ifstream file(resolved_filename.c_str()); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) return; @@ -114,7 +114,7 @@ void LLAvatarIconIDCache::save () std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, mFilename); // open a file for writing - std::ofstream file (resolved_filename.c_str()); + llofstream file (resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open avatar icons cache file\"" << mFilename << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 9d4f7f6dd8..1819fc74ee 100755 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -621,7 +621,7 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG // members of a control group. LLSD clpConfigLLSD; - std::ifstream input_stream; + llifstream input_stream; input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary); if(input_stream.is_open()) diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 4c8a4ece70..fc9e85caf8 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1469,7 +1469,7 @@ void LLFavoritesOrderStorage::destroyClass() std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); - std::ifstream file; + llifstream file; file.open(old_filename.c_str()); if (file.is_open()) { @@ -1507,7 +1507,7 @@ void LLFavoritesOrderStorage::load() std::string filename = getSavedOrderFileName(); LLSD settings_llsd; - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1541,7 +1541,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() std::string filename = getStoredFavoritesFilename(); if (!filename.empty()) { - std::ifstream in_file; + llifstream in_file; in_file.open(filename.c_str()); LLSD fav_llsd; if (in_file.is_open()) @@ -1588,7 +1588,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() // as we'll compare it with the stored credentials in the login panel. fav_llsd[av_name.getUserName()] = user_llsd; - std::ofstream file; + llofstream file; file.open(filename.c_str()); if ( file.is_open() ) { @@ -1613,7 +1613,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() if (!filename.empty()) { LLSD fav_llsd; - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1630,7 +1630,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() fav_llsd.erase(av_name.getUserName()); } - std::ofstream out_file; + llofstream out_file; out_file.open(filename.c_str()); if ( out_file.is_open() ) { @@ -1686,7 +1686,7 @@ void LLFavoritesOrderStorage::save() settings_llsd[iter->first.asString()] = iter->second; } - std::ofstream file; + llofstream file; file.open(filename.c_str()); if ( file.is_open() ) { diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 12afb552eb..ea39f812fd 100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -326,7 +326,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) { LL_INFOS("RenderInit") << "Attempting to parse feature table from " << filename << LL_ENDL; - std::ifstream file; + llifstream file; std::string name; U32 version; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 5529111b7f..b342d8fdf3 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -154,7 +154,7 @@ BOOL LLFloaterAbout::postBuild() // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt"); - std::ifstream contrib_file; + llifstream contrib_file; std::string contributors; contrib_file.open(contributors_path.c_str()); /* Flawfinder: ignore */ if (contrib_file.is_open()) @@ -172,7 +172,7 @@ BOOL LLFloaterAbout::postBuild() // Get the Versions and Copyrights, created at build time std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt"); - std::ifstream licenses_file; + llifstream licenses_file; licenses_file.open(licenses_path.c_str()); /* Flawfinder: ignore */ if (licenses_file.is_open()) { diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index a16ecf2a80..6e56e929df 100755 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -353,7 +353,7 @@ void LLFloaterAutoReplaceSettings::onImportList() LLFilePicker& picker = LLFilePicker::instance(); if( picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) { - std::ifstream file; + llifstream file; file.open(picker.getFirstFile().c_str()); LLSD newList; if (file.is_open()) @@ -545,7 +545,7 @@ void LLFloaterAutoReplaceSettings::onExportList() LLFilePicker& picker = LLFilePicker::instance(); if( picker.getSaveFile( LLFilePicker::FFSAVE_XML, listFileName) ) { - std::ofstream file; + llofstream file; file.open(picker.getFirstFile().c_str()); LLSDSerialize::toPrettyXML(*list, file); file.close(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e3ca48e4ae..b9113d265a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2155,7 +2155,7 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) S32 file_size = (S32) stat.st_size; - std::ifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); + llifstream ifstream(filename.c_str(), std::ifstream::in | std::ifstream::binary); LLSD data; LLSDSerialize::fromBinary(data, ifstream, file_size); ifstream.close(); @@ -3513,7 +3513,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw data["instance"][i] = instance.asLLSD(); } - std::ofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary); + llofstream out(filename.c_str(), std::ios_base::out | std::ios_base::binary); LLSDSerialize::toBinary(data, out); out.flush(); out.close(); diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 63346f42ef..5124dae147 100755 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -351,7 +351,7 @@ void LLFloaterSpellCheckerImport::onBtnOK() LLSD custom_dict_map; std::string custom_filename(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); - std::ifstream custom_file_in(custom_filename.c_str()); + llifstream custom_file_in(custom_filename.c_str()); if (custom_file_in.is_open()) { LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); @@ -373,7 +373,7 @@ void LLFloaterSpellCheckerImport::onBtnOK() custom_dict_map.append(custom_dict_info); } - std::ofstream custom_file_out(custom_filename.c_str(), std::ios::trunc); + llofstream custom_file_out(custom_filename.c_str(), std::ios::trunc); if (custom_file_out.is_open()) { LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 57f53bd0d9..162d6e003e 100755 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -127,7 +127,7 @@ void LLLocationHistory::save() const } // open a file for writing - std::ofstream file(resolved_filename.c_str()); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open location history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -148,7 +148,7 @@ void LLLocationHistory::load() // build filename for each user std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); - std::ifstream file(resolved_filename.c_str()); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 8585fa6078..7ddacf3033 100755 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -302,7 +302,7 @@ void LLLogChat::saveHistory(const std::string& filename, return; } - std::ofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app); + llofstream file(LLLogChat::makeLogFileName(filename).c_str(), std::ios_base::app); if (!file.is_open()) { LL_WARNS() << "Couldn't open chat history log! - " + filename << LL_ENDL; diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 315084788e..3418b33d37 100755 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -87,7 +87,7 @@ LLNotificationStorage::~LLNotificationStorage() bool LLNotificationStorage::writeNotifications(const LLSD& pNotificationData) const { - std::ofstream notifyFile(mFileName.c_str()); + llofstream notifyFile(mFileName.c_str()); bool didFileOpen = notifyFile.is_open(); if (!didFileOpen) @@ -113,7 +113,7 @@ bool LLNotificationStorage::readNotifications(LLSD& pNotificationData, bool is_n pNotificationData.clear(); - std::ifstream notifyFile(filename.c_str()); + llifstream notifyFile(filename.c_str()); didFileRead = notifyFile.is_open(); if (!didFileRead) { diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 8b9cd9c88a..cc8c3edd51 100755 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -307,7 +307,7 @@ void LLPanelLogin::addFavoritesToStartLocation() updateLoginButtons(); LLSD fav_llsd; - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (!file.is_open()) { diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 87f27ea8ef..17c0b226d0 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -162,7 +162,7 @@ BOOL LLPanelMainInventory::postBuild() // Now load the stored settings from disk, if available. std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); LL_INFOS() << "LLPanelMainInventory::init: reading from " << filterSaveName << LL_ENDL; - std::ifstream file(filterSaveName.c_str()); + llifstream file(filterSaveName.c_str()); LLSD savedFilterState; if (file.is_open()) { @@ -243,7 +243,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void ) } std::string filterSaveName(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, FILTERS_FILENAME)); - std::ofstream filtersFile(filterSaveName.c_str()); + llofstream filtersFile(filterSaveName.c_str()); if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) { LL_WARNS() << "Could not write to filters save file " << filterSaveName << LL_ENDL; diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp index 0bc88590da..0ea05a03d6 100755 --- a/indra/newview/llsearchhistory.cpp +++ b/indra/newview/llsearchhistory.cpp @@ -43,7 +43,7 @@ bool LLSearchHistory::load() { // build filename for each user std::string resolved_filename = getHistoryFilePath(); - std::ifstream file(resolved_filename.c_str()); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; @@ -76,7 +76,7 @@ bool LLSearchHistory::save() // build filename for each user std::string resolved_filename = getHistoryFilePath(); // open a file for writing - std::ofstream file(resolved_filename.c_str()); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { return false; diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index c904b95666..40516f9bbb 100755 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -640,7 +640,7 @@ LLBasicCertificateStore::~LLBasicCertificateStore() // persist the store void LLBasicCertificateStore::save() { - std::ofstream file_store(mFilename.c_str(), std::ios_base::binary); + llofstream file_store(mFilename.c_str(), std::ios_base::binary); if(!file_store.fail()) { for(iterator cert = begin(); @@ -1245,8 +1245,8 @@ void LLSecAPIBasicHandler::_readProtectedData() { // attempt to load the file into our map LLPointer<LLSDParser> parser = new LLSDXMLParser(); - std::ifstream protected_data_stream(mProtectedDataFilename.c_str(), - std::ifstream::binary); + llifstream protected_data_stream(mProtectedDataFilename.c_str(), + llifstream::binary); if (!protected_data_stream.fail()) { U8 salt[STORE_SALT_SIZE]; @@ -1330,7 +1330,7 @@ void LLSecAPIBasicHandler::_writeProtectedData() // an error. std::string tmp_filename = mProtectedDataFilename + ".tmp"; - std::ofstream protected_data_stream(tmp_filename.c_str(), + llofstream protected_data_stream(tmp_filename.c_str(), std::ios_base::binary); try { @@ -1568,7 +1568,7 @@ std::string LLSecAPIBasicHandler::_legacyLoadPassword() { const S32 HASHED_LENGTH = 32; std::vector<U8> buffer(HASHED_LENGTH); - std::ifstream password_file(mLegacyPasswordPath.c_str(), std::ifstream::binary); + llifstream password_file(mLegacyPasswordPath.c_str(), llifstream::binary); if(password_file.fail()) { diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index cbbc238b24..802dff1ead 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -83,7 +83,7 @@ public: const std::string xml = str.str(); // save the str to disk, usually to the cache. - std::ofstream file(mFileSpec.c_str(), std::ios_base::out); + llofstream file(mFileSpec.c_str(), std::ios_base::out); file.write(xml.c_str(), str.str().size()); file.close(); @@ -268,7 +268,7 @@ void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { LLSD content; - std::ifstream file; + llifstream file; file.open(mFullFileSpec.c_str()); if (file.is_open()) { diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp index 36257c8bf2..8a5704939a 100755 --- a/indra/newview/llteleporthistorystorage.cpp +++ b/indra/newview/llteleporthistorystorage.cpp @@ -164,7 +164,7 @@ void LLTeleportHistoryStorage::save() std::string resolvedFilename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for writing - std::ofstream file(resolvedFilename.c_str()); + llofstream file(resolvedFilename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open teleport history file \"" << mFilename << "\" for writing" << LL_ENDL; @@ -186,7 +186,7 @@ void LLTeleportHistoryStorage::load() std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, mFilename); // open the history file for reading - std::ifstream file(resolved_filename.c_str()); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load teleport history from file \"" << mFilename << "\"" << LL_ENDL; diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp index d45891ec45..f7064e152a 100755 --- a/indra/newview/llurlhistory.cpp +++ b/indra/newview/llurlhistory.cpp @@ -46,7 +46,7 @@ bool LLURLHistory::loadFile(const std::string& filename) std::string user_filename(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); - std::ifstream file(user_filename.c_str()); + llifstream file(user_filename.c_str()); if (file.is_open()) { LLSDSerialize::fromXML(data, file); @@ -79,7 +79,7 @@ bool LLURLHistory::saveFile(const std::string& filename) } temp_str += gDirUtilp->getDirDelimiter() + filename; - std::ofstream out(temp_str.c_str()); + llofstream out(temp_str.c_str()); if (!out.good()) { LL_WARNS() << "Unable to open " << temp_str << " for output." << LL_ENDL; diff --git a/indra/newview/llurlwhitelist.cpp b/indra/newview/llurlwhitelist.cpp index c401f86212..3a7285974e 100755 --- a/indra/newview/llurlwhitelist.cpp +++ b/indra/newview/llurlwhitelist.cpp @@ -87,7 +87,7 @@ bool LLUrlWhiteList::load () std::string resolvedFilename = gDirUtilp->getExpandedFilename ( LL_PATH_PER_SL_ACCOUNT, mFilename ); // open a file for reading - std::ifstream file(resolvedFilename.c_str()); + llifstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // add each line in the file to the list @@ -122,7 +122,7 @@ bool LLUrlWhiteList::save () } // open a file for writing - std::ofstream file(resolvedFilename.c_str()); + llofstream file(resolvedFilename.c_str()); if ( file.is_open () ) { // for each entry we have diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 69b1ee93dc..509227c683 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1278,7 +1278,7 @@ void LLViewerMedia::loadCookieFile() } // open the file for reading - std::ifstream file(resolved_filename.c_str()); + llifstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << LL_ENDL; @@ -1320,7 +1320,7 @@ void LLViewerMedia::saveCookieFile() } // open a file for writing - std::ofstream file(resolved_filename.c_str()); + llofstream file(resolved_filename.c_str()); if (!file.is_open()) { LL_WARNS() << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << LL_ENDL; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 0a283efae2..faa58d423f 100755 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -135,7 +135,7 @@ void LLGridManager::initialize(const std::string& grid_file) "Aditi"); LLSD other_grids; - std::ifstream llsd_xml; + llifstream llsd_xml; if (!grid_file.empty()) { LL_INFOS("GridManager")<<"Grid configuration file '"<<grid_file<<"'"<<LL_ENDL; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a2d9e936d5..db49fcb0d8 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3001,7 +3001,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); - std::ifstream ifs(filename_and_local_path.c_str()); + llifstream ifs(filename_and_local_path.c_str()); if(ifs.good()) { char buffer[MAX_STRING]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 384589607c..b145d9ea9d 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -179,7 +179,7 @@ void LLViewerTextureList::doPrefetchImages() // Pre-fetch textures from last logout LLSD imagelist; std::string filename = get_texture_list_name(); - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -273,7 +273,7 @@ void LLViewerTextureList::shutdown() if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty()) { std::string filename = get_texture_list_name(); - std::ofstream file; + llofstream file; file.open(filename.c_str()); LL_DEBUGS() << "saving " << imagelist.size() << " image list entries" << LL_ENDL; LLSDSerialize::toPrettyXML(imagelist, file); @@ -459,7 +459,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, // If the image is not found, creates new image and // enqueues a request for transmission - if ((&image_id == NULL) || image_id.isNull()) + if (image_id.isNull()) { return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI)); } diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 351494aae7..e24884fe81 100755 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1023,7 +1023,7 @@ void LLSpeakerVolumeStorage::load() LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; LLSD settings_llsd; - std::ifstream file; + llifstream file; file.open(filename.c_str()); if (file.is_open()) { @@ -1066,7 +1066,7 @@ void LLSpeakerVolumeStorage::save() settings_llsd[iter->first.asString()] = volume; } - std::ofstream file; + llofstream file; file.open(filename.c_str()); LLSDSerialize::toPrettyXML(settings_llsd, file); } diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index e0b89e3eb9..374792193c 100755 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -110,7 +110,7 @@ void LLWaterParamManager::loadPresetsFromDir(const std::string& dir) bool LLWaterParamManager::loadPreset(const std::string& path) { - std::ifstream xml_file; + llifstream xml_file; std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); xml_file.open(path.c_str()); @@ -150,7 +150,7 @@ void LLWaterParamManager::savePreset(const std::string & name) paramsData = mParamList[name].getAll(); // write to file - std::ofstream presetsXML(pathName.c_str()); + llofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index b5d22b42a8..b61fbbd073 100755 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -113,7 +113,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID else if (status >= 0) { // read the file - std::ifstream ifs(filename, std::ifstream::binary); + llifstream ifs(filename, llifstream::binary); if( !ifs.is_open() ) { LL_WARNS("Wearable") << "Bad Wearable Asset: unable to open file: '" << filename << "'" << LL_ENDL; diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 3f5579d0fb..88079c5d26 100755 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -109,7 +109,7 @@ LLSD LLWLDayCycle::loadDayCycleFromPath(const std::string& file_path) { LL_INFOS("Windlight") << "Loading DayCycle settings from " << file_path << LL_ENDL; - std::ifstream day_cycle_xml(file_path.c_str()); + llifstream day_cycle_xml(file_path.c_str()); if (day_cycle_xml.is_open()) { // load and parse it @@ -137,7 +137,7 @@ void LLWLDayCycle::save(const std::string& file_path) { LLSD day_data = asLLSD(); - std::ofstream day_cycle_xml(file_path.c_str()); + llofstream day_cycle_xml(file_path.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(day_data, day_cycle_xml, LLSDFormatter::OPTIONS_PRETTY); day_cycle_xml.close(); diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index ed0b733ade..2b6d88efef 100755 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -293,7 +293,7 @@ void LLWLParamManager::loadPresetsFromDir(const std::string& dir) bool LLWLParamManager::loadPreset(const std::string& path) { - std::ifstream xml_file; + llifstream xml_file; std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); xml_file.open(path.c_str()); @@ -334,7 +334,7 @@ void LLWLParamManager::savePreset(LLWLParamKey key) paramsData = mParamList[key].getAll(); // write to file - std::ofstream presetsXML(pathName.c_str()); + llofstream presetsXML(pathName.c_str()); LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index a2f91fa55d..2a8dc15346 100755 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -585,7 +585,7 @@ namespace tut LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); LLXORCipher cipher2(unique_id, sizeof(unique_id)); cipher2.encrypt((U8*)&decoded_password[0], length); - std::ofstream password_file("test_password.dat", std::ofstream::binary); + llofstream password_file("test_password.dat", std::ofstream::binary); password_file.write(&decoded_password[0], length); password_file.close(); @@ -719,7 +719,7 @@ namespace tut test_store=NULL; // instantiate a cert store from a file - std::ofstream certstorefile("mycertstore.pem", std::ios::out); + llofstream certstorefile("mycertstore.pem", std::ios::out); certstorefile << mPemChildCert << std::endl << mPemTestCert << std::endl; certstorefile.close(); // validate loaded certs diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 272c2d4eb7..2bc0d5a086 100755 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -152,7 +152,7 @@ namespace tut template<> template<> void slurlTestObject::test<1>() { - std::ofstream gridfile(TEST_FILENAME); + llofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -269,7 +269,7 @@ namespace tut template<> template<> void slurlTestObject::test<2>() { - std::ofstream gridfile(TEST_FILENAME); + llofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -302,7 +302,7 @@ namespace tut template<> template<> void slurlTestObject::test<3>() { - std::ofstream gridfile(TEST_FILENAME); + llofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index 2b0330a5b3..0eb0ab6500 100755 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -245,7 +245,7 @@ namespace tut template<> template<> void viewerNetworkTestObject::test<2>() { - std::ofstream gridfile(TEST_FILENAME); + llofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); @@ -376,7 +376,7 @@ namespace tut void viewerNetworkTestObject::test<7>() { // adding a grid with simply a name will populate the values. - std::ofstream gridfile(TEST_FILENAME); + llofstream gridfile(TEST_FILENAME); gridfile << gSampleGridFile; gridfile.close(); -- cgit v1.2.3 From 5a282abe184323643f1a88f2aba662648059b4e2 Mon Sep 17 00:00:00 2001 From: Cinder <cinder@sdf.org> Date: Sat, 11 Apr 2015 15:23:06 -0600 Subject: STORM-2113 - uri parsing cleanup and fixes --- indra/newview/llweb.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 0f0d9ce703..0be6e49834 100755 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -49,7 +49,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llnotificationsutil.h" - +#include "lluriparser.h" #include "uriparser/Uri.h" #include <boost/regex.hpp> @@ -240,19 +240,10 @@ bool LLWeb::useExternalBrowser(const std::string &url) } else if (gSavedSettings.getU32("PreferredBrowserBehavior") == BROWSER_INT_LL_EXT_OTHERS) { - UriParserStateA state; - UriUriA uri; - state.uri = &uri; - - std::string uri_string = url; - uriParseUriA(&state, uri_string.c_str()); - if (uri.hostText.first) - { - S32 length = uri.hostText.afterLast - uri.hostText.first; - std::string buf = uri.hostText.first; - uri_string = buf.substr(0,length); - } - uriFreeUriMembersA(&uri); + LLUriParser up(url); + up.normalize(); + up.extractParts(); + std::string uri_string = up.host(); boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com)$", boost::regex::perl|boost::regex::icase); boost::match_results<std::string::const_iterator> matches; -- cgit v1.2.3 From a647b8f1cbab13f07ea889c80df28414bc906129 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 13 Apr 2015 16:19:04 -0400 Subject: increment viewer version to 3.7.28 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 0bbe2c1160..7c35ff8c4b 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.27 +3.7.28 -- cgit v1.2.3 From 8be5c8eade832796c34f035547cf09095a85d3f4 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 14 Apr 2015 14:10:38 +0300 Subject: MAINT-5090 Remove disabling HTTP Inventory from Viewer --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llinventorymodelbackgroundfetch.cpp | 8 ++------ indra/newview/llviewerregion.cpp | 15 ++++++--------- indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ---------- 4 files changed, 8 insertions(+), 36 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2eb780ec5d..ed2ce6d81a 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14703,17 +14703,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>UseHTTPInventory</key> - <map> - <key>Comment</key> - <string>Allow use of http inventory transfers instead of UDP</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>ClickToWalk</key> <map> <key>Comment</key> diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index f18832fe95..5fc8b1851a 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -351,13 +351,9 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (mBackgroundFetchActive && gAgent.getRegion() && gAgent.getRegion()->capabilitiesReceived()) { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - if (gSavedSettings.getBOOL("UseHTTPInventory")) - { - bulkFetch(); - return; - } + bulkFetch(); -#if 1 +#if 0 //-------------------------------------------------------------------------------- // DEPRECATED OLD CODE // diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7ebe12cc07..ac8cc7bae2 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2728,15 +2728,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("FlickrConnect"); capabilityNames.append("TwitterConnect"); - if (gSavedSettings.getBOOL("UseHTTPInventory")) - { - capabilityNames.append("FetchLib2"); - capabilityNames.append("FetchLibDescendents2"); - capabilityNames.append("FetchInventory2"); - capabilityNames.append("FetchInventoryDescendents2"); - capabilityNames.append("IncrementCOFVersion"); - AISCommand::getCapabilityNames(capabilityNames); - } + capabilityNames.append("FetchLib2"); + capabilityNames.append("FetchLibDescendents2"); + capabilityNames.append("FetchInventory2"); + capabilityNames.append("FetchInventoryDescendents2"); + capabilityNames.append("IncrementCOFVersion"); + AISCommand::getCapabilityNames(capabilityNames); capabilityNames.append("GetDisplayNames"); capabilityNames.append("GetMesh"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 658c716ee7..b75d614dcc 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3590,16 +3590,6 @@ function="ToggleControl" parameter="ImagePipelineUseHTTP" /> </menu_item_check> - <menu_item_check - label="HTTP Inventory" - name="HTTP Inventory"> - <menu_item_check.on_check - function="CheckControl" - parameter="UseHTTPInventory" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="UseHTTPInventory" /> - </menu_item_check> <menu_item_call label="Compress Images" name="Compress Images"> -- cgit v1.2.3 From d6d13e20f3c1238d4110ebfb8b43814df12e1b61 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 14 Apr 2015 14:46:32 -0400 Subject: remove disabled code --- indra/newview/llinventorymodelbackgroundfetch.cpp | 153 ---------------------- 1 file changed, 153 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 5fc8b1851a..c15dab462a 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -352,159 +352,6 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { // If we'll be using the capability, we'll be sending batches and the background thing isn't as important. bulkFetch(); - -#if 0 - //-------------------------------------------------------------------------------- - // DEPRECATED OLD CODE - // - - // No more categories to fetch, stop fetch process. - if (mFetchQueue.empty()) - { - setAllFoldersFetched(); - return; - } - - F32 fast_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.1f); - F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f); - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time) - { - // Double timeouts on failure. - mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); - mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - // fetch is no longer considered "timely" although we will wait for full time-out. - mTimelyFetchPending = FALSE; - } - - while(1) - { - if (mFetchQueue.empty()) - { - break; - } - - if (gDisconnected) - { - // Just bail if we are disconnected. - break; - } - - const FetchQueueInfo info = mFetchQueue.front(); - - if (info.mIsCategory) - { - - LLViewerInventoryCategory* cat = gInventory.getCategory(info.mUUID); - - // Category has been deleted, remove from queue. - if (!cat) - { - mFetchQueue.pop_front(); - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // Category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle. - if (cat->fetch()) - { - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else - { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. - break; - } - } - // Do I have all my children? - else if (gInventory.isCategoryComplete(info.mUUID)) - { - // Finished with this category, remove from queue. - mFetchQueue.pop_front(); - - // Add all children to queue. - LLInventoryModel::cat_array_t* categories; - LLInventoryModel::item_array_t* items; - gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); - for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); - it != categories->end(); - ++it) - { - mFetchQueue.push_back(FetchQueueInfo((*it)->getUUID(),info.mRecursive)); - } - - // We received a response in less than the fast time. - if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) - { - // Shrink timeouts based on success. - mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); - mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); - LL_DEBUGS(LOG_INV) << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; - } - - mTimelyFetchPending = FALSE; - continue; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - // Received first packet, but our num descendants does not match db's num descendants - // so try again later. - mFetchQueue.pop_front(); - - if (mNumFetchRetries++ < MAX_FETCH_RETRIES) - { - // push on back of queue - mFetchQueue.push_back(info); - } - mTimelyFetchPending = FALSE; - mFetchTimer.reset(); - break; - } - - // Not enough time has elapsed to do a new fetch - break; - } - else - { - LLViewerInventoryItem* itemp = gInventory.getItem(info.mUUID); - - mFetchQueue.pop_front(); - if (!itemp) - { - continue; - } - - if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches) - { - itemp->fetchFromServer(); - mFetchTimer.reset(); - mTimelyFetchPending = TRUE; - } - else if (itemp->mIsComplete) - { - mTimelyFetchPending = FALSE; - } - else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) - { - mFetchQueue.push_back(info); - mFetchTimer.reset(); - mTimelyFetchPending = FALSE; - } - // Not enough time has elapsed to do a new fetch - break; - } - } - - // - // DEPRECATED OLD CODE - //-------------------------------------------------------------------------------- -#endif } } -- cgit v1.2.3 From 11ed48abd15d0fcc1e41a9a122a081785d82f917 Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Tue, 14 Apr 2015 21:21:29 +0300 Subject: MAINT-5097 FIXED crash in LLFloaterPay::onGive --- indra/newview/llfloaterpay.cpp | 23 ++++++++++++++++++---- .../newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 172f81d078..31245db344 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -367,7 +367,8 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe LLSelectNode* node = selection->getFirstRootNode(); if (!node) { - //FIXME: notify user object no longer exists + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); floater->closeFloater(); return; } @@ -491,12 +492,22 @@ void LLFloaterPay::onGive(void* data) } if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) { - LLUUID payee_id; - BOOL is_group; + LLUUID payee_id = LLUUID::null; + BOOL is_group = false; if (floater->mObjectSelection.notNull()) { LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); - node->mPermissions->getOwnership(payee_id, is_group); + if (node) + { + node->mPermissions->getOwnership(payee_id, is_group); + } + else + { + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); + floater->closeFloater(); + return; + } } else { @@ -562,6 +573,10 @@ void LLFloaterPay::give(S32 amount) msg->sendReliable( region->getHost() ); } } + else + { + LLNotificationsUtil::add("PayObjectFailed"); + } } else { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 632396d58c..28565a85c6 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5275,6 +5275,17 @@ Warning: The 'Pay object' click action has been set, but it will only yestext="Pay"/> </notification> + <notification + icon="alertmodal.tga" + name="PayObjectFailed" + type="alertmodal"> + Payment failed: object was not found. + <tag>fail</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + <notification icon="alertmodal.tga" name="OpenObjectCannotCopy" -- cgit v1.2.3 From 9dbea04a5023d33ebac66463dd51b7050b7f41ab Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Tue, 14 Apr 2015 17:14:34 -0400 Subject: remove dead member variables --- indra/newview/llinventorymodelbackgroundfetch.cpp | 7 +------ indra/newview/llinventorymodelbackgroundfetch.h | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index c15dab462a..40edb13a80 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -181,8 +181,6 @@ private: }; -const S32 MAX_FETCH_RETRIES = 10; - const char * const LOG_INV("Inventory"); } // end of namespace anonymous @@ -199,10 +197,7 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch(): mAllFoldersFetched(FALSE), mRecursiveInventoryFetchStarted(FALSE), mRecursiveLibraryFetchStarted(FALSE), - mNumFetchRetries(0), - mMinTimeBetweenFetches(0.3f), - mMaxTimeBetweenFetches(10.f), - mTimelyFetchPending(FALSE) + mMinTimeBetweenFetches(0.3f) {} LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 2139f85519..19fbfc2ed3 100755 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -87,12 +87,9 @@ private: BOOL mBackgroundFetchActive; bool mFolderFetchActive; S32 mFetchCount; - BOOL mTimelyFetchPending; - S32 mNumFetchRetries; LLFrameTimer mFetchTimer; F32 mMinTimeBetweenFetches; - F32 mMaxTimeBetweenFetches; struct FetchQueueInfo { -- cgit v1.2.3