diff --git a/.hgtags b/.hgtags index a3c18ef22f..cd0c4c5af0 100755 --- a/.hgtags +++ b/.hgtags @@ -559,3 +559,5 @@ b280a1c797a3891e68dbc237e73de9cf19f426e9 4.1.1-release bfbba2244320dc2ae47758cd7edd8fa3b67dc756 4.1.2-release b41e1e7c7876f7656c505f552b5888b4e478f92b 5.0.0-release c9ce2295012995e3cf5c57bcffcb4870b94c649f 5.0.1-release +cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release +02c24e9f4f7d8aa0de75f27817dda098582f4936 5.0.3-release diff --git a/autobuild.xml b/autobuild.xml index 78235a2331..d62c9e1c1f 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1847,9 +1847,9 @@ archive hash - 96d11160278115f6d468171f67aa7a4e + 1c4e11f6ca7cdc2a3e5158eda7a432be url - file:///opt/firestorm/kdu-7.9.0-linux-201701222135-r58.tar.bz2 + file:///opt/firestorm/kdu-7.9.1-linux-201703182157.tar.bz2 name linux @@ -1871,9 +1871,9 @@ archive hash - 26cc3fbe6a3b9885d697aa639d17a20a + adeb9db4d4435a65c44a72f981a18b33 url - file:///c:/cygwin/opt/firestorm/kdu-7.9.0-windows-201701221929-r58.tar.bz2 + file:///c:/cygwin/opt/firestorm/kdu-7.9.1-windows-201703182143-r61.tar.bz2 name windows diff --git a/doc/contributions.txt b/doc/contributions.txt index ef63ed5308..d6f84959cc 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -216,6 +216,7 @@ Ansariel Hiller STORM-2141 MAINT-6953 MAINT-7028 + MAINT-7059 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index edc4b3286a..b6a4335890 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -180,7 +180,7 @@ if (DARWIN) # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. ## Really?? On developer machines too? ##set(ENABLE_SIGNING TRUE) -##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") +##set(SIGNING_IDENTITY "Developer ID Application: Phoenix Firestorm Project, Inc., The"") endif (DARWIN) diff --git a/indra/llimagej2coj/llimagej2coj2.cpp b/indra/llimagej2coj/llimagej2coj2.cpp index 437ea88c94..c3f7f3d9bc 100644 --- a/indra/llimagej2coj/llimagej2coj2.cpp +++ b/indra/llimagej2coj/llimagej2coj2.cpp @@ -33,6 +33,7 @@ #include "lltimer.h" //#include "llmemory.h" +#define OPENJPEG_VERSION "2.1" // This actually needs to be in openjpeg.h struct ndUserdata { @@ -126,23 +127,16 @@ OPJ_BOOL nd_opj_stream_seek_fn(OPJ_OFF_T p_nb_bytes, void * p_user_data) return OPJ_TRUE; } -const char* fallbackEngineInfoLLImageJ2CImpl() -{ - static std::string version_string = - std::string("OpenJPEG: 2.1, Runtime: ") - + opj_version(); - return version_string.c_str(); -} - +// Factory function: see declaration in llimagej2c.cpp LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl() { return new LLImageJ2COJ(); } -void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl) +std::string LLImageJ2COJ::getEngineInfo() const { - delete impl; - impl = NULL; + return std::string("OpenJPEG: " OPENJPEG_VERSION ", Runtime: ") + + opj_version(); } // Return string from message, eliminating final \n if present @@ -200,19 +194,19 @@ LLImageJ2COJ::~LLImageJ2COJ() { } -BOOL LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region) +bool LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level, int* region) { // No specific implementation for this method in the OpenJpeg case - return FALSE; + return false; } -BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) +bool LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { // No specific implementation for this method in the OpenJpeg case - return FALSE; + return false; } -BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) +bool LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) { // texture comment metadata reader U8* c_data = base.getData(); @@ -304,7 +298,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod opj_image_destroy(image); } - return TRUE; // done + return true; // done } // sometimes we get bad data out of the cache - check to see if the decode succeeded @@ -314,8 +308,8 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod { // if we didn't get the discard level we're expecting, fail opj_image_destroy(image); - base.mDecoding = FALSE; - return TRUE; + base.mDecoding = false; + return true; } } @@ -327,7 +321,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod opj_image_destroy(image); } - return TRUE; + return true; } // Copy image data into our raw image format (instead of the separate channel format @@ -351,6 +345,16 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod raw_image.resize(width, height, channels); U8 *rawp = raw_image.getData(); + // Port fix for MAINT-4327/MAINT-6584 to OpenJPEG decoder + if (!rawp) + { + base.setLastError("Memory error"); + base.decodeFailed(); + opj_image_destroy(image); + return true; // done + } + // + // first_channel is what channel to start copying from // dest is what channel to copy to. first_channel comes from the // argument, dest always starts writing at channel zero. @@ -374,18 +378,18 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod LL_DEBUGS("Texture") << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << LL_ENDL; opj_image_destroy(image); - return TRUE; // done + return true; // done } } /* free image data structure */ opj_image_destroy(image); - return TRUE; // done + return true; // done } -BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible) +bool LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, bool reversible) { const S32 MAX_COMPS = 5; opj_cparameters_t parameters; /* compression parameters */ @@ -495,7 +499,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con if (!bSuccess) { LL_DEBUGS("Texture") << "Failed to encode image." << LL_ENDL; - return FALSE; + return false; } codestream_length = pStreamdata->mOutput.size(); @@ -513,7 +517,7 @@ BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, con /* free image data */ opj_image_destroy(image); - return TRUE; + return true; } inline S32 extractLong4( U8 const *aBuffer, int nOffset ) @@ -573,7 +577,7 @@ bool getMetadataFast( LLImageJ2C &aImage, S32 &aW, S32 &aH, S32 &aComps ) return true; } -BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base) +bool LLImageJ2COJ::getMetadata(LLImageJ2C &base) { // // FIXME: We get metadata by decoding the ENTIRE image. @@ -589,7 +593,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base) if ( getMetadataFast( base, width, height, img_components ) ) { base.setSize(width, height, img_components); - return TRUE; + return true; } // Do it the old and slow way, decode the image with openjpeg @@ -634,7 +638,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base) if(!image) { LL_WARNS() << "ERROR -> getMetadata: failed to decode image!" << LL_ENDL; - return FALSE; + return false; } // Copy image data into our raw image format (instead of the separate channel format @@ -647,5 +651,5 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base) /* free image data structure */ opj_image_destroy(image); - return TRUE; + return true; } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index a8712e28a6..bf282693b9 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -3767,10 +3767,46 @@ void LLVolume::generateSilhouetteVertices(std::vector &vertices, continue; } - if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) { + if (face.mTypeMask & (LLVolumeFace::CAP_MASK)) + { + LLVector4a* v = (LLVector4a*)face.mPositions; + LLVector4a* n = (LLVector4a*)face.mNormals; + + for (U32 j = 0; j < face.mNumIndices / 3; j++) + { + for (S32 k = 0; k < 3; k++) + { + S32 index = face.mEdge[j * 3 + k]; + + if (index == -1) + { + // silhouette edge, currently only cubes, so no other conditions + + S32 v1 = face.mIndices[j * 3 + k]; + S32 v2 = face.mIndices[j * 3 + ((k + 1) % 3)]; + + LLVector4a t; + mat.affineTransform(v[v1], t); + vertices.push_back(LLVector3(t[0], t[1], t[2])); + + norm_mat.rotate(n[v1], t); + + t.normalize3fast(); + normals.push_back(LLVector3(t[0], t[1], t[2])); + + mat.affineTransform(v[v2], t); + vertices.push_back(LLVector3(t[0], t[1], t[2])); + + norm_mat.rotate(n[v2], t); + t.normalize3fast(); + normals.push_back(LLVector3(t[0], t[1], t[2])); + } + } + } } - else { + else + { //============================================== //DEBUG draw edge map instead of silhouette edge @@ -5629,10 +5665,17 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) if (!partial_build) { resizeIndices(grid_size*grid_size*6); + if (!volume->isMeshAssetLoaded()) + { + mEdge.resize(grid_size*grid_size * 6); + } U16* out = mIndices; S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0}; + + int cur_edge = 0; + for(S32 gx = 0;gx=0;i--) { *out++ = ((gy*(grid_size+1))+gx+idxs[i]); - } + } + + S32 edge_value = grid_size * 2 * gy + gx * 2; + + if (gx > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; // Mark face to higlight it + } + + if (gy < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; + + if (gx < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gy > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; } else { @@ -5651,8 +5736,50 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) { *out++ = ((gy*(grid_size+1))+gx+idxs[i]); } + + S32 edge_value = grid_size * 2 * gy + gx * 2; + + if (gy > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gx < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; + + if (gy < grid_size - 1) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + if (gx > 0) + { + mEdge[cur_edge++] = edge_value; + } + else + { + mEdge[cur_edge++] = -1; + } + + mEdge[cur_edge++] = edge_value; } - } + } } } diff --git a/indra/llmessage/llavatarname.cpp b/indra/llmessage/llavatarname.cpp index 94441136e3..89ad051276 100644 --- a/indra/llmessage/llavatarname.cpp +++ b/indra/llmessage/llavatarname.cpp @@ -173,10 +173,10 @@ void LLAvatarName::setExpires(F64 expires) mExpires = LLFrameTimer::getTotalSeconds() + expires; } -std::string LLAvatarName::getCompleteName(bool use_parentheses) const +std::string LLAvatarName::getCompleteName(bool use_parentheses, bool force_use_complete_name) const { std::string name; - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_complete_name) { if (mUsername.empty() || mIsDisplayNameDefault) { @@ -219,7 +219,7 @@ std::string LLAvatarName::getCompleteName(bool use_parentheses) const else { name = mDisplayName; - if(sUseUsernames) + if(sUseUsernames || force_use_complete_name) { if(use_parentheses) { @@ -257,9 +257,9 @@ std::string LLAvatarName::getLegacyName() const return name; } -std::string LLAvatarName::getDisplayName() const +std::string LLAvatarName::getDisplayName(bool force_use_display_name) const { - if (sUseDisplayNames) + if (sUseDisplayNames || force_use_display_name) { return mDisplayName; } diff --git a/indra/llmessage/llavatarname.h b/indra/llmessage/llavatarname.h index 1686fd676b..8ebfa9474c 100644 --- a/indra/llmessage/llavatarname.h +++ b/indra/llmessage/llavatarname.h @@ -73,7 +73,7 @@ public: // For normal names, returns "James Linden (james.linden)" // When display names are disabled returns just "James Linden" - std::string getCompleteName(bool use_parentheses = true) const; + std::string getCompleteName(bool use_parentheses = true, bool force_use_complete_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" for backwards // compatibility with systems like voice and muting @@ -83,7 +83,7 @@ public: // "José Sanchez" or "James Linden", UTF-8 encoded Unicode // Takes the display name preference into account. This is truly the name that should // be used for all UI where an avatar name has to be used unless we truly want something else (rare) - std::string getDisplayName() const; + std::string getDisplayName(bool force_use_display_name = false) const; // Returns "James Linden" or "bobsmith123 Resident" // Used where we explicitely prefer or need a non UTF-8 legacy (ASCII) name diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index ef2e6af9fb..8bb6673351 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1752,6 +1752,7 @@ LLMenuGL::LLMenuGL(const LLMenuGL::Params& p) mJumpKey(p.jump_key), mCreateJumpKeys(p.create_jump_keys), mNeedsArrange(FALSE), + mAlwaysShowMenu(FALSE), mResetScrollPositionOnShow(true), mShortcutPad(p.shortcut_pad) { @@ -3245,20 +3246,23 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) menu->setVisible( TRUE ); - //Do not show menu if all menu items are disabled - BOOL item_enabled = false; - for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); - itor != menu->getChildList()->end(); - ++itor) + if(!menu->getAlwaysShowMenu()) { - LLView *menu_item = (*itor); - item_enabled = item_enabled || menu_item->getEnabled(); - } + //Do not show menu if all menu items are disabled + BOOL item_enabled = false; + for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin(); + itor != menu->getChildList()->end(); + ++itor) + { + LLView *menu_item = (*itor); + item_enabled = item_enabled || menu_item->getEnabled(); + } - if(!item_enabled) - { - menu->setVisible( FALSE ); - return; + if(!item_enabled) + { + menu->setVisible( FALSE ); + return; + } } // Save click point for detecting cursor moves before mouse-up. diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index d5a356ba09..c6c2ad2380 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -535,6 +535,9 @@ public: void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; } bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; } + void setAlwaysShowMenu(BOOL show) { mAlwaysShowMenu = show; } + BOOL getAlwaysShowMenu() { return mAlwaysShowMenu; } + // add a context menu branch BOOL appendContextSubMenu(LLMenuGL *menu); @@ -576,6 +579,8 @@ private: static LLColor4 sDefaultBackgroundColor; static BOOL sKeyboardMode; + BOOL mAlwaysShowMenu; + LLUIColor mBackgroundColor; BOOL mBgVisible; LLHandle mParentMenuItem; diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 8cf72928ff..2c7e7ab13d 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -54,6 +54,7 @@ public: /*virtual*/ void setValue(const LLSD& value); /*virtual*/ BOOL postBuild(); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); LLSD getPayload() { return mPayload; } @@ -224,6 +225,22 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return TRUE; } +void LLRadioGroup::focusSelectedRadioBtn() +{ + if (mSelectedIndex >= 0) + { + LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex]; + if (radio_item->hasTabStop() && radio_item->getEnabled()) + { + radio_item->focusFirstItem(FALSE, FALSE); + } + } + else if (mRadioButtons[0]->hasTabStop() || hasTabStop()) + { + focusFirstItem(FALSE, FALSE); + } +} + BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; @@ -283,19 +300,6 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) return handled; } -BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask) -{ - // grab focus preemptively, before child button takes mousecapture - // - if (hasTabStop()) - { - focusFirstItem(FALSE, FALSE); - } - - return LLUICtrl::handleMouseDown(x, y, mask); -} - - // Handle one button being clicked. All child buttons must have this // function as their callback function. @@ -466,6 +470,29 @@ BOOL LLRadioCtrl::postBuild() return TRUE; } +BOOL LLRadioCtrl::handleMouseDown(S32 x, S32 y, MASK mask) +{ + // Grab focus preemptively, before button takes mousecapture + if (hasTabStop() && getEnabled()) + { + focusFirstItem(FALSE, FALSE); + } + else + { + // Only currently selected item in group has tab stop as result it is + // unclear how focus should behave on click, just let the group handle + // focus and LLRadioGroup::onClickButton() will set correct state later + // if needed + LLRadioGroup* parent = (LLRadioGroup*)getParent(); + if (parent) + { + parent->focusSelectedRadioBtn(); + } + } + + return LLCheckBoxCtrl::handleMouseDown(x, y, mask); +} + LLRadioCtrl::~LLRadioCtrl() { } diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h index 8bd5698538..dcb2f43bfe 100644 --- a/indra/llui/llradiogroup.h +++ b/indra/llui/llradiogroup.h @@ -66,8 +66,6 @@ public: virtual BOOL postBuild(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask); void setIndexEnabled(S32 index, BOOL enabled); @@ -75,6 +73,8 @@ public: S32 getSelectedIndex() const { return mSelectedIndex; } // set the index value programatically BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE); + // foxus child by index if it can get focus + void focusSelectedRadioBtn(); // Accept and retrieve strings of the radio group control names virtual void setValue(const LLSD& value ); diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index a3680d050e..3587c6980e 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -161,7 +161,7 @@ void LLSpellChecker::refreshDictionaryMap() } // Load user installed dictionary information - user_filename = user_path + DICT_FILE_USER; // FIRE-20725: Import of custom spellcheck dictionary doesn't work + user_filename = user_path + DICT_FILE_USER; llifstream custom_file(user_filename.c_str(), std::ios::binary); if (custom_file.is_open()) { diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 44edfb53e3..5b5cfc9d70 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -214,6 +214,7 @@ LLTabContainer::Params::Params() label_pad_left("label_pad_left"), tab_position("tab_position"), hide_tabs("hide_tabs", false), + hide_scroll_arrows("hide_scroll_arrows", false), // [SL:KB] - Patch: UI-TabRearrange | Checked: 2010-06-05 (Catznip-3.3) tab_allow_rearrange("tab_allow_rearrange", false), // [/SL:KB] @@ -252,6 +253,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mPrevArrowBtn(NULL), mNextArrowBtn(NULL), mIsVertical( p.tab_position == LEFT ), + mHideScrollArrows(p.hide_scroll_arrows), // Horizontal Specific mJumpPrevArrowBtn(NULL), mJumpNextArrowBtn(NULL), @@ -460,7 +462,7 @@ void LLTabContainer::draw() // [/SL:KB] // setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLSmoothInterpolation::getInterpolant(0.08f))); - BOOL has_scroll_arrows = !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); + BOOL has_scroll_arrows = !mHideScrollArrows && !getTabsHidden() && ((mMaxScrollPos > 0) || (mScrollPosPixels > 0)); if (!mIsVertical) { mJumpPrevArrowBtn->setVisible( has_scroll_arrows ); @@ -585,7 +587,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) { static LLUICachedControl tabcntrv_pad ("UITabCntrvPad", 0); BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); if (has_scroll_arrows) { @@ -668,7 +670,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) { BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); if (has_scroll_arrows) { @@ -710,7 +712,7 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) { BOOL handled = FALSE; - BOOL has_scroll_arrows = (getMaxScrollPos() > 0) && !getTabsHidden(); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0) && !getTabsHidden(); S32 local_x = x - getRect().mLeft; S32 local_y = y - getRect().mBottom; @@ -808,7 +810,7 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, MASK mask) { LLTabTuple* firsttuple = getTab(0); - BOOL has_scroll_arrows = (getMaxScrollPos() > 0); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); LLRect clip; if (mIsVertical) { @@ -971,7 +973,7 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) // virtual BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void* cargo_data, EAcceptance *accept, std::string &tooltip) { - BOOL has_scroll_arrows = (getMaxScrollPos() > 0); + BOOL has_scroll_arrows = !mHideScrollArrows && (getMaxScrollPos() > 0); if(mOpenTabsOnDragAndDrop && !getTabsHidden()) { @@ -1733,7 +1735,7 @@ BOOL LLTabContainer::setTab(S32 which) // is_visible = FALSE; // } } - else if (getMaxScrollPos() > 0) + else if (!mHideScrollArrows && getMaxScrollPos() > 0) { if( i < getScrollPos() ) { diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 7597033dc7..a783a9894c 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -89,6 +89,7 @@ public: label_pad_left; Optional hide_tabs; + Optional hide_scroll_arrows; // [SL:KB] - Patch: UI-TabRearrange | Checked: 2010-06-05 (Catznip-3.3) Optional tab_allow_rearrange; // [/SL:KB] @@ -290,6 +291,7 @@ private: S32 mCurrentTabIdx; BOOL mTabsHidden; + BOOL mHideScrollArrows; // [SL:KB] - Patch: UI-TabRearrange | Checked: 2012-05-05 (Catznip-3.3) bool mAllowRearrange; tab_rearrange_signal_t* mRearrangeSignal; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 57b0e2af77..b1959c7be4 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1634,6 +1634,7 @@ void LLTextBase::reflow() } S32 line_height = 0; + S32 seg_line_offset = line_count + 1; while(seg_iter != mSegments.end()) { @@ -1646,7 +1647,8 @@ void LLTextBase::reflow() S32 character_count = segment->getNumChars(getWordWrap() ? llmax(0, remaining_pixels) : S32_MAX, seg_offset, cur_index - line_start_index, - S32_MAX); + S32_MAX, + line_count - seg_line_offset); S32 segment_width, segment_height; bool force_newline = segment->getDimensions(seg_offset, character_count, segment_width, segment_height); @@ -1709,6 +1711,7 @@ void LLTextBase::reflow() } ++seg_iter; seg_offset = 0; + seg_line_offset = force_newline ? line_count + 1 : line_count; } if (force_newline) { @@ -3303,7 +3306,7 @@ LLTextSegment::~LLTextSegment() bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { width = 0; height = 0; return false;} S32 LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; } -S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return 0; } +S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 0; } void LLTextSegment::updateLayout(const LLTextBase& editor) {} F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect) { return draw_rect.mLeft; } bool LLTextSegment::canEdit() const { return false; } @@ -3573,7 +3576,7 @@ S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, round); } -S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { const LLWString &text = getWText(); @@ -3595,7 +3598,7 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin // if no character yet displayed on this line, don't require word wrapping since // we can just move to the next line, otherwise insist on it so we make forward progress - LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) + LLFontGL::EWordWrapStyle word_wrap_style = (line_offset == 0) ? LLFontGL::WORD_BOUNDARY_IF_POSSIBLE : LLFontGL::ONLY_WORD_BOUNDARIES; @@ -3741,12 +3744,26 @@ LLInlineViewSegment::~LLInlineViewSegment() bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - if (first_char == 0 && num_chars == 0) + if (first_char == 0 && num_chars == 0) { - // we didn't fit on a line, the widget will fall on the next line - // so dimensions here are 0 + // We didn't fit on a line or were forced to new string + // the widget will fall on the next line, so width here is 0 width = 0; - height = 0; + + if (mForceNewLine) + { + // Chat, string can't be smaller then font height even if it is empty + LLStyleSP s(new LLStyle(LLStyle::Params().visible(true))); + height = s->getFont()->getLineHeight(); + + return true; // new line + } + else + { + // height from previous segment in same string will be used, word-wrap + height = 0; + } + } else { @@ -3757,13 +3774,16 @@ bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt return false; } -S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // if putting a widget anywhere but at the beginning of a line // and the widget doesn't fit or mForceNewLine is true // then return 0 chars for that line, and all characters for the next - if (line_offset != 0 - && (mForceNewLine || num_pixels < mView->getRect().getWidth())) + if (mForceNewLine && line_ind == 0) + { + return 0; + } + else if (line_offset != 0 && num_pixels < mView->getRect().getWidth()) { return 0; } @@ -3816,7 +3836,7 @@ bool LLLineBreakTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& w return true; } -S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLLineBreakTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 1; } @@ -3852,7 +3872,7 @@ bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width return false; } -S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const +S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { LLUIImagePtr image = mStyle->getImage(); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 98a47e1de6..0b8a80fbda 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -64,7 +64,19 @@ public: virtual bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; - virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + + /** + * Get number of chars that fit into free part of current line. + * + * @param num_pixels - maximum width of rect + * @param segment_offset - symbol in segment we start processing line from + * @param line_offset - symbol in line after which segment starts + * @param max_chars - limit of symbols that will fit in current line + * @param line_ind - index of not word-wrapped string inside segment for multi-line segments. + * Two string separated by word-wrap will have same index. + * @return number of chars that will fit into current line + */ + virtual S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; virtual void updateLayout(const class LLTextBase& editor); virtual F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); virtual bool canEdit() const; @@ -116,7 +128,7 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ bool canEdit() const { return true; } /*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); } @@ -201,7 +213,7 @@ public: LLInlineViewSegment(const Params& p, S32 start, S32 end); ~LLInlineViewSegment(); /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; /*virtual*/ void updateLayout(const class LLTextBase& editor); /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ bool canEdit() const { return false; } @@ -225,7 +237,7 @@ public: LLLineBreakTextSegment(S32 pos); ~LLLineBreakTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); private: @@ -238,7 +250,7 @@ public: LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor); ~LLImageTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; - S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; + S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 char_offset, S32 max_chars, S32 line_ind) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 607da82828..2660d3854d 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -865,7 +865,23 @@ LLUrlEntryAgentCompleteName::LLUrlEntryAgentCompleteName() std::string LLUrlEntryAgentCompleteName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getCompleteName(); + return avatar_name.getCompleteName(true, true); +} + +// +// LLUrlEntryAgentLegacyName describes a Second Life agent legacy name Url, e.g., +// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/legacyname +// +LLUrlEntryAgentLegacyName::LLUrlEntryAgentLegacyName() +{ + mPattern = boost::regex(APP_HEADER_REGEX "/agent/[\\da-f-]+/legacyname", + boost::regex::perl|boost::regex::icase); +} + +std::string LLUrlEntryAgentLegacyName::getName(const LLAvatarName& avatar_name) +{ + return avatar_name.getLegacyName(); } // @@ -881,7 +897,7 @@ LLUrlEntryAgentDisplayName::LLUrlEntryAgentDisplayName() std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getDisplayName(); + return avatar_name.getDisplayName(true); } // diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 7d0af09dbd..49205e3181 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -312,6 +312,14 @@ private: /*virtual*/ std::string getName(const LLAvatarName& avatar_name); }; +class LLUrlEntryAgentLegacyName : public LLUrlEntryAgentName +{ +public: + LLUrlEntryAgentLegacyName(); +private: + /*virtual*/ std::string getName(const LLAvatarName& avatar_name); +}; + /// /// LLUrlEntryAgentDisplayName Describes a Second Life agent display name Url, e.g., /// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/displayname diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 5b77384509..6eaeaaf110 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -41,7 +41,7 @@ LLUrlRegistry::LLUrlRegistry() { // mUrlEntry.reserve(20); // [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a - mUrlEntry.reserve(26); + mUrlEntry.reserve(27); // [/RLVa:KB] // Urls are matched in the order that they were registered @@ -65,6 +65,7 @@ LLUrlRegistry::LLUrlRegistry() mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); registerUrl(mUrlEntryHTTPLabel); registerUrl(new LLUrlEntryAgentCompleteName()); + registerUrl(new LLUrlEntryAgentLegacyName()); registerUrl(new LLUrlEntryAgentDisplayName()); registerUrl(new LLUrlEntryAgentUserName()); // [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Added: RLVa-1.2.2a diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index a1ef0cae18..2d6c0bcf19 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -5.0.2 +5.0.4 diff --git a/indra/newview/app_settings/graphic_preset_controls.xml b/indra/newview/app_settings/graphic_preset_controls.xml index 33691c970c..39f4f908b5 100644 --- a/indra/newview/app_settings/graphic_preset_controls.xml +++ b/indra/newview/app_settings/graphic_preset_controls.xml @@ -1,7 +1,6 @@ AgentPause - CameraAspectRatio CameraDoFResScale CameraFieldOfView CameraFocalLength diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2d637d073c..5e9eec37a8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -702,13 +702,13 @@ ScriptDialogsPosition Comment - Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right, 0 = follow legacy ShowScriptDialogsTopRight + Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right Persist 1 Type S32 Value - 0 + 3 DialogStackIconVisible @@ -723,19 +723,6 @@ 0 - - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen (OBSOLETE, see ScriptDialogsPosition). - Persist - 1 - Type - Boolean - Value - 1 - - ShowGroupNoticesTopRight Comment @@ -3091,18 +3078,6 @@ 60.0 - CameraAspectRatio - - Comment - Camera aspect ratio for DoF effect - Persist - 1 - Type - F32 - Value - 1.5 - - CertStore Comment @@ -7616,7 +7591,7 @@ LeftClickShowMenu Comment - Left click opens pie menu (FALSE = left click touches or grabs object) + Unused obsolete setting Persist 1 Type @@ -21989,7 +21964,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 1.0 + 0.0 SanityCheckType LessThanEquals SanityValue @@ -22008,7 +21983,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 1.0 + 2.0 FSRenderVignette diff --git a/indra/newview/app_settings/settings_firestorm.xml b/indra/newview/app_settings/settings_firestorm.xml index c99234c98f..7155de5791 100644 --- a/indra/newview/app_settings/settings_firestorm.xml +++ b/indra/newview/app_settings/settings_firestorm.xml @@ -183,18 +183,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_hybrid.xml b/indra/newview/app_settings/settings_hybrid.xml index c7bc2f0c79..d276eea8ae 100644 --- a/indra/newview/app_settings/settings_hybrid.xml +++ b/indra/newview/app_settings/settings_hybrid.xml @@ -159,18 +159,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index bebc681b1e..11264d36b0 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -610,6 +610,50 @@ Value 1 + ModelUploadFolder + + Comment + All model uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + TextureUploadFolder + + Comment + All image(texture) uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + SoundUploadFolder + + Comment + All sound uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + + AnimationUploadFolder + + Comment + All animation uploads will be stored in this directory (UUID) + Persist + 1 + Type + String + Value + + DebugLookAt diff --git a/indra/newview/app_settings/settings_phoenix.xml b/indra/newview/app_settings/settings_phoenix.xml index b94bfc33b3..08180920ef 100644 --- a/indra/newview/app_settings/settings_phoenix.xml +++ b/indra/newview/app_settings/settings_phoenix.xml @@ -171,18 +171,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment @@ -483,18 +471,6 @@ 1 - ScriptDialogsPosition - - Comment - Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right, 0 = follow legacy ShowScriptDialogsTopRight - Persist - 1 - Type - S32 - Value - 3 - - FSUseLegacyCursors Comment diff --git a/indra/newview/app_settings/settings_text.xml b/indra/newview/app_settings/settings_text.xml index 1e679b1016..6b50b6ee55 100644 --- a/indra/newview/app_settings/settings_text.xml +++ b/indra/newview/app_settings/settings_text.xml @@ -147,18 +147,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_v3.xml b/indra/newview/app_settings/settings_v3.xml index 0a2adc77b1..6c89031e12 100644 --- a/indra/newview/app_settings/settings_v3.xml +++ b/indra/newview/app_settings/settings_v3.xml @@ -183,16 +183,16 @@ 0 - ShowScriptDialogsTopRight + ScriptDialogsPosition Comment - Show script llDialog floaters always in the top right corner of the screen. + Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right Persist 1 Type - Boolean + S32 Value - 0 + 1 EnableGroupChatPopups diff --git a/indra/newview/fsfloateravatarrendersettings.cpp b/indra/newview/fsfloateravatarrendersettings.cpp index e751f4ef97..e62c3697e1 100644 --- a/indra/newview/fsfloateravatarrendersettings.cpp +++ b/indra/newview/fsfloateravatarrendersettings.cpp @@ -31,6 +31,7 @@ #include "fscommon.h" #include "llfiltereditor.h" +#include "llfloateravatarpicker.h" #include "llnamelistctrl.h" #include "lltrans.h" #include "llviewercontrol.h" @@ -45,6 +46,7 @@ FSFloaterAvatarRenderSettings::FSFloaterAvatarRenderSettings(const LLSD& key) mFilterSubString(LLStringUtil::null), mFilterSubStringOrig(LLStringUtil::null) { + mCommitCallbackRegistrar.add("Settings.AddNewEntry", boost::bind(&FSFloaterAvatarRenderSettings::onClickAdd, this, _2)); } FSFloaterAvatarRenderSettings::~FSFloaterAvatarRenderSettings() @@ -87,11 +89,21 @@ BOOL FSFloaterAvatarRenderSettings::postBuild() mRenderSettingChangedCallbackConnection = FSAvatarRenderPersistence::instance().setAvatarRenderSettingChangedCallback(boost::bind(&FSFloaterAvatarRenderSettings::onAvatarRenderSettingChanged, this, _1, _2)); + this->setVisibleCallback(boost::bind(&FSFloaterAvatarRenderSettings::removePicker, this)); + loadInitialList(); return TRUE; } +void FSFloaterAvatarRenderSettings::removePicker() +{ + if (mPicker.get()) + { + mPicker.get()->closeFloater(); + } +} + void FSFloaterAvatarRenderSettings::onCloseBtn() { closeFloater(); @@ -145,6 +157,50 @@ BOOL FSFloaterAvatarRenderSettings::handleKeyHere(KEY key, MASK mask) return LLFloater::handleKeyHere(key, mask); } +void FSFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata) +{ + const std::string command_name = userdata.asString(); + LLVOAvatar::VisualMuteSettings render_setting = LLVOAvatar::AV_RENDER_NORMALLY; + if ("never" == command_name) + { + render_setting = LLVOAvatar::AV_DO_NOT_RENDER; + } + else if ("always" == command_name) + { + render_setting = LLVOAvatar::AV_ALWAYS_RENDER; + } + + LLView* button = findChild("plus_btn", TRUE); + LLFloater* root_floater = gFloaterView->getParentFloater(this); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, render_setting), + TRUE, TRUE, TRUE, root_floater->getName(), button); + + if (root_floater) + { + root_floater->addDependentFloater(picker); + } + + mPicker = picker->getHandle(); +} + +void FSFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, LLVOAvatar::VisualMuteSettings render_setting) +{ + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + { + LLUUID avatar_id = *it; + + LLVOAvatar *avatarp = dynamic_cast(gObjectList.findObject(avatar_id)); + if (avatarp) + { + avatarp->setVisualMuteSettings(render_setting); + } + else + { + FSAvatarRenderPersistence::instance().setAvatarRenderSettings(avatar_id, render_setting); + } + } +} + //--------------------------------------------------------------------------- // Context menu diff --git a/indra/newview/fsfloateravatarrendersettings.h b/indra/newview/fsfloateravatarrendersettings.h index 4217a6f714..095fbbcb61 100644 --- a/indra/newview/fsfloateravatarrendersettings.h +++ b/indra/newview/fsfloateravatarrendersettings.h @@ -50,11 +50,16 @@ private: void onCloseBtn(); void onFilterEdit(const std::string& search_string); void onAvatarRenderSettingChanged(const LLUUID& avatar_id, LLVOAvatar::VisualMuteSettings render_setting); + void onClickAdd(const LLSD& userdata); void loadInitialList(); void addElementToList(const LLUUID& avatar_id, LLVOAvatar::VisualMuteSettings render_setting); + void callbackAvatarPicked(const uuid_vec_t& ids, LLVOAvatar::VisualMuteSettings render_setting); + void removePicker(); + LLNameListCtrl* mAvatarList; + LLHandle mPicker; boost::signals2::connection mRenderSettingChangedCallbackConnection; diff --git a/indra/newview/fspanelblocklist.cpp b/indra/newview/fspanelblocklist.cpp index 18024b0592..359214ed5a 100644 --- a/indra/newview/fspanelblocklist.cpp +++ b/indra/newview/fspanelblocklist.cpp @@ -187,8 +187,8 @@ void FSPanelBlockList::refreshBlockedList() mBlockedList->refreshLineHeight(); LLUICtrl* block_limit = getChild("block_limit"); - block_limit->setTextArg("[COUNT]", llformat("%d", LLMuteList::getInstance()->getMutes().size())); - block_limit->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit"))); + block_limit->setTextArg("[COUNT]", llformat("%d", LLMuteList::getInstance()->getMutes().size())); + block_limit->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit"))); } void FSPanelBlockList::updateButtons() diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index faaad8d3b0..48e86f01ca 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2484,6 +2484,12 @@ void LLAgent::endAnimationUpdateUI() { skip_list.insert(LLFloaterReg::findInstance("mini_map")); } + // Beacons floater doesn't need to be open for us to show beacons + //if (LLFloaterReg::findInstance("beacons")) + //{ + // skip_list.insert(LLFloaterReg::findInstance("beacons")); + //} + // if(gSavedSettings.getBOOL("FSShowStatsBarInMouselook")) { skip_list.insert(LLFloaterReg::findInstance("stats")); @@ -2656,6 +2662,8 @@ void LLAgent::endAnimationUpdateUI() #else // Use this for now LLFloaterView::skip_list_t skip_list; skip_list.insert(LLFloaterReg::findInstance("mini_map")); + // Beacons floater doesn't need to be open for us to show beacon + //skip_list.insert(LLFloaterReg::findInstance("beacons")); if(gSavedSettings.getBOOL("FSShowStatsBarInMouselook")) { skip_list.insert(LLFloaterReg::findInstance("stats")); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1150d8ac5f..d7a5d32541 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1270,11 +1270,12 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) return; } + U32 use_count = 0; for (LLWearableHoldingPattern::found_list_t::iterator iter = getFoundList().begin(); - iter != getFoundList().end(); ++iter) + iter != getFoundList().end(); ++iter) { LLFoundData& data = *iter; - if(wearable->getAssetID() == data.mAssetID) + if (wearable->getAssetID() == data.mAssetID) { // Failing this means inventory or asset server are corrupted in a way we don't handle. if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType)) @@ -1283,9 +1284,48 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) break; } - data.mWearable = wearable; + if (use_count == 0) + { + data.mWearable = wearable; + use_count++; + } + else + { + LLViewerInventoryItem* wearable_item = gInventory.getItem(data.mItemID); + if (wearable_item && wearable_item->isFinished() && wearable_item->getPermissions().allowModifyBy(gAgentID)) + { + // We can't edit and do some other interactions with same asset twice, copy it + // Note: can't update incomplete items. Usually attached from previous viewer build, but + // consider adding fetch and completion callback + LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(wearable, wearable->getName()); + data.mWearable = new_wearable; + data.mAssetID = new_wearable->getAssetID(); + + // Update existing inventory item + wearable_item->setAssetUUID(new_wearable->getAssetID()); + wearable_item->setTransactionID(new_wearable->getTransactionID()); + gInventory.updateItem(wearable_item, LLInventoryObserver::INTERNAL); + wearable_item->updateServer(FALSE); + + use_count++; + } + else + { + // Note: technically a bug, LLViewerWearable can identify only one item id at a time, + // yet we are tying it to multiple items here. + // LLViewerWearable need to support more then one item. + LL_WARNS() << "Same LLViewerWearable is used by multiple items! " << wearable->getAssetID() << LL_ENDL; + data.mWearable = wearable; + } + } } } + + if (use_count > 1) + { + LL_WARNS() << "Copying wearable, multiple asset id uses! " << wearable->getAssetID() << LL_ENDL; + gInventory.notifyObservers(); + } } static void onWearableAssetFetch(LLViewerWearable* wearable, void* data) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a064ab75c5..d033bfe7a2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1433,7 +1433,8 @@ bool LLAppViewer::init() // Init debug rects LLView::sDebugRects = gSavedSettings.getBOOL("DebugViews"); - showReleaseNotesIfRequired(); + // TODO: consider moving proxy initialization here or LLCopocedureManager after proxy initialization, may be implement + // some other protection to make sure we don't use network before initializng proxy /*----------------------------------------------------------------------*/ // nat 2016-06-29 moved the following here from the former mainLoop(). @@ -6829,21 +6830,6 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } -/** -* Check if user is running a new version of the viewer. -* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. -*/ -void LLAppViewer::showReleaseNotesIfRequired() -{ - if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion - && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") - && !gSavedSettings.getBOOL("FirstLoginThisInstall")) - { - LLSD info(getViewerInfo()); - LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); - } -} - //virtual void LLAppViewer::setMasterSystemAudioMute(bool mute) { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index b23342c82a..5b6ce2c14e 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -265,8 +265,6 @@ private: void sendLogoutRequest(); void disconnectViewer(); - void showReleaseNotesIfRequired(); - // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; diff --git a/indra/newview/llblocklist.h b/indra/newview/llblocklist.h index 0f7fa41c32..96af8d898e 100644 --- a/indra/newview/llblocklist.h +++ b/indra/newview/llblocklist.h @@ -67,6 +67,8 @@ public: void sortByType(); void refresh(); + U32 getMuteListSize() { return mMuteListSize; } + private: void addNewItem(const LLMute* mute); diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index ac25a4908e..7881681224 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -379,8 +379,13 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype; bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype; + bool is_group_member = is_group && gAgent.isInGroup(selected_id, TRUE); - if ("can_im" == command_name || "can_view_profile" == command_name) + if ("can_im" == command_name) + { + return is_p2p || is_group_member; + } + else if ("can_view_profile" == command_name) { return is_p2p || is_group; } @@ -390,7 +395,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) } else if ("can_call" == command_name) { - return (is_p2p || is_group) && LLAvatarActions::canCall(); + return (is_p2p || is_group_member) && LLAvatarActions::canCall(); } else if ("add_rem_friend" == command_name || "can_invite_to_group" == command_name || diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index f0331f20d8..314b859cea 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -63,10 +63,10 @@ public: { return start_offset; } - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // require full line to ourselves - if (line_offset == 0) + if (line_offset == 0) { // print all our text return getEnd() - getStart(); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f9ab84c85f..5a10955f4b 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1506,15 +1506,21 @@ bool LLFloaterIMContainer::checkContextMenuItem(const std::string& item, uuid_ve bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) { + const LLConversationItem *conversation_item = getCurSelectedViewModelItem(); + if(!conversation_item) + { + return false; + } + const std::string& item = userdata.asString(); if ("show_mute" == item) { - return !isMuted(getCurSelectedViewModelItem()->getUUID()); + return !isMuted(conversation_item->getUUID()); } else if ("show_unmute" == item) { - return isMuted(getCurSelectedViewModelItem()->getUUID()); + return isMuted(conversation_item->getUUID()); } return true; diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index d24a813dd5..6853feba37 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -314,6 +314,13 @@ void LLFloaterIMNearbyChat::onClose(bool app_quitting) { // Override LLFloaterIMSessionTab::onClose() so that Nearby Chat is not removed from the conversation floater LLFloaterIMSessionTab::restoreFloater(); + if (app_quitting) + { + // We are starting and closing floater in "expanded" state + // Update expanded (restored) rect and position for use in next session + forceReshape(); + storeRectControl(); + } } // virtual diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 11f5667f0b..e837a66cd1 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2178,7 +2178,6 @@ void LLPanelLandOptions::refresh() else { // something selected, hooray! - //LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); // FIRE-16112 fix // Display options BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS); @@ -2194,7 +2193,6 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry()); mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() ); - //BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE; // FIRE-16112 fix // FIRE-6604 : Reinstate the "Allow Other Residents to Edit Terrain" option in About Land BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT); @@ -2203,10 +2201,7 @@ void LLPanelLandOptions::refresh() // mCheckSafe ->set( !parcel->getAllowDamage() ); - // FIRE-16112 fix - //mCheckSafe ->setEnabled( can_change_options && region_damage ); mCheckSafe ->setEnabled( can_change_options ); - // mCheckFly ->set( parcel->getAllowFly() ); mCheckFly ->setEnabled( can_change_options ); @@ -2292,7 +2287,7 @@ void LLPanelLandOptions::refresh() // they can see the checkbox, but its disposition depends on the // state of the region - LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); // FIRE-16112 fix + LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); if (regionp) { if (regionp->getSimAccess() == SIM_ACCESS_PG) @@ -2666,11 +2661,8 @@ void LLPanelLandAccess::refresh() mListAccess->clearSortOrder(); mListAccess->deleteAllItems(); S32 count = parcel->mAccessList.size(); - // FIRE-9211: Add counter to parcel ban and access lists - //getChild("AllowedText")->setTextArg("[COUNT]", llformat("%d",count)); - getChild("AllowedText")->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); - getChild("AllowedText")->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); - // + getChild("AllowedText")->setTextArg("[COUNT]", llformat("%d",count)); + getChild("AllowedText")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST)); getChild("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("AccessList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); @@ -2717,11 +2709,8 @@ void LLPanelLandAccess::refresh() mListBanned->clearSortOrder(); mListBanned->deleteAllItems(); S32 count = parcel->mBanList.size(); - // FIRE-9211: Add counter to parcel ban and access lists - //getChild("BanCheck")->setTextArg("[COUNT]", llformat("%d",count)); - getChild("BanCheck")->setTextArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); - getChild("BanCheck")->setTextArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); - // + getChild("BanCheck")->setTextArg("[COUNT]", llformat("%d",count)); + getChild("BanCheck")->setTextArg("[MAX]", llformat("%d",PARCEL_MAX_ACCESS_LIST)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",count)); getChild("BannedList")->setToolTipArg(LLStringExplicit("[MAX]"), llformat("%d",PARCEL_MAX_ACCESS_LIST)); diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index f6ff83eaf4..5cf16f3ad6 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -329,7 +329,7 @@ void LLFloaterPathfindingObjects::handleUpdateObjectList(LLPathfindingManager::r } } -void LLFloaterPathfindingObjects::rebuildObjectsScrollList() +void LLFloaterPathfindingObjects::rebuildObjectsScrollList(bool update_if_needed) { if (!mHasObjectsToBeSelected) { @@ -355,7 +355,14 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList() { buildObjectsScrollList(mObjectList); - mObjectsScrollList->selectMultiple(mObjectsToBeSelected); + if(mObjectsScrollList->selectMultiple(mObjectsToBeSelected) == 0) + { + if(update_if_needed && mRefreshListButton->getEnabled()) + { + requestGetObjects(); + return; + } + } if (mHasObjectsToBeSelected) { mObjectsScrollList->scrollToShowSelected(); @@ -484,7 +491,7 @@ void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects() } else { - rebuildObjectsScrollList(); + rebuildObjectsScrollList(true); if (isMinimized()) { setMinimized(FALSE); diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 4024e15fd6..752f741959 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -80,7 +80,7 @@ protected: void handleNewObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); void handleUpdateObjectList(LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::ERequestStatus pRequestStatus, LLPathfindingObjectListPtr pObjectList); - void rebuildObjectsScrollList(); + void rebuildObjectsScrollList(bool update_if_needed = false); virtual void buildObjectsScrollList(const LLPathfindingObjectListPtr pObjectListPtr); void addObjectToScrollList(const LLPathfindingObjectPtr pObjectPr, const LLSD &pScrollListItemData); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 11ce64e426..074dfd3805 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -658,6 +658,11 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this)); + gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this)); + gSavedPerAccountSettings.getControl("SoundUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeSoundFolder, this)); + gSavedPerAccountSettings.getControl("AnimationUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeAnimationFolder, this)); + LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); @@ -770,6 +775,10 @@ BOOL LLFloaterPreference::postBuild() onAvatarTagSettingsChanged(); // + // Correct enabled state of Animated Script Dialogs option + gSavedSettings.getControl("ScriptDialogsPosition")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::updateAnimatedScriptDialogs, this)); + updateAnimatedScriptDialogs(); + // Set max. UI scaling factor depending on max. supported OS scaling factor #if LL_WINDOWS if (IsWindowsVersionOrGreater(10, 0, 0)) @@ -1149,7 +1158,12 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Display selected maturity icons. onChangeMaturity(); - + + onChangeModelFolder(); + onChangeTextureFolder(); + onChangeSoundFolder(); + onChangeAnimationFolder(); + // Load (double-)click to walk/teleport settings. updateClickActionControls(); @@ -3229,6 +3243,63 @@ void LLFloaterPreference::onChangeMaturity() getChild("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); } +std::string get_category_path(LLUUID cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + std::string localized_cat_name; + if (!LLTrans::findString(localized_cat_name, "InvFolder " + cat->getName())) + { + localized_cat_name = cat->getName(); + } + + if (cat->getParentUUID().notNull()) + { + return get_category_path(cat->getParentUUID()) + " > " + localized_cat_name; + } + else + { + return localized_cat_name; + } +} + +std::string get_category_path(LLFolderType::EType cat_type) +{ + LLUUID cat_id = gInventory.findUserDefinedCategoryUUIDForType(cat_type); + return get_category_path(cat_id); +} + +void LLFloaterPreference::onChangeModelFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_models")->setText(get_category_path(LLFolderType::FT_OBJECT)); + } +} + +void LLFloaterPreference::onChangeTextureFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_textures")->setText(get_category_path(LLFolderType::FT_TEXTURE)); + } +} + +void LLFloaterPreference::onChangeSoundFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_sounds")->setText(get_category_path(LLFolderType::FT_SOUND)); + } +} + +void LLFloaterPreference::onChangeAnimationFolder() +{ + if (gInventory.isInventoryUsable()) + { + getChild("upload_animation")->setText(get_category_path(LLFolderType::FT_ANIMATION)); + } +} + // FIXME: this will stop you from spawning the sidetray from preferences dialog on login screen // but the UI for this will still be enabled void LLFloaterPreference::onClickBlockList() @@ -3440,6 +3511,14 @@ void LLFloaterPreference::onAvatarTagSettingsChanged() } // +// Correct enabled state of Animated Script Dialogs option +void LLFloaterPreference::updateAnimatedScriptDialogs() +{ + S32 position = gSavedSettings.getS32("ScriptDialogsPosition"); + childSetEnabled("FSAnimatedScriptDialogs", position == 2 || position == 3); +} +// + //------------------------------Updater--------------------------------------- // FIRE-6340, FIRE-6567 - Setting Bandwidth issues diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 940ba43115..76f08efa2a 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -164,6 +164,9 @@ protected: // Properly disable avatar tag setting void onAvatarTagSettingsChanged(); + // Correct enabled state of Animated Script Dialogs option + void updateAnimatedScriptDialogs(); + public: // This function squirrels away the current values of the controls so that // cancel() can restore them. @@ -242,6 +245,10 @@ public: void onCommitMusicEnabled(); void applyResolution(); void onChangeMaturity(); + void onChangeModelFolder(); + void onChangeTextureFolder(); + void onChangeSoundFolder(); + void onChangeAnimationFolder(); void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 685716117b..9664725f27 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -34,6 +34,7 @@ #include "llrect.h" #include "llerror.h" #include "llstring.h" +#include "llvoavatarself.h" #include "message.h" #include "lltrans.h" @@ -89,6 +90,38 @@ BOOL LLFloaterScriptDebug::postBuild() return FALSE; } +// Improved script debug floater +//void LLFloaterScriptDebug::setVisible(BOOL visible) +//{ +// if(visible) +// { +// LLFloaterScriptDebugOutput* floater_output = LLFloaterReg::findTypedInstance("script_debug_output", LLUUID::null); +// if (floater_output == NULL) +// { +// floater_output = dynamic_cast(LLFloaterReg::showInstance("script_debug_output", LLUUID::null, FALSE)); +// if (floater_output) +// { +// addFloater(floater_output, false); +// } +// } + +// } +// LLMultiFloater::setVisible(visible); +//} + +//void LLFloaterScriptDebug::closeFloater(bool app_quitting/* = false*/) +//{ +// if(app_quitting) +// { +// LLMultiFloater::closeFloater(app_quitting); +// } +// else +// { +// setVisible(false); +// } +//} +// + // Script debug icon //LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID &object_id) LLFloater* LLFloaterScriptDebug::addOutputWindow(const LLUUID& object_id, bool show /* = false */) @@ -132,10 +165,18 @@ void LLFloaterScriptDebug::addScriptLine(const LLChat& chat) // [FSllOwnerSayToScriptDebugWindow] if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); - // Mark script error icons - objectp->getIcon()->setScriptError(); - // Mark script error icons + if(objectp->isHUDAttachment()) + { + ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + // Mark script error icons + ((LLViewerObject*)gAgentAvatarp)->getIcon()->setScriptError(); + } + else + { + objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + // Mark script error icons + objectp->getIcon()->setScriptError(); + } } // [FSllOwnerSayToScriptDebugWindow] floater_label = llformat("%s (%.0f, %.0f, %.0f)", @@ -153,7 +194,7 @@ void LLFloaterScriptDebug::addScriptLine(const LLChat& chat) floater_label = chat.mFromName; } - addOutputWindow(LLUUID::null); + addOutputWindow(LLUUID::null); // Improved script debug floater // [FSllOwnerSayToScriptDebugWindow] // addOutputWindow(source_id); static LLCachedControl FSllOwnerSayRouting(gSavedSettings, "FSllOwnerSayToScriptDebugWindowRouting"); diff --git a/indra/newview/llfloaterscriptdebug.h b/indra/newview/llfloaterscriptdebug.h index 45b0ed42eb..7869d24c99 100644 --- a/indra/newview/llfloaterscriptdebug.h +++ b/indra/newview/llfloaterscriptdebug.h @@ -39,7 +39,10 @@ public: LLFloaterScriptDebug(const LLSD& key); virtual ~LLFloaterScriptDebug(); virtual BOOL postBuild(); + //virtual void setVisible(BOOL visible); // Improved script debug floater static void show(const LLUUID& object_id); + + /*virtual*/ //void closeFloater(bool app_quitting = false); // Improved script debug floater // [FSllOwnerSayToScriptDebugWindow] // static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id); static void addScriptLine(const LLChat& chat); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index dcedae5da4..85676c0455 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3041,7 +3041,7 @@ void LLIMMgr::addMessage( // Logically it would make more sense to reject the session sooner, in another area of the // code, but the session has to be established inside the server before it can be left. - if (LLMuteList::getInstance()->isMuted(other_participant_id) && !from_linden) + if (LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden) { LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL; if(!gIMMgr->leaveSession(new_session_id)) @@ -3492,14 +3492,20 @@ void LLIMMgr::inviteToSession( payload["question_type"] = question_type; //ignore invites from muted residents - if (LLMuteList::getInstance()->isMuted(caller_id) && !is_linden) + if (!is_linden) { - if (voice_invite && "VoiceInviteQuestionDefault" == question_type) + if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagVoiceChat) + && voice_invite && "VoiceInviteQuestionDefault" == question_type) { LL_INFOS() << "Rejecting voice call from initiating muted resident " << caller_name << LL_ENDL; LLIncomingCallDialog::processCallResponse(1, payload); + return; + } + else if (LLMuteList::getInstance()->isMuted(caller_id, LLMute::flagAll & ~LLMute::flagVoiceChat)) + { + LL_INFOS() << "Rejecting session invite from initiating muted resident " << caller_name << LL_ENDL; + return; } - return; } LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(session_id); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ed5e7dc5ad..6aa1594eee 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4134,6 +4134,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Gesture")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); + disabled_items.push_back(std::string("upload_def")); } if (favorites == mUUID) { @@ -4160,6 +4161,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Gesture")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); + disabled_items.push_back(std::string("upload_def")); } if (marketplace_listings_id == mUUID) { @@ -4213,6 +4215,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Gesture")); items.push_back(std::string("New Clothes")); items.push_back(std::string("New Body Parts")); + items.push_back(std::string("upload_def")); } } getClipboardEntries(false, items, disabled_items, flags); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 5677d553e3..ad49c5f9d3 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -40,6 +40,7 @@ #include "llinventorybridge.h" #include "llviewerfoldertype.h" #include "llradiogroup.h" +#include "llstartup.h" // linden library includes #include "llclipboard.h" @@ -219,8 +220,10 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const } // when applying a filter, matching folders get their contents downloaded first + // but make sure we are not interfering with pre-download if (isNotDefault() - && !gInventory.isCategoryComplete(folder_id)) + && !gInventory.isCategoryComplete(folder_id) + && LLStartUp::getStartupState() > STATE_WEARABLES_WAIT) { LLInventoryModelBackgroundFetch::instance().start(folder_id); } @@ -425,7 +428,11 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if (is_hidden_if_empty) { // Force the fetching of those folders so they are hidden if they really are empty... - gInventory.fetchDescendentsOf(object_id); + // But don't interfere with startup download + if (LLStartUp::getStartupState() > STATE_WEARABLES_WAIT) + { + gInventory.fetchDescendentsOf(object_id); + } LLInventoryModel::cat_array_t* cat_array = NULL; LLInventoryModel::item_array_t* item_array = NULL; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 2d588dbace..b1e6364cbf 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -539,6 +539,42 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getRootFolderID()); } +const LLUUID LLInventoryModel::findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type) +{ + LLUUID cat_id; + switch (preferred_type) + { + case LLFolderType::FT_OBJECT: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("ModelUploadFolder")); + break; + } + case LLFolderType::FT_TEXTURE: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("TextureUploadFolder")); + break; + } + case LLFolderType::FT_SOUND: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("SoundUploadFolder")); + break; + } + case LLFolderType::FT_ANIMATION: + { + cat_id = LLUUID(gSavedPerAccountSettings.getString("AnimationUploadFolder")); + break; + } + default: + break; + } + + if (cat_id.isNull() || !getCategory(cat_id)) + { + cat_id = findCategoryUUIDForTypeInRoot(preferred_type, true, getRootFolderID()); + } + return cat_id; +} + const LLUUID LLInventoryModel::findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder) { return findCategoryUUIDForTypeInRoot(preferred_type, create_folder, gInventory.getLibraryRootFolderID()); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index f8a8897da6..46637b7bf6 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -312,6 +312,9 @@ public: // will search in the user's library folder instead of "My Inventory" const LLUUID findLibraryCategoryUUIDForType(LLFolderType::EType preferred_type, bool create_folder = true); + // Returns user specified category for uploads, returns default id if there are no + // user specified one or it does not exist, creates default category if it is missing. + const LLUUID findUserDefinedCategoryUUIDForType(LLFolderType::EType preferred_type); // Get whatever special folder this object is a child of, if any. const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 70504d2f70..d4499af066 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -178,8 +178,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); + mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); mCommitCallbackRegistrar.add("Inventory.CustomAction", boost::bind(&LLInventoryPanel::onCustomAction, this, _2)); // Prevent warning "No callback found for: 'Inventory.CustomAction' in control: Find Links" - } LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id ) @@ -1320,6 +1320,27 @@ bool LLInventoryPanel::beginIMSession() return true; } +void LLInventoryPanel::fileUploadLocation(const LLSD& userdata) +{ + const std::string param = userdata.asString(); + if (param == "model") + { + gSavedPerAccountSettings.setString("ModelUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "texture") + { + gSavedPerAccountSettings.setString("TextureUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "sound") + { + gSavedPerAccountSettings.setString("SoundUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } + else if (param == "animation") + { + gSavedPerAccountSettings.setString("AnimationUploadFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); + } +} + bool LLInventoryPanel::attachObject(const LLSD& userdata) { // Copy selected item UUIDs to a vector. diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index eb8d874cbc..6f48d87a25 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -210,6 +210,7 @@ public: void onCustomAction(const LLSD& userdata); // Prevent warning "No callback found for: 'Inventory.CustomAction' in control: Find Links" void doCreate(const LLSD& userdata); bool beginIMSession(); + void fileUploadLocation(const LLSD& userdata); bool attachObject(const LLSD& userdata); static void idle(void* user_data); diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index 0230be2e2c..68a2350bac 100644 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -175,7 +175,7 @@ LLPointer LLLoginHandler::loadSavedUserLoginInfo() authenticator["algorithm"] = "md5"; authenticator["secret"] = md5pass; // yuck, we'll fix this with mani's changes. - gSavedSettings.setBOOL("AutoLogin", TRUE); + gSavedSettings.setBOOL("AutoLogin", TRUE); // Re-added because handled via FSLoginDontSavePassword debug setting return gSecAPIHandler->createCredential(identifier["first_name"].asString() + " " + identifier["last_name"].asString() + "@" +LLGridManager::getInstance()->getGrid(), identifier, authenticator); } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 4c84073e35..5857e39b69 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2036,8 +2036,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) LLSD result; LLSD res; - result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); - result["texture_folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); + result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); result["asset_type"] = "mesh"; result["inventory_type"] = "object"; result["description"] = "(No Description)"; @@ -3582,11 +3582,11 @@ void LLMeshRepository::notifyLoadedMeshes() // Handle addition of texture, if any. if ( data.mResponse.has("new_texture_folder_id") ) { - const LLUUID& folder_id = data.mResponse["new_texture_folder_id"].asUUID(); + const LLUUID& new_folder_id = data.mResponse["new_texture_folder_id"].asUUID(); - if ( folder_id.notNull() ) + if ( new_folder_id.notNull() ) { - LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE); + LLUUID parent_id = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); std::string name; // Check if the server built a different name for the texture folder @@ -3601,7 +3601,7 @@ void LLMeshRepository::notifyLoadedMeshes() // Add the category to the internal representation LLPointer cat = - new LLViewerInventoryCategory(folder_id, parent_id, + new LLViewerInventoryCategory(new_folder_id, parent_id, LLFolderType::FT_NONE, name, gAgent.getID()); cat->setVersion(LLViewerInventoryCategory::VERSION_UNKNOWN); diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index f11559739a..914e868b8e 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -146,6 +146,9 @@ void LLPanelBlockedList::updateButtons() bool hasSelected = NULL != mBlockedList->getSelectedItem(); getChildView("unblock_btn")->setEnabled(hasSelected); getChildView("blocked_gear_btn")->setEnabled(hasSelected); + + getChild("block_limit")->setTextArg("[COUNT]", llformat("%d", mBlockedList->getMuteListSize())); + getChild("block_limit")->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit"))); } void LLPanelBlockedList::unblockItem() diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index d9f92b5c79..73135d7087 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -750,7 +750,7 @@ void LLPanelFace::getState() updateUI(); } -void LLPanelFace::updateUI() +void LLPanelFace::updateUI(bool force_set_values /*false*/) { //set state of UI to match state of texture entry(ies) (calls setEnabled, setValue, etc, but NOT setVisible) LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); @@ -1146,7 +1146,14 @@ void LLPanelFace::updateUI() mCtrlBumpyScaleV->setEnabled(editable && normmap_id.notNull() && enable_material_controls); // Materials alignment - mCtrlTexScaleV->setValue(diff_scale_t); + if (force_set_values) + { + mCtrlTexScaleV->forceSetValue(diff_scale_t); + } + else + { + mCtrlTexScaleV->setValue(diff_scale_t); + } mCtrlShinyScaleV->setValue(norm_scale_t); mCtrlBumpyScaleV->setValue(spec_scale_t); @@ -1366,9 +1373,18 @@ void LLPanelFace::updateUI() BOOL repeats_tentative = !identical_repeats; mCtrlRpt->setEnabled(identical_planar_texgen ? FALSE : enabled); - mCtrlRpt->setValue(editable ? repeats : 1.0f); + //LLSpinCtrl* rpt_ctrl = getChild("rptctrl"); + if (force_set_values) + { + //onCommit, previosly edited element updates related ones + mCtrlRpt->forceSetValue(editable ? repeats : 1.0f); + } + else + { + mCtrlRpt->setValue(editable ? repeats : 1.0f); + } mCtrlRpt->setTentative(LLSD(repeats_tentative)); - + // FIRE-11407 - Flip buttons getChildView("flipTextureScaleU")->setEnabled(enabled); getChildView("flipTextureScaleV")->setEnabled(enabled); @@ -2115,6 +2131,8 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata ) { LLPanelFace* self = (LLPanelFace*) userdata; self->sendTextureInfo(); + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); // Materials alignment if (gSavedSettings.getBOOL("FSSyncronizeTextureMaps")) { @@ -2185,6 +2203,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata) llassert(false); break; } + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); } struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index b36b3ed40c..02f0c6cef2 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -154,7 +154,8 @@ protected: // Make UI reflect state of currently selected material (refresh) // and UI mode (e.g. editing normal map v diffuse map) // - void updateUI(); + // @param force_set_values forces spinners to set value even if they are focused + void updateUI(bool force_set_values = false); // Convenience func to determine if all faces in selection have // identical planar texgen settings during edits diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 38f2016514..fd438db7c9 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -1161,7 +1161,7 @@ S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1, // FIRE-20149: Refresh insignia texture when clicking the refresh button void LLPanelGroupGeneral::refreshInsigniaTexture() { - if (mInsignia) + if (mInsignia && mInsignia->getTexture()) { destroy_texture(mInsignia->getTexture()->getID()); } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 3ae8440d1b..7346aa5324 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1655,6 +1655,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); + mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.CustomAction", boost::bind(&do_nothing)); // Prevent warning "No callback found for: 'Inventory.CustomAction' in control: Find Links" } @@ -2000,6 +2001,7 @@ void LLPanelObjectInventory::refresh() if(mTaskUUID != object->mID) { mTaskUUID = object->mID; + mAttachmentUUID = object->getAttachmentItemID(); make_request = TRUE; // This is a new object so pre-emptively clear the contents @@ -2009,6 +2011,16 @@ void LLPanelObjectInventory::refresh() // Register for updates from this object, registerVOInventoryListener(object,NULL); } + else if (mAttachmentUUID != object->getAttachmentItemID()) + { + mAttachmentUUID = object->getAttachmentItemID(); + if (mAttachmentUUID.notNull()) + { + // Server unsubsribes viewer (deselects object) from property + // updates after "ObjectAttach" so we need to resubscribe + LLSelectMgr::getInstance()->sendSelect(); + } + } // Based on the node information, we may need to dirty the // object inventory and get it again. @@ -2039,6 +2051,7 @@ void LLPanelObjectInventory::refresh() void LLPanelObjectInventory::clearInventoryTask() { mTaskUUID = LLUUID::null; + mAttachmentUUID = LLUUID::null; removeVOInventoryListener(); clearContents(); } diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 1b56b9143c..68c05d0d09 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -108,6 +108,7 @@ private: LLFolderView* mFolders; LLUUID mTaskUUID; + LLUUID mAttachmentUUID; BOOL mHaveInventory; BOOL mIsInventoryEmpty; BOOL mInventoryNeedsUpdate; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5afae4d581..6c7fcc872f 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -314,7 +314,11 @@ BOOL LLPanelPlaces::postBuild() enable_registrar.add("Places.OverflowMenu.Enable", boost::bind(&LLPanelPlaces::onOverflowMenuItemEnable, this, _2)); mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - if (!mPlaceMenu) + if (mPlaceMenu) + { + mPlaceMenu->setAlwaysShowMenu(TRUE); + } + else { LL_WARNS() << "Error loading Place menu" << LL_ENDL; } @@ -1043,7 +1047,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mPlaceInfoType == LANDMARK_TAB_INFO_TYPE) { mLandmarkInfo->setVisible(visible); - + mPlaceProfile->setVisible(FALSE); if (visible) { mLandmarkInfo->resetLocation(); @@ -1051,8 +1055,6 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) LLRect rect = getRect(); LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom); mLandmarkInfo->reshape(new_rect.getWidth(), new_rect.getHeight()); - - mPlaceProfile->setVisible(FALSE); } else { diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 36f8dae8ab..9368bbf891 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -566,11 +566,16 @@ void LLPanelPrimMediaControls::updateShape() } } - // MAINT-1392 If this is a HUD always set it visible, but hide each control if user has no perms. - // When setting it invisible it won't receive any mouse messages anymore + // Web plugins and HUD may have media controls invisible for user, but still need scroll mouse events. + // LLView checks for visibleEnabledAndContains() and won't pass events to invisible panel, so instead + // of hiding whole panel hide each control instead (if user has no perms). + // Note: It might be beneficial to keep panel visible for all plugins to make behavior consistent, but + // for now limiting change to cases that need events. - if( !is_hud ) + if (!is_hud && (!media_plugin || media_plugin->pluginSupportsMediaTime())) + { setVisible(enabled); + } else { if( !hasPermsControl ) diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 2c99d97019..8988669abb 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -45,6 +45,8 @@ #include +#include "llviewernetwork.h" + /** * Sends postcard via email. */ @@ -58,6 +60,7 @@ public: /*virtual*/ ~LLPanelSnapshotPostcard(); // Store settings at logout /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ S32 notify(const LLSD& info); // For OpenSim compatibility private: /*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; } @@ -79,6 +82,7 @@ private: void onSend(); bool mHasFirstMsgFocus; + std::string mAgentEmail; // For OpenSim compatibility }; static LLPanelInjector panel_class("llpanelsnapshotpostcard"); @@ -123,9 +127,36 @@ void LLPanelSnapshotPostcard::onOpen(const LLSD& key) } // + // For OpenSim compatibility + // pick up the user's up-to-date email address + if (mAgentEmail.empty()) + { + gAgent.sendAgentUserInfoRequest(); + } + // + LLPanelSnapshot::onOpen(key); } +// For OpenSim compatibility +// virtual +S32 LLPanelSnapshotPostcard::notify(const LLSD& info) +{ + if (!info.has("agent-email")) + { + llassert(info.has("agent-email")); + return 0; + } + + if (mAgentEmail.empty()) + { + mAgentEmail = info["agent-email"].asString(); + } + + return 1; +} +// + // virtual void LLPanelSnapshotPostcard::updateControls(const LLSD& info) { @@ -178,6 +209,7 @@ void LLPanelSnapshotPostcard::sendPostcard() if (!url.empty()) { LLResourceUploadInfo::ptr_t uploadInfo(new LLPostcardUploadInfo( + mAgentEmail, // For OpenSim compatibility; LLResourceUploadInfo will omit this in case of SL getChild("name_form")->getValue().asString(), getChild("to_form")->getValue().asString(), getChild("subject_form")->getValue().asString(), @@ -240,6 +272,14 @@ void LLPanelSnapshotPostcard::onSend() return; } + // For OpenSim compatibility + if (!LLGridManager::instance().isInSecondLife() && (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))) + { + LLNotificationsUtil::add("PromptSelfEmail"); + return; + } + // + std::string subject(getChild("subject_form")->getValue().asString()); if(subject.empty() || !mHasFirstMsgFocus) { diff --git a/indra/newview/llpostcard.cpp b/indra/newview/llpostcard.cpp index d5775042c1..064977bc6a 100644 --- a/indra/newview/llpostcard.cpp +++ b/indra/newview/llpostcard.cpp @@ -38,12 +38,17 @@ #include "llassetstorage.h" #include "llviewerassetupload.h" +#include "llviewernetwork.h" /////////////////////////////////////////////////////////////////////////////// -LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, +// For OpenSim compatibility +//LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, +LLPostcardUploadInfo::LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo, +// std::string subject, std::string message, LLVector3d globalPosition, LLPointer image, invnUploadFinish_f finish) : LLBufferedAssetUploadInfo(LLUUID::null, image, finish), + mEmailFrom(emailFrom), // For OpenSim compatibility mNameFrom(nameFrom), mEmailTo(emailTo), mSubject(subject), @@ -57,6 +62,12 @@ LLSD LLPostcardUploadInfo::generatePostBody() LLSD postcard = LLSD::emptyMap(); postcard["pos-global"] = mGlobalPosition.getValue(); postcard["to"] = mEmailTo; + // For OpenSim compatibility + if (!LLGridManager::instance().isInSecondLife()) + { + postcard["from"] = mEmailFrom; + } + // postcard["name"] = mNameFrom; postcard["subject"] = mSubject; postcard["msg"] = mMessage; diff --git a/indra/newview/llpostcard.h b/indra/newview/llpostcard.h index 1e932ae03f..4dd10c5120 100644 --- a/indra/newview/llpostcard.h +++ b/indra/newview/llpostcard.h @@ -53,12 +53,16 @@ private: class LLPostcardUploadInfo : public LLBufferedAssetUploadInfo { public: - LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, + // For OpenSim compatibility + //LLPostcardUploadInfo(std::string nameFrom, std::string emailTo, + LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo, + // std::string subject, std::string message, LLVector3d globalPosition, LLPointer image, invnUploadFinish_f finish); virtual LLSD generatePostBody(); private: + std::string mEmailFrom; // For OpenSim compatibility std::string mNameFrom; std::string mEmailTo; std::string mSubject; diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 6b6e0f422e..0ea3d50c0d 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -127,47 +127,9 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) floater->setAutoFocus(FALSE); - LLScriptFloaterManager::e_object_type floaterType=LLScriptFloaterManager::getObjectType(notification_id); - - // for some reason an inventory offer comes back as OBJ_UNKNOWN -Zi - if(floaterType==LLScriptFloaterManager::OBJ_UNKNOWN || - floaterType==LLScriptFloaterManager::OBJ_SCRIPT) + if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id)) { floater->setSavePosition(true); - if(gSavedSettings.getBOOL("ShowScriptDialogsTopRight") || - gSavedSettings.getBOOL("FSDisableIMChiclets") - ) - { - // undock the dialog - floater->setDocked(false,true); - LLRect pos=floater->getRect(); - - S32 width=pos.getWidth(); - S32 height=pos.getHeight(); - pos.setOriginAndSize(gViewerWindow->getWorldViewWidthScaled()-width, - gViewerWindow->getWorldViewHeightScaled()-height, - width,height); - floater->setRect(pos); - floater->savePosition(); - } - // do this only for inventory offers -Zi - else if(floaterType==LLScriptFloaterManager::OBJ_UNKNOWN) - { - // undock the dialog - floater->setDocked(false,true); - LLRect pos=floater->getRect(); - - S32 width=pos.getWidth(); - S32 height=pos.getHeight(); - - pos.setOriginAndSize(gViewerWindow->getWorldViewWidthScaled()-width, - gViewerWindow->getWorldViewHeightScaled()-height, - width,height); - - floater->setRect(pos); - floater->savePosition(); - } - floater->restorePosition(); } else @@ -892,16 +854,6 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) { eDialogPosition dialog_position = (eDialogPosition)gSavedSettings.getS32("ScriptDialogsPosition"); - if (dialog_position == POS_LEGACY) - { - dialog_position = POS_TOP_RIGHT; - if (!gSavedSettings.getBOOL("ShowScriptDialogsTopRight")) - { - dialog_position = POS_DOCKED; - } - gSavedSettings.setS32("ScriptDialogsPosition", (S32)dialog_position); - } - if (dialog_position == POS_DOCKED && chicletsDisabled) { dialog_position = POS_TOP_RIGHT; diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index ecd82639d8..a7ace79c8a 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -235,8 +235,7 @@ public: // script dialogs position enum eDialogPosition { - POS_LEGACY, // Use ShowScriptDialogsTopRight once and convert to one of these - POS_DOCKED, + POS_DOCKED = 1, POS_TOP_LEFT, POS_TOP_RIGHT, POS_BOTTOM_LEFT, diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 82109884be..328eaf9a5b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4576,6 +4576,9 @@ void LLSelectMgr::sendAttach(U8 attachment_point, bool replace) SEND_ONLY_ROOTS ); if (!build_mode) { + // After "ObjectAttach" server will unsubscribe us from properties updates + // so either deselect objects or resend selection after attach packet reaches server + // In case of build_mode LLPanelObjectInventory::refresh() will deal with selection deselectAll(); } } @@ -7385,7 +7388,7 @@ F32 LLObjectSelection::getSelectedLinksetCost() LLSelectNode* node = *iter; LLViewerObject* object = node->getObject(); - if (object) + if (object && !object->isAttachment()) { LLViewerObject* root = static_cast(object->getRoot()); if (root) diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 4e9a144c0b..d97bfbde40 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -425,6 +425,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLViewerWearab { // Save changes if closing. mEditWearable->saveChanges(); + mEditWearable->setWearable(NULL); LLAppearanceMgr::getInstance()->updateIsDirty(); if (change_state) { diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index c43fef98cc..bc44785134 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -818,23 +818,7 @@ void LLSidepanelItemInfo::onCommitName() { LLPointer new_item = new LLViewerInventoryItem(item); new_item->rename(labelItemName->getText()); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } } @@ -855,23 +839,7 @@ void LLSidepanelItemInfo::onCommitDescription() LLPointer new_item = new LLViewerInventoryItem(item); new_item->setDescription(labelItemDesc->getText()); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } } @@ -947,23 +915,7 @@ void LLSidepanelItemInfo::onCommitPermissions() flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } new_item->setFlags(flags); - if(mObjectID.isNull()) - { - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } else { @@ -1047,25 +999,7 @@ void LLSidepanelItemInfo::updateSaleInfo() } new_item->setSaleInfo(sale_info); - if(mObjectID.isNull()) - { - // This is in the agent's inventory. - new_item->updateServer(FALSE); - gInventory.updateItem(new_item); - gInventory.notifyObservers(); - } - else - { - // This is in an object's contents. - LLViewerObject* object = gObjectList.findObject(mObjectID); - if(object) - { - object->updateInventory( - new_item, - TASK_INVENTORY_ITEM_KEY, - false); - } - } + onCommitChanges(new_item); } else { @@ -1074,6 +1008,45 @@ void LLSidepanelItemInfo::updateSaleInfo() } } +void LLSidepanelItemInfo::onCommitChanges(LLPointer item) +{ + if (item.isNull()) + { + return; + } + + if (mObjectID.isNull()) + { + // This is in the agent's inventory. + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + else + { + // This is in an object's contents. + LLViewerObject* object = gObjectList.findObject(mObjectID); + if (object) + { + object->updateInventory( + item, + TASK_INVENTORY_ITEM_KEY, + false); + + if (object->isSelected()) + { + // Since object is selected (build floater is open) object will + // receive properties update, detect serial mismatch, dirty and + // reload inventory, meanwhile some other updates will refresh it. + // So mark dirty early, this will prevent unnecessary changes + // and download will be triggered by LLPanelObjectInventory - it + // prevents flashing in content tab and some duplicated request. + object->dirtyInventory(); + } + } + } +} + LLViewerInventoryItem* LLSidepanelItemInfo::findItem() const { LLViewerInventoryItem* item = NULL; diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h index 2e24e58a2a..74cf7afe35 100644 --- a/indra/newview/llsidepaneliteminfo.h +++ b/indra/newview/llsidepaneliteminfo.h @@ -89,6 +89,7 @@ protected: void onCommitSaleInfo(); void onCommitSaleType(); void updateSaleInfo(); + void onCommitChanges(LLPointer item); }; #endif // LL_LLSIDEPANELITEMINFO_H diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a50fd57c5e..40cbfca5d6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -300,6 +300,7 @@ boost::scoped_ptr LLStartUp::sPhases(new LLViewerStats: void login_show(); void login_callback(S32 option, void* userdata); +void show_release_notes_if_required(); //void show_first_run_dialog(); // Unused in Firestorm bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); @@ -1023,6 +1024,7 @@ bool idle_startup() } else if (gSavedSettings.getBOOL("AutoLogin")) { + // Log into last account // Option to not save password if using login cmdline switch; // gLoginHandler.initializeLoginInfo() sets AutoLogin to TRUE, // so we end up here! @@ -1041,6 +1043,14 @@ bool idle_startup() show_connect_box = false; } + // Handled via FSLoginDontSavePassword debug setting + //else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3) + //{ + // // Console provided login&password + // gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); + // show_connect_box = false; + //} + // else { gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); @@ -1064,6 +1074,7 @@ bool idle_startup() set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str()); display_startup(); // LLViewerMedia::initBrowser(); + show_release_notes_if_required(); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); return FALSE; } @@ -3035,6 +3046,22 @@ void login_callback(S32 option, void *userdata) } } +/** +* Check if user is running a new version of the viewer. +* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. +*/ +void show_release_notes_if_required() +{ + if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds + && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") + && !gSavedSettings.getBOOL("FirstLoginThisInstall")) + { + LLSD info(LLAppViewer::instance()->getViewerInfo()); + LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); + } +} + // Ditch the first run modal. Assume the user already has an account. //void show_first_run_dialog() //{ diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index eae7a7096d..415293aa41 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -370,60 +370,45 @@ BOOL LLToolPie::handleLeftClickPick() // If left-click never selects or spawns a menu // Eat the event. - if (!gSavedSettings.getBOOL("LeftClickShowMenu")) + + // mouse already released + if (!mMouseButtonDown) { - // mouse already released - if (!mMouseButtonDown) - { - return true; - } + return true; + } - while( object && object->isAttachment() && !object->flagHandleTouch()) + while (object && object->isAttachment() && !object->flagHandleTouch()) + { + // don't pick avatar through hud attachment + if (object->isHUDAttachment()) { - // don't pick avatar through hud attachment - if (object->isHUDAttachment()) - { - break; - } - object = (LLViewerObject*)object->getParent(); + break; } - // FIRE-15189: Fix ClickToWalk not allowing mouse-walk (behavior change) - //if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) - if (object && object == gAgentAvatarp) - // - { - // we left clicked on avatar, switch to focus mode - mMouseButtonDown = false; - LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); - gViewerWindow->hideCursor(); - LLToolCamera::getInstance()->setMouseCapture(TRUE); - LLToolCamera::getInstance()->pickCallback(mPick); - if(!gSavedSettings.getBOOL("ClickOnAvatarKeepsCamera")) // keep camera in place when clicking on ourselves -Zi - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + object = (LLViewerObject*)object->getParent(); + } + // FIRE-15189: Fix ClickToWalk not allowing mouse-walk (behavior change) + //if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) + if (object && object == gAgentAvatarp) + // + { + // we left clicked on avatar, switch to focus mode + mMouseButtonDown = false; + LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); + gViewerWindow->hideCursor(); + LLToolCamera::getInstance()->setMouseCapture(TRUE); + LLToolCamera::getInstance()->pickCallback(mPick); + if(!gSavedSettings.getBOOL("ClickOnAvatarKeepsCamera")) // keep camera in place when clicking on ourselves + gAgentCamera.setFocusOnAvatar(TRUE, TRUE); - return TRUE; - } + return TRUE; + } ////////// // // Could be first left-click on nothing // LLFirstUse::useLeftClickNoHit(); ///////// - - // Eat the event - return LLTool::handleMouseDown(x, y, mask); - } - if (gAgent.leftButtonGrabbed()) - { - // if the left button is grabbed, don't put up the pie menu - return LLTool::handleMouseDown(x, y, mask); - } - - // Can't ignore children here. - LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); - - // Spawn pie menu - LLTool::handleRightMouseDown(x, y, mask); - return TRUE; + // Eat the event + return LLTool::handleMouseDown(x, y, mask); } BOOL LLToolPie::useClickAction(MASK mask, diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 43cc07b187..046722fe6e 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -310,10 +310,9 @@ void LLResourceUploadInfo::assignDefaults() mDescription = "(No Description)"; } - mFolderId = gInventory.findCategoryUUIDForType( + mFolderId = gInventory.findUserDefinedCategoryUUIDForType( (mDestinationFolderType == LLFolderType::FT_NONE) ? (LLFolderType::EType)mAssetType : mDestinationFolderType); - } std::string LLResourceUploadInfo::getDisplayName() const diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 564dd2de81..42b1324349 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -619,8 +619,8 @@ bool handleAvatarZOffsetChanged(const LLSD& sdValue) bool handleForceShowGrid(const LLSD& newvalue) { // [FS Login Panel] - //LLPanelLogin::updateServer( ); - FSPanelLogin::updateServer( ); + //LLPanelLogin::updateLocationSelectorsVisibility( ); + FSPanelLogin::updateLocationSelectorsVisibility( ); // [FS Login Panel] return true; } @@ -1104,6 +1104,7 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); + gSavedSettings.getControl("ShowStartLocation")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); // Show start location setting has no effect on login gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index aa799b3469..947a972060 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -755,8 +755,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()); // FIRE-16112 fix + || (parcel && parcel->getAllowDamage()); } BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 195cc6ddba..6a4a73f7d7 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -229,7 +229,7 @@ public: return false; } - /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { // always draw at beginning of line if (line_offset == 0) @@ -1182,10 +1182,6 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch openEmbeddedSound( item, wc ); return TRUE; - case LLAssetType::AT_NOTECARD: - openEmbeddedNotecard( item, wc ); - return TRUE; - case LLAssetType::AT_LANDMARK: openEmbeddedLandmark( item, wc ); return TRUE; @@ -1194,6 +1190,7 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch openEmbeddedCallingcard( item, wc ); return TRUE; + case LLAssetType::AT_NOTECARD: case LLAssetType::AT_LSL_TEXT: case LLAssetType::AT_CLOTHING: case LLAssetType::AT_OBJECT: @@ -1265,11 +1262,6 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLPointer item_p } } -void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc ) -{ - copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback)); -} - void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc ) { if(item && !item->getCreatorUUID().isNull()) diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index 9e027aa153..1beb3a564d 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -105,7 +105,6 @@ private: void openEmbeddedTexture( LLInventoryItem* item, llwchar wc ); void openEmbeddedSound( LLInventoryItem* item, llwchar wc ); void openEmbeddedLandmark( LLPointer item_ptr, llwchar wc ); - void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc); void openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc); void showCopyToInvDialog( LLInventoryItem* item, llwchar wc ); void showUnsavedAlertDialog( LLInventoryItem* item ); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 747badddf1..8759503bed 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -133,6 +133,9 @@ extern U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG; const F32 MAX_HOVER_Z = 2.0f; const F32 MIN_HOVER_Z = -2.0f; +const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f; +const F32 MAX_ATTACHMENT_COMPLEXITY = 1.0e6f; + using namespace LLAvatarAppearanceDefines; //----------------------------------------------------------------------------- @@ -9943,10 +9946,10 @@ void LLVOAvatar::calculateUpdateRenderComplexity() const LLVOVolume* volume = drawable->getVOVolume(); if (volume) { - U32 attachment_total_cost = 0; - U32 attachment_volume_cost = 0; - U32 attachment_texture_cost = 0; - U32 attachment_children_cost = 0; + F32 attachment_total_cost = 0; + F32 attachment_volume_cost = 0; + F32 attachment_texture_cost = 0; + F32 attachment_children_cost = 0; attachment_volume_cost += volume->getRenderCost(textures); @@ -9970,7 +9973,6 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // add the cost of each individual texture in the linkset attachment_texture_cost += volume_texture->second; } - attachment_total_cost = attachment_volume_cost + attachment_texture_cost + attachment_children_cost; LL_DEBUGS("ARCdetail") << "Attachment costs " << attached_object->getAttachmentItemID() << " total: " << attachment_total_cost @@ -9979,7 +9981,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity() << ", " << volume->numChildren() << " children: " << attachment_children_cost << LL_ENDL; - cost += attachment_total_cost; + // Limit attachment complexity to avoid signed integer flipping of the wearer's ACI + cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, MAX_ATTACHMENT_COMPLEXITY); } } } diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp index 317d4c7ffb..4e4ba4f7fa 100644 --- a/indra/newview/llwlanimator.cpp +++ b/indra/newview/llwlanimator.cpp @@ -183,17 +183,28 @@ F64 LLWLAnimator::getDayTime() // we're not solving the non-linear equation that determines sun phase // we're just linearly interpolating between the major points - if (phase <= 5.0 / 4.0) { + + if (phase <= 5.0 / 4.0) + { + // mDayTime from 0.33 to 0.75 (6:00 to 21:00) mDayTime = (1.0 / 3.0) * phase + (1.0 / 3.0); } + else if (phase > 7.0 / 4.0) + { + // maximum value for phase is 2 + // mDayTime from 0.25 to 0.33 (3:00 to 6:00) + mDayTime = (1.0 / 3.0) - (1.0 / 3.0) * (2 - phase); + } else { + // phase == 3/2 is where day restarts (24:00) + // mDayTime from 0.75 to 0.999 and 0 to 0.25 (21:00 to 03:00) mDayTime = phase - (1.0 / 2.0); - } - if(mDayTime > 1) - { - mDayTime--; + if(mDayTime > 1) + { + mDayTime--; + } } return mDayTime; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index dc878016da..affcab46a2 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7872,12 +7872,10 @@ void LLPipeline::renderBloom(bool for_snapshot, F32 zoom_factor, int subfield) F32 fov = LLViewerCamera::getInstance()->getView(); const F32 default_fov = CameraFieldOfView * F_PI/180.f; - //const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio"); //F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight(); F32 dv = 2.f*default_focal_length * tanf(default_fov/2.f); - //F32 dh = 2.f*default_focal_length * tanf(default_fov*default_aspect_ratio/2.f); F32 focal_length = dv/(2*tanf(fov/2.f)); diff --git a/indra/newview/skins/ansastorm/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_outfits_inventory.xml index 7b3e381ea5..a4c4656c48 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_outfits_inventory.xml @@ -32,6 +32,7 @@ name="appearance_tabs" tab_position="top" halign="center" + hide_scroll_arrows="true" top="8" right="-1"> - Zulässige Einwohner ([LISTED]/[MAX]) + Zulässige Einwohner ([COUNT]/[MAX]) - - - Aspect Ratio - - - - + + + + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index d7e8114581..de7a257fa2 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -321,6 +321,43 @@ parameter="eyes" /> + + + + + + + + + + + + + + + + + + - - - - - @@ -726,7 +725,16 @@ function="GridFeatureCheck" parameter="destination_guide"/> - + + + + - -An error occured while checking for update. +An error occurred while checking for update. Please try again later. confirm fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because the parcel is full. +Can't move object '[O]' to +[P] in region [R] because the parcel is full. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel. +Can't move object '[O]' to +[P] in region [R] because your objects are not allowed on this parcel. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel. +Can't move object '[O]' to +[P] in region [R] because there are not enough resources for this object on this parcel. - fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing. + fail + Can't move object '[O]' to + [P] in region [R] because the other region is running an older version which does not support receiving this object via region crossing. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries. +Can't move object '[O]' to +[P] in region [R] because you cannot modify the navmesh across region boundaries. fail -Can't move object '[OBJECT_NAME]' to -[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE]) +Can't move object '[O]' to +[P] in region [R] because of an unknown reason. ([F]) + + [COUNT] entries in your block list, and the limit is [LIMIT]. + diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index f889a785ac..024171ecde 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -32,6 +32,7 @@ name="appearance_tabs" tab_position="top" halign="center" + hide_scroll_arrows="true" top="8" right="-1"> - + + + + Current destination folders for uploads: + + + + Images + + + + + Sounds + + + + + Animations + + + + + Models + + + + + To change a destination folder, right click on it in inventory and choose + "Use as default for" + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 23f0c30556..b2c3597467 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -1483,24 +1483,6 @@ tool_tip="Vertical camera field of view for DoF effect (in degrees)" top_pad="5" width="468"/> - + tool_tip="When checked, this option allows avatars that are moving backwards to be seen on your screen as walking backwards. This setting only affects what your viewer shows, not what the avatar actually does. This is the default behavior in the Second Life viewer. The avatar's AO may override this behavior and force turning the avatar around instead."/> + + + Current destination folders for uploads + + + + Images + + + + + Sounds + + + + + Animations + + + + + Models + + + + + To change a destination folder, right click on it in inventory and choose + "Use as default for" + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9e628d572a..5fd1c4bcc7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2304,7 +2304,7 @@ Abuse Report Male - Laugh Male - Repulsed Male - Shrug - Male - Stick tougue out + Male - Stick tongue out Male - Wow Female - Chuckle @@ -2323,7 +2323,7 @@ Abuse Report Female - Please Female - Repulsed Female - Shrug - Female - Stick tougue out + Female - Stick tongue out Female - Wow /bow diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 98ec4cc65b..e3619001a2 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -132,7 +132,7 @@ name="damage_text" width="35" height="18" - top="17" + top="18" follows="right|top" halign="right" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index 8c13c8d5a8..5efd6afbdc 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -477,7 +477,7 @@ los medios: - Residentes autorizados ([LISTED]/[MAX]) + Residentes autorizados ([COUNT]/[MAX]) - - - Aspect Ratio - - - - - - - Aspect Ratio - - - - - Zulässige Einwohner ([LISTED]/[MAX]) + Zulässige Einwohner ([COUNT]/[MAX])