diff options
author | Richard Linden <none@none> | 2011-05-02 17:57:52 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-05-02 17:57:52 -0700 |
commit | d5faa4f38d338777463b7ad6eb3239041d43fe28 (patch) | |
tree | d57efbda59c9f677b2245bebc97fec129f3f9fad /indra | |
parent | 9a6f06687e5b467f0c049bfbf88c2131eee11ef3 (diff) | |
parent | 78d76eb4b01e0bd6db41a67d1573a1b841cbe993 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
Diffstat (limited to 'indra')
104 files changed, 2752 insertions, 2035 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 4698116022..1c43c4ce12 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -243,7 +243,7 @@ elseif(LINUX) libaprutil-1.so.0 libatk-1.0.so libbreakpad_client.so.0 - libcrypto.so.0.9.8 + libcrypto.so.1.0.0 libdb-5.1.so libexpat.so libexpat.so.1 @@ -259,7 +259,7 @@ elseif(LINUX) libtcmalloc.so libuuid.so.16 libuuid.so.16.0.22 - libssl.so.0.9.8 + libssl.so.1.0.0 libfontconfig.so.1.4.4 ) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index b6710300bb..03428691cf 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -135,6 +135,7 @@ set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") +set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) set(SERVER ON CACHE BOOL "Build Second Life server software.") diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index ae2bd0d78b..58f96df8ab 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 2; const S32 LL_VERSION_MINOR = 6; -const S32 LL_VERSION_PATCH = 4; +const S32 LL_VERSION_PATCH = 7; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index 835664c60f..c6bfa50b40 100644 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp @@ -73,9 +73,28 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec) bool LLImageDimensionsInfo::getImageDimensionsBmp() { - const S32 BMP_FILE_HEADER_SIZE = 14; + // Make sure the file is long enough. + const S32 DATA_LEN = 26; // BMP header (14) + DIB header size (4) + width (4) + height (4) + if (!checkFileLength(DATA_LEN)) + { + llwarns << "Premature end of file" << llendl; + return false; + } + + // Read BMP signature. + U8 signature[2]; + mInfile.read((void*)signature, sizeof(signature)/sizeof(signature[0])); + + // Make sure this is actually a BMP file. + // We only support Windows bitmaps (BM), according to LLImageBMP::updateData(). + if (signature[0] != 'B' || signature[1] != 'M') + { + llwarns << "Not a BMP" << llendl; + return false; + } - mInfile.seek(APR_CUR,BMP_FILE_HEADER_SIZE+4); + // Read image dimensions. + mInfile.seek(APR_CUR, 16); mWidth = read_reverse_s32(); mHeight = read_reverse_s32(); @@ -86,6 +105,14 @@ bool LLImageDimensionsInfo::getImageDimensionsTga() { const S32 TGA_FILE_HEADER_SIZE = 12; + // Make sure the file is long enough. + if (!checkFileLength(TGA_FILE_HEADER_SIZE + 1 /* width */ + 1 /* height */)) + { + llwarns << "Premature end of file" << llendl; + return false; + } + + // *TODO: Detect non-TGA files somehow. mInfile.seek(APR_CUR,TGA_FILE_HEADER_SIZE); mWidth = read_byte() | read_byte() << 8; mHeight = read_byte() | read_byte() << 8; @@ -95,9 +122,29 @@ bool LLImageDimensionsInfo::getImageDimensionsTga() bool LLImageDimensionsInfo::getImageDimensionsPng() { - const S32 PNG_FILE_MARKER_SIZE = 8; + const S32 PNG_MAGIC_SIZE = 8; + + // Make sure the file is long enough. + if (!checkFileLength(PNG_MAGIC_SIZE + 8 + sizeof(S32) * 2 /* width, height */)) + { + llwarns << "Premature end of file" << llendl; + return false; + } - mInfile.seek(APR_CUR,PNG_FILE_MARKER_SIZE + 8/*header offset+chunk length+chunk type*/); + // Read PNG signature. + const U8 png_magic[PNG_MAGIC_SIZE] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}; + U8 signature[PNG_MAGIC_SIZE]; + mInfile.read((void*)signature, PNG_MAGIC_SIZE); + + // Make sure it's a PNG file. + if (memcmp(signature, png_magic, PNG_MAGIC_SIZE) != 0) + { + llwarns << "Not a PNG" << llendl; + return false; + } + + // Read image dimensions. + mInfile.seek(APR_CUR, 8 /* chunk length + chunk type */); mWidth = read_s32(); mHeight = read_s32(); @@ -122,6 +169,24 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() setLastError("Unable to open file for reading", mSrcFilename); return false; } + + /* Make sure this is a JPEG file. */ + const size_t JPEG_MAGIC_SIZE = 2; + const uint8_t jpeg_magic[JPEG_MAGIC_SIZE] = {0xFF, 0xD8}; + uint8_t signature[JPEG_MAGIC_SIZE]; + + if (fread(signature, sizeof(signature), 1, fp) != 1) + { + llwarns << "Premature end of file" << llendl; + return false; + } + if (memcmp(signature, jpeg_magic, JPEG_MAGIC_SIZE) != 0) + { + llwarns << "Not a JPEG" << llendl; + return false; + } + fseek(fp, 0, SEEK_SET); // go back to start of the file + /* Init jpeg */ jpeg_error_mgr jerr; jpeg_decompress_struct cinfo; @@ -145,3 +210,13 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg() return !sJpegErrorEncountered; } +bool LLImageDimensionsInfo::checkFileLength(S32 min_len) +{ + // Make sure the file is not shorter than min_len bytes. + // so that we don't have to check value returned by each read() or seek(). + char* buf = new char[min_len]; + int nread = mInfile.read(buf, min_len); + delete[] buf; + mInfile.seek(APR_SET, 0); + return nread == min_len; +} diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h index 5384faf3f4..382fdb2a0e 100644 --- a/indra/llimage/llimagedimensionsinfo.h +++ b/indra/llimage/llimagedimensionsinfo.h @@ -119,6 +119,9 @@ protected: return read_byte() << 8 | read_byte(); } + /// Check if the file is not shorter than min_len bytes. + bool checkFileLength(S32 min_len); + protected: LLAPRFile mInfile ; std::string mSrcFilename; diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 767001b633..97f2792686 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -553,12 +553,10 @@ void LLAvatarNameCache::eraseUnrefreshed() if (!sLastExpireCheck || sLastExpireCheck < max_unrefreshed) { sLastExpireCheck = now; - cache_t::iterator it = sCache.begin(); - while (it != sCache.end()) + + for (cache_t::iterator it = sCache.begin(); it != sCache.end();) { - cache_t::iterator cur = it; - ++it; - const LLAvatarName& av_name = cur->second; + const LLAvatarName& av_name = it->second; if (av_name.mExpires < max_unrefreshed) { const LLUUID& agent_id = it->first; @@ -566,8 +564,12 @@ void LLAvatarNameCache::eraseUnrefreshed() << " user '" << av_name.mUsername << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; - sCache.erase(cur); + sCache.erase(it++); } + else + { + ++it; + } } LL_INFOS("AvNameCache") << sCache.size() << " cached avatar names" << LL_ENDL; } diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 7e348656a9..d99ee5a545 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -2290,3 +2290,8 @@ void LLLineEditor::setContextMenu(LLContextMenu* new_context_menu) else mContextMenuHandle.markDead(); } + +void LLLineEditor::setFont(const LLFontGL* font) +{ + mGLFont = font; +} diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 723423a5b9..7b5fa218f2 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -201,6 +201,7 @@ public: const LLColor4& getTentativeFgColor() const { return mTentativeFgColor.get(); } const LLFontGL* getFont() const { return mGLFont; } + void setFont(const LLFontGL* font); void setIgnoreArrowKeys(BOOL b) { mIgnoreArrowKeys = b; } void setIgnoreTab(BOOL b) { mIgnoreTab = b; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 49537ef78f..fd7bb699f8 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -157,6 +157,7 @@ LLTextBase::Params::Params() read_only("read_only", false), v_pad("v_pad", 0), h_pad("h_pad", 0), + clip("clip", true), clip_partial("clip_partial", true), line_spacing("line_spacing"), max_text_length("max_length", 255), @@ -199,6 +200,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mVAlign(p.font_valign), mLineSpacingMult(p.line_spacing.multiple), mLineSpacingPixels(p.line_spacing.pixels), + mClip(p.clip), mClipPartial(p.clip_partial && !p.allow_scroll), mTrackEnd( p.track_end ), mScrollIndex(-1), @@ -334,7 +336,7 @@ void LLTextBase::drawSelectionBackground() // binary search for line that starts before top of visible buffer line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mTop, compare_bottom()); - line_list_t::const_iterator end_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mBottom, compare_top()); + line_list_t::const_iterator end_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mBottom, compare_top()); bool done = false; @@ -512,7 +514,6 @@ void LLTextBase::drawText() selection_right = llmax( mSelectionStart, mSelectionEnd ); } - LLRect scrolled_view_rect = getVisibleDocumentRect(); std::pair<S32, S32> line_range = getVisibleLines(mClipPartial); S32 first_line = line_range.first; S32 last_line = line_range.second; @@ -545,10 +546,10 @@ void LLTextBase::drawText() line_end = next_start; } - LLRect text_rect(line.mRect.mLeft + mVisibleTextRect.mLeft - scrolled_view_rect.mLeft, - line.mRect.mTop - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom, - llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft, - line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom); + LLRect text_rect(line.mRect); + text_rect.mRight = llmin(mDocumentView->getRect().getWidth(), text_rect.mRight); // clamp right edge to document extents + text_rect.translate(mVisibleTextRect.mLeft, mVisibleTextRect.mBottom); // translate into display region of text widget + text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); // adjust by scroll position // draw a single line of text S32 seg_start = line_start; @@ -993,14 +994,28 @@ void LLTextBase::draw() updateScrollFromCursor(); } - LLRect doc_rect; + LLRect text_rect; if (mScroller) { - mScroller->localRectToOtherView(mScroller->getContentWindowRect(), &doc_rect, this); + mScroller->localRectToOtherView(mScroller->getContentWindowRect(), &text_rect, this); } else { - doc_rect = getLocalRect(); + LLRect visible_lines_rect; + std::pair<S32, S32> line_range = getVisibleLines(mClipPartial); + for (S32 i = line_range.first; i < line_range.second; i++) + { + if (visible_lines_rect.isEmpty()) + { + visible_lines_rect = mLineInfoList[i].mRect; + } + else + { + visible_lines_rect.unionWith(mLineInfoList[i].mRect); + } + } + text_rect = visible_lines_rect; + text_rect.translate(mDocumentView->getRect().mLeft, mDocumentView->getRect().mBottom); } if (mBGVisible) @@ -1010,28 +1025,37 @@ void LLTextBase::draw() LLRect bg_rect = mVisibleTextRect; if (mScroller) { - bg_rect.intersectWith(doc_rect); + bg_rect.intersectWith(text_rect); } LLColor4 bg_color = mReadOnly ? mReadOnlyBgColor.get() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(doc_rect, bg_color % alpha, TRUE); + gl_rect_2d(text_rect, bg_color % alpha, TRUE); } - // draw document view - LLUICtrl::draw(); - - { - // only clip if we support scrolling... - // since convention is that text boxes never vertically truncate their contents - // regardless of rect bounds - LLLocalClipRect clip(doc_rect, mScroller != NULL); + bool should_clip = mClip || mScroller != NULL; + { LLLocalClipRect clip(text_rect, should_clip); + + // draw document view + if (mScroller) + { + drawChild(mScroller); + } + else + { + drawChild(mDocumentView); + } + drawSelectionBackground(); drawText(); drawCursor(); } + + mDocumentView->setVisible(FALSE); + LLUICtrl::draw(); + mDocumentView->setVisible(TRUE); } @@ -1415,7 +1439,7 @@ S32 LLTextBase::getFirstVisibleLine() const return iter - mLineInfoList.begin(); } -std::pair<S32, S32> LLTextBase::getVisibleLines(bool fully_visible) +std::pair<S32, S32> LLTextBase::getVisibleLines(bool require_fully_visible) { LLRect visible_region = getVisibleDocumentRect(); line_list_t::const_iterator first_iter; @@ -1424,14 +1448,14 @@ std::pair<S32, S32> LLTextBase::getVisibleLines(bool fully_visible) // make sure we have an up-to-date mLineInfoList reflow(); - if (fully_visible) + if (require_fully_visible) { first_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_top()); - last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_bottom()); + last_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_bottom()); } else { - first_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom()); + first_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom()); last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_top()); } return std::pair<S32, S32>(first_iter - mLineInfoList.begin(), last_iter - mLineInfoList.begin()); @@ -1998,11 +2022,10 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, pos = segment_line_start + offset; break; } - else if (hit_past_end_of_line && segmentp->getEnd() > line_iter->mDocIndexEnd - 1) + else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd) { // segment wraps to next line, so just set doc pos to the end of the line - // segment wraps to next line, so just set doc pos to start of next line (represented by mDocIndexEnd) - pos = llmin(getLength(), line_iter->mDocIndexEnd); + pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); break; } start_x += text_width; @@ -2405,14 +2428,41 @@ LLRect LLTextBase::getVisibleDocumentRect() const { return mScroller->getVisibleContentRect(); } - else + else if (mClip) { - // entire document rect is visible when not scrolling + LLRect visible_text_rect = getVisibleTextRect(); + LLRect doc_rect = mDocumentView->getRect(); + visible_text_rect.translate(-doc_rect.mLeft, -doc_rect.mBottom); + + // reject partially visible lines + LLRect visible_lines_rect; + for (line_list_t::const_iterator it = mLineInfoList.begin(), end_it = mLineInfoList.end(); + it != end_it; + ++it) + { + bool line_visible = mClipPartial ? visible_text_rect.contains(it->mRect) : visible_text_rect.overlaps(it->mRect); + if (line_visible) + { + if (visible_lines_rect.isEmpty()) + { + visible_lines_rect = it->mRect; + } + else + { + visible_lines_rect.unionWith(it->mRect); + } + } + } + return visible_lines_rect; + } + else + { // entire document rect is visible // but offset according to height of widget + LLRect doc_rect = mDocumentView->getLocalRect(); doc_rect.mLeft -= mDocumentView->getRect().mLeft; // adjust for height of text above widget baseline - doc_rect.mBottom = doc_rect.getHeight() - mVisibleTextRect.getHeight(); + doc_rect.mBottom = llmin(0, doc_rect.getHeight() - mVisibleTextRect.getHeight()); return doc_rect; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index aafcf8ceb0..7d545a1ba6 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -265,6 +265,7 @@ public: use_ellipses, parse_urls, parse_highlights, + clip, clip_partial; Optional<S32> v_pad, @@ -338,7 +339,7 @@ public: void addDocumentChild(LLView* view); void removeDocumentChild(LLView* view); const LLView* getDocumentView() const { return mDocumentView; } - LLRect getVisibleTextRect() { return mVisibleTextRect; } + LLRect getVisibleTextRect() const { return mVisibleTextRect; } LLRect getTextBoundingRect(); LLRect getVisibleDocumentRect() const; @@ -552,6 +553,7 @@ protected: bool mTrackEnd; // if true, keeps scroll position at end of document during resize bool mReadOnly; bool mBGVisible; // render background? + bool mClip; // clip text to widget rect bool mClipPartial; // false if we show lines that are partially inside bounding rect bool mPlainText; // didn't use Image or Icon segments S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 75946b2416..26b3b17577 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -127,7 +127,7 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; } void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {} bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_value, S32 max_value) const { return true; } - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } bool BaseBlock::validateBlock(bool emit_errors) const { return true; } ParamValue<LLUIColor, TypeValues<LLUIColor> >::ParamValue(const LLUIColor& color) diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp index aea605c9f2..e09ef33d49 100644 --- a/indra/llui/tests/llurlmatch_test.cpp +++ b/indra/llui/tests/llurlmatch_test.cpp @@ -101,7 +101,7 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack, S32 generation){ return true; } void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t name_stack, const LLInitParam::BaseBlock* diff_block) const {} bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_count, S32 max_count) const { return true; } - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { return true; } bool BaseBlock::validateBlock(bool emit_errors) const { return true; } ParamValue<LLUIColor, TypeValues<LLUIColor> >::ParamValue(const LLUIColor& color) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index ab089081e6..551d487cc8 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -500,6 +500,8 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks, //----------------------------------------------------------------------- DEVMODE dev_mode; + ::ZeroMemory(&dev_mode, sizeof(DEVMODE)); + dev_mode.dmSize = sizeof(DEVMODE); DWORD current_refresh; if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode)) { @@ -878,6 +880,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO { GLuint pixel_format; DEVMODE dev_mode; + ::ZeroMemory(&dev_mode, sizeof(DEVMODE)); + dev_mode.dmSize = sizeof(DEVMODE); DWORD current_refresh; DWORD dw_ex_style; DWORD dw_style; @@ -2711,6 +2715,8 @@ LLWindow::LLWindowResolution* LLWindowWin32::getSupportedResolutions(S32 &num_re { mSupportedResolutions = new LLWindowResolution[MAX_NUM_RESOLUTIONS]; DEVMODE dev_mode; + ::ZeroMemory(&dev_mode, sizeof(DEVMODE)); + dev_mode.dmSize = sizeof(DEVMODE); mNumSupportedResolutions = 0; for (S32 mode_num = 0; mNumSupportedResolutions < MAX_NUM_RESOLUTIONS; mode_num++) @@ -2786,7 +2792,8 @@ F32 LLWindowWin32::getPixelAspectRatio() BOOL LLWindowWin32::setDisplayResolution(S32 width, S32 height, S32 bits, S32 refresh) { DEVMODE dev_mode; - dev_mode.dmSize = sizeof(dev_mode); + ::ZeroMemory(&dev_mode, sizeof(DEVMODE)); + dev_mode.dmSize = sizeof(DEVMODE); BOOL success = FALSE; // Don't change anything if we don't have to diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 3c4eb70a5d..b3312798dd 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -375,7 +375,7 @@ namespace LLInitParam //static void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name) { - // create a copy of the paramdescriptor in allparams + // create a copy of the param descriptor in mAllParams // so other data structures can store a pointer to it block_data.mAllParams.push_back(in_param); ParamDescriptorPtr param(block_data.mAllParams.back()); @@ -469,7 +469,7 @@ namespace LLInitParam // take all provided params from other and apply to self // NOTE: this requires that "other" is of the same derived type as this - bool BaseBlock::merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + bool BaseBlock::mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { bool some_param_changed = false; BlockDescriptor::all_params_list_t::const_iterator end_it = block_data.mAllParams.end(); diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 858f8405b4..a853999e94 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -476,8 +476,12 @@ namespace LLInitParam void init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size); + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + { + return mergeBlock(block_data, other, overwrite); + } // take all provided params from other and apply to self - bool merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); + bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite); // can be updated in getters mutable S32 mChangeVersion; @@ -896,12 +900,14 @@ namespace LLInitParam const self_t& src_typed_param = static_cast<const self_t&>(src); self_t& dst_typed_param = static_cast<self_t&>(dst); - if (src_typed_param.isProvided() - && (overwrite || !dst_typed_param.isProvided())) + if (src_typed_param.anyProvided()) { - if (dst_typed_param.merge(param_value_t::selfBlockDescriptor(), src_typed_param, overwrite)) + bool param_provided = src_typed_param.isProvided() && (overwrite || !dst_typed_param.isProvided()); + if (dst_typed_param.mergeBlockParam(param_provided, param_value_t::selfBlockDescriptor(), src_typed_param, overwrite)) { dst_typed_param.clearValueName(); + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); return true; } } @@ -1082,6 +1088,12 @@ namespace LLInitParam std::copy(dst_typed_param.begin(), dst_typed_param.end(), std::back_inserter(new_values)); std::swap(dst_typed_param.mValues, new_values); } + + if (src_typed_param.begin() != src_typed_param.end()) + { + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); + } return true; } @@ -1282,6 +1294,13 @@ namespace LLInitParam std::copy(dst_typed_param.begin(), dst_typed_param.end(), std::back_inserter(new_values)); std::swap(dst_typed_param.mValues, new_values); } + + if (src_typed_param.begin() != src_typed_param.end()) + { + dst_typed_param.setProvided(true); + dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true); + } + return true; } @@ -1301,27 +1320,31 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return merge(selfBlockDescriptor(), other, true); + return mergeBlock(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return merge(selfBlockDescriptor(), other, false); + return mergeBlock(selfBlockDescriptor(), other, false); } - // merge with other block - bool merge(BlockDescriptor& block_data, const self_t& other, bool overwrite) + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const self_t& other, bool overwrite) { - // only merge a choice if we are overwriting with other's contents - if (overwrite) + if (param_provided) { - mCurChoice = other.mCurChoice; - return BaseBlock::merge(selfBlockDescriptor(), other, overwrite); + return mergeBlock(block_data, other, overwrite); } return false; } + // merge with other block + bool mergeBlock(BlockDescriptor& block_data, const self_t& other, bool overwrite) + { + mCurChoice = other.mCurChoice; + return BaseBlock::mergeBlock(selfBlockDescriptor(), other, overwrite); + } + // clear out old choice when param has changed /*virtual*/ void paramChanged(const Param& changed_param, bool user_provided) { @@ -1445,13 +1468,13 @@ namespace LLInitParam // take all provided params from other and apply to self bool overwriteFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->merge(selfBlockDescriptor(), other, true); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, true); } // take all provided params that are not already provided, and apply to self bool fillFrom(const self_t& other) { - return static_cast<DERIVED_BLOCK*>(this)->merge(selfBlockDescriptor(), other, false); + return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, false); } virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); } @@ -1862,7 +1885,16 @@ namespace LLInitParam mValue = value; } - bool merge(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + bool mergeBlockParam(bool param_provided, BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) + { + if (param_provided) + { + return mergeBlock(block_data, other, overwrite); + } + return false; + } + + bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite) { const derived_t& src_typed_param = static_cast<const derived_t&>(other); @@ -1875,7 +1907,7 @@ namespace LLInitParam else { // merge individual parameters into destination - return block_t::merge(block_t::selfBlockDescriptor(), src_typed_param, overwrite); + return block_t::mergeBlock(block_t::selfBlockDescriptor(), src_typed_param, overwrite); } } diff --git a/indra/media_plugins/winmmshim/forwarding_api.cpp b/indra/media_plugins/winmmshim/forwarding_api.cpp index eff7e20451..495e08942b 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.cpp +++ b/indra/media_plugins/winmmshim/forwarding_api.cpp @@ -389,90 +389,105 @@ void init_function_pointers(HMODULE winmm_handle) extern "C" { LRESULT WINAPI CloseDriver( HDRVR hDriver, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"CloseDriver\n"); return CloseDriver_orig( hDriver, lParam1, lParam2); } HDRVR WINAPI OpenDriver( LPCWSTR szDriverName, LPCWSTR szSectionName, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"OpenDriver\n"); return OpenDriver_orig( szDriverName, szSectionName, lParam2); } LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"SendDriverMessage\n"); return SendDriverMessage_orig( hDriver, message, lParam1, lParam2); } HMODULE WINAPI DrvGetModuleHandle( HDRVR hDriver) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DrvGetModuleHandle\n"); return DrvGetModuleHandle_orig( hDriver); } HMODULE WINAPI GetDriverModuleHandle( HDRVR hDriver) { + ll_winmm_shim_initialize(); //OutputDebugString(L"GetDriverModuleHandle\n"); return GetDriverModuleHandle_orig( hDriver); } LRESULT WINAPI DefDriverProc( DWORD_PTR dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DefDriverProc\n"); return DefDriverProc_orig( dwDriverIdentifier, hdrvr, uMsg, lParam1, lParam2); } BOOL WINAPI DriverCallback( DWORD dwCallBack, DWORD dwFlags, HDRVR hdrvr, DWORD msg, DWORD dwUser, DWORD dwParam1, DWORD dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"DriverCallback\n"); return DriverCallback_orig(dwCallBack, dwFlags, hdrvr, msg, dwUser, dwParam1, dwParam2); } UINT WINAPI mmsystemGetVersion(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmsystemGetVersion\n"); return mmsystemGetVersion_orig(); } BOOL WINAPI sndPlaySoundA( LPCSTR pszSound, UINT fuSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"sndPlaySoundA\n"); return sndPlaySoundA_orig( pszSound, fuSound); } BOOL WINAPI sndPlaySoundW( LPCWSTR pszSound, UINT fuSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"sndPlaySoundW\n"); return sndPlaySoundW_orig( pszSound, fuSound); } BOOL WINAPI PlaySoundA( LPCSTR pszSound, HMODULE hmod, DWORD fdwSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"PlaySoundA\n"); return PlaySoundA_orig( pszSound, hmod, fdwSound); } BOOL WINAPI PlaySoundW( LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound) { + ll_winmm_shim_initialize(); //OutputDebugString(L"PlaySoundW\n"); return PlaySoundW_orig( pszSound, hmod, fdwSound); } UINT WINAPI waveOutGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetNumDevs\n"); return waveOutGetNumDevs_orig(); } MMRESULT WINAPI waveOutGetDevCapsA( UINT_PTR uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetDevCapsA\n"); return waveOutGetDevCapsA_orig( uDeviceID, pwoc, cbwoc); } MMRESULT WINAPI waveOutGetDevCapsW( UINT_PTR uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetDevCapsW\n"); return waveOutGetDevCapsW_orig( uDeviceID, pwoc, cbwoc); } @@ -480,24 +495,28 @@ extern "C" { MMRESULT WINAPI waveOutGetVolume( HWAVEOUT hwo, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetVolume\n"); return waveOutGetVolume_orig( hwo, pdwVolume); } MMRESULT WINAPI waveOutSetVolume( HWAVEOUT hwo, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetVolume\n"); return waveOutSetVolume_orig( hwo, dwVolume); } MMRESULT WINAPI waveOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetErrorTextA\n"); return waveOutGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI waveOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetErrorTextW\n"); return waveOutGetErrorTextW_orig( mmrError, pszText, cchText); } @@ -516,12 +535,14 @@ extern "C" { MMRESULT WINAPI waveOutPrepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutPrepareHeader\n"); return waveOutPrepareHeader_orig( hwo, pwh, cbwh); } MMRESULT WINAPI waveOutUnprepareHeader( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutUnprepareHeader\n"); return waveOutUnprepareHeader_orig( hwo, pwh, cbwh); } @@ -535,834 +556,973 @@ extern "C" { MMRESULT WINAPI waveOutPause( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutPause\n"); return waveOutPause_orig( hwo); } MMRESULT WINAPI waveOutRestart( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutRestart\n"); return waveOutRestart_orig( hwo); } MMRESULT WINAPI waveOutReset( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutReset\n"); return waveOutReset_orig( hwo); } MMRESULT WINAPI waveOutBreakLoop( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutBreakLoop\n"); return waveOutBreakLoop_orig( hwo); } MMRESULT WINAPI waveOutGetPosition( HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPosition\n"); return waveOutGetPosition_orig( hwo, pmmt, cbmmt); } MMRESULT WINAPI waveOutGetPitch( HWAVEOUT hwo, LPDWORD pdwPitch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPitch\n"); return waveOutGetPitch_orig( hwo, pdwPitch); } MMRESULT WINAPI waveOutSetPitch( HWAVEOUT hwo, DWORD dwPitch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetPitch\n"); return waveOutSetPitch_orig( hwo, dwPitch); } MMRESULT WINAPI waveOutGetPlaybackRate( HWAVEOUT hwo, LPDWORD pdwRate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetPlaybackRate\n"); return waveOutGetPlaybackRate_orig( hwo, pdwRate); } MMRESULT WINAPI waveOutSetPlaybackRate( HWAVEOUT hwo, DWORD dwRate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutSetPlaybackRate\n"); return waveOutSetPlaybackRate_orig( hwo, dwRate); } MMRESULT WINAPI waveOutGetID( HWAVEOUT hwo, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutGetID\n"); return waveOutGetID_orig( hwo, puDeviceID); } MMRESULT WINAPI waveOutMessage( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveOutMessage\n"); return waveOutMessage_orig( hwo, uMsg, dw1, dw2); } UINT WINAPI waveInGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetNumDevs\n"); return waveInGetNumDevs_orig(); } MMRESULT WINAPI waveInGetDevCapsA( UINT_PTR uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetDevCapsA\n"); return waveInGetDevCapsA_orig( uDeviceID, pwic, cbwic); } MMRESULT WINAPI waveInGetDevCapsW( UINT_PTR uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetDevCapsW\n"); return waveInGetDevCapsW_orig( uDeviceID, pwic, cbwic); } MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetErrorTextA\n"); return waveInGetErrorTextA_orig(mmrError, pszText, cchText); } MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetErrorTextW\n"); return waveInGetErrorTextW_orig(mmrError, pszText, cchText); } MMRESULT WINAPI waveInOpen( LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInOpen\n"); return waveInOpen_orig(phwi, uDeviceID, pwfx, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI waveInClose( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInClose\n"); return waveInClose_orig( hwi); } MMRESULT WINAPI waveInPrepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInPrepareHeader\n"); return waveInPrepareHeader_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInUnprepareHeader( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInUnprepareHeader\n"); return waveInUnprepareHeader_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInAddBuffer( HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInAddBuffer\n"); return waveInAddBuffer_orig( hwi, pwh, cbwh); } MMRESULT WINAPI waveInStart( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInStart\n"); return waveInStart_orig( hwi); } MMRESULT WINAPI waveInStop( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInStop\n"); return waveInStop_orig(hwi); } MMRESULT WINAPI waveInReset( HWAVEIN hwi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInReset\n"); return waveInReset_orig(hwi); } MMRESULT WINAPI waveInGetPosition( HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetPosition\n"); return waveInGetPosition_orig( hwi, pmmt, cbmmt); } MMRESULT WINAPI waveInGetID( HWAVEIN hwi, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInGetID\n"); return waveInGetID_orig( hwi, puDeviceID); } MMRESULT WINAPI waveInMessage( HWAVEIN hwi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"waveInMessage\n"); return waveInMessage_orig( hwi, uMsg, dw1, dw2); } UINT WINAPI midiOutGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetNumDevs\n"); return midiOutGetNumDevs_orig(); } MMRESULT WINAPI midiStreamOpen( LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamOpen\n"); return midiStreamOpen_orig( phms, puDeviceID, cMidi, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiStreamClose( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamClose\n"); return midiStreamClose_orig( hms); } MMRESULT WINAPI midiStreamProperty( HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamProperty\n"); return midiStreamProperty_orig( hms, lppropdata, dwProperty); } MMRESULT WINAPI midiStreamPosition( HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamPosition\n"); return midiStreamPosition_orig( hms, lpmmt, cbmmt); } MMRESULT WINAPI midiStreamOut( HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamOut\n"); return midiStreamOut_orig( hms, pmh, cbmh); } MMRESULT WINAPI midiStreamPause( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamPause\n"); return midiStreamPause_orig( hms); } MMRESULT WINAPI midiStreamRestart( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamRestart\n"); return midiStreamRestart_orig( hms); } MMRESULT WINAPI midiStreamStop( HMIDISTRM hms) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiStreamStop\n"); return midiStreamStop_orig( hms); } MMRESULT WINAPI midiConnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiConnect\n"); return midiConnect_orig( hmi, hmo, pReserved); } MMRESULT WINAPI midiDisconnect( HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiDisconnect\n"); return midiDisconnect_orig( hmi, hmo, pReserved); } MMRESULT WINAPI midiOutGetDevCapsA( UINT_PTR uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetDevCapsA\n"); return midiOutGetDevCapsA_orig( uDeviceID, pmoc, cbmoc); } MMRESULT WINAPI midiOutGetDevCapsW( UINT_PTR uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetDevCapsW\n"); return midiOutGetDevCapsW_orig( uDeviceID, pmoc, cbmoc); } MMRESULT WINAPI midiOutGetVolume( HMIDIOUT hmo, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetVolume\n"); return midiOutGetVolume_orig( hmo, pdwVolume); } MMRESULT WINAPI midiOutSetVolume( HMIDIOUT hmo, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutSetVolume\n"); return midiOutSetVolume_orig( hmo, dwVolume); } MMRESULT WINAPI midiOutGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetErrorTextA\n"); return midiOutGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiOutGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetErrorTextW\n"); return midiOutGetErrorTextW_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiOutOpen( LPHMIDIOUT phmo, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutOpen\n"); return midiOutOpen_orig(phmo, uDeviceID, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiOutClose( HMIDIOUT hmo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutClose\n"); return midiOutClose_orig( hmo); } MMRESULT WINAPI midiOutPrepareHeader( HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutPrepareHeader\n"); return midiOutPrepareHeader_orig( hmo, pmh, cbmh); } MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutUnprepareHeader\n"); return midiOutUnprepareHeader_orig(hmo, pmh, cbmh); } MMRESULT WINAPI midiOutShortMsg( HMIDIOUT hmo, DWORD dwMsg) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutShortMsg\n"); return midiOutShortMsg_orig( hmo, dwMsg); } MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutLongMsg\n"); return midiOutLongMsg_orig(hmo, pmh, cbmh); } MMRESULT WINAPI midiOutReset( HMIDIOUT hmo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutReset\n"); return midiOutReset_orig( hmo); } MMRESULT WINAPI midiOutCachePatches( HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutCachePatches\n"); return midiOutCachePatches_orig( hmo, uBank, pwpa, fuCache); } MMRESULT WINAPI midiOutCacheDrumPatches( HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutCacheDrumPatches\n"); return midiOutCacheDrumPatches_orig( hmo, uPatch, pwkya, fuCache); } MMRESULT WINAPI midiOutGetID( HMIDIOUT hmo, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutGetID\n"); return midiOutGetID_orig( hmo, puDeviceID); } MMRESULT WINAPI midiOutMessage( HMIDIOUT hmo, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiOutMessage\n"); return midiOutMessage_orig( hmo, uMsg, dw1, dw2); } UINT WINAPI midiInGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetNumDevs\n"); return midiInGetNumDevs_orig(); } MMRESULT WINAPI midiInGetDevCapsA( UINT_PTR uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetDevCapsA\n"); return midiInGetDevCapsA_orig( uDeviceID, pmic, cbmic); } MMRESULT WINAPI midiInGetDevCapsW( UINT_PTR uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetDevCapsW\n"); return midiInGetDevCapsW_orig( uDeviceID, pmic, cbmic); } MMRESULT WINAPI midiInGetErrorTextA( MMRESULT mmrError, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetErrorTextA\n"); return midiInGetErrorTextA_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiInGetErrorTextW( MMRESULT mmrError, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetErrorTextW\n"); return midiInGetErrorTextW_orig( mmrError, pszText, cchText); } MMRESULT WINAPI midiInOpen( LPHMIDIIN phmi, UINT uDeviceID, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInOpen\n"); return midiInOpen_orig(phmi, uDeviceID, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI midiInClose( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInClose\n"); return midiInClose_orig( hmi); } MMRESULT WINAPI midiInPrepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInPrepareHeader\n"); return midiInPrepareHeader_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInUnprepareHeader( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInUnprepareHeader\n"); return midiInUnprepareHeader_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInAddBuffer( HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInAddBuffer\n"); return midiInAddBuffer_orig( hmi, pmh, cbmh); } MMRESULT WINAPI midiInStart( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInStart\n"); return midiInStart_orig( hmi); } MMRESULT WINAPI midiInStop( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInStop\n"); return midiInStop_orig(hmi); } MMRESULT WINAPI midiInReset( HMIDIIN hmi) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInReset\n"); return midiInReset_orig( hmi); } MMRESULT WINAPI midiInGetID( HMIDIIN hmi, LPUINT puDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInGetID\n"); return midiInGetID_orig( hmi, puDeviceID); } MMRESULT WINAPI midiInMessage( HMIDIIN hmi, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"midiInMessage\n"); return midiInMessage_orig( hmi, uMsg, dw1, dw2); } UINT WINAPI auxGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetNumDevs\n"); return auxGetNumDevs_orig(); } MMRESULT WINAPI auxGetDevCapsA( UINT_PTR uDeviceID, LPAUXCAPSA pac, UINT cbac) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetDevCapsA\n"); return auxGetDevCapsA_orig( uDeviceID, pac, cbac); } MMRESULT WINAPI auxGetDevCapsW( UINT_PTR uDeviceID, LPAUXCAPSW pac, UINT cbac) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetDevCapsW\n"); return auxGetDevCapsW_orig( uDeviceID, pac, cbac); } MMRESULT WINAPI auxSetVolume( UINT uDeviceID, DWORD dwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxSetVolume\n"); return auxSetVolume_orig( uDeviceID, dwVolume); } MMRESULT WINAPI auxGetVolume( UINT uDeviceID, LPDWORD pdwVolume) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxGetVolume\n"); return auxGetVolume_orig( uDeviceID, pdwVolume); } MMRESULT WINAPI auxOutMessage( UINT uDeviceID, UINT uMsg, DWORD_PTR dw1, DWORD_PTR dw2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"auxOutMessage\n"); return auxOutMessage_orig( uDeviceID, uMsg, dw1, dw2); } UINT WINAPI mixerGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetNumDevs\n"); return mixerGetNumDevs_orig(); } MMRESULT WINAPI mixerGetDevCapsA( UINT_PTR uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetDevCapsA\n"); return mixerGetDevCapsA_orig( uMxId, pmxcaps, cbmxcaps); } MMRESULT WINAPI mixerGetDevCapsW( UINT_PTR uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetDevCapsW\n"); return mixerGetDevCapsW_orig( uMxId, pmxcaps, cbmxcaps); } MMRESULT WINAPI mixerOpen( LPHMIXER phmx, UINT uMxId, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerOpen\n"); return mixerOpen_orig( phmx, uMxId, dwCallback, dwInstance, fdwOpen); } MMRESULT WINAPI mixerClose( HMIXER hmx) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerClose\n"); return mixerClose_orig( hmx); } DWORD WINAPI mixerMessage( HMIXER hmx, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerMessage\n"); return mixerMessage_orig( hmx, uMsg, dwParam1, dwParam2); } MMRESULT WINAPI mixerGetLineInfoA( HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineInfoA\n"); return mixerGetLineInfoA_orig( hmxobj, pmxl, fdwInfo); } MMRESULT WINAPI mixerGetLineInfoW( HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineInfoW\n"); return mixerGetLineInfoW_orig( hmxobj, pmxl, fdwInfo); } MMRESULT WINAPI mixerGetID( HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetID\n"); return mixerGetID_orig( hmxobj, puMxId, fdwId); } MMRESULT WINAPI mixerGetLineControlsA( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineControlsA\n"); return mixerGetLineControlsA_orig( hmxobj, pmxlc, fdwControls); } MMRESULT WINAPI mixerGetLineControlsW( HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetLineControlsW\n"); return mixerGetLineControlsW_orig( hmxobj, pmxlc, fdwControls); } MMRESULT WINAPI mixerGetControlDetailsA( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetControlDetailsA\n"); return mixerGetControlDetailsA_orig( hmxobj, pmxcd, fdwDetails); } MMRESULT WINAPI mixerGetControlDetailsW( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerGetControlDetailsW\n"); return mixerGetControlDetailsW_orig( hmxobj, pmxcd, fdwDetails); } MMRESULT WINAPI mixerSetControlDetails( HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mixerSetControlDetails\n"); return mixerSetControlDetails_orig( hmxobj, pmxcd, fdwDetails); } DWORD WINAPI mmGetCurrentTask(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmGetCurrentTask\n"); return mmGetCurrentTask_orig(); } void WINAPI mmTaskBlock(DWORD val) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskBlock\n"); return mmTaskBlock_orig(val); } UINT WINAPI mmTaskCreate(LPTASKCALLBACK a, HANDLE* b, DWORD_PTR c) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskCreate\n"); return mmTaskCreate_orig(a, b, c); } BOOL WINAPI mmTaskSignal(DWORD a) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskSignal\n"); return mmTaskSignal_orig(a); } VOID WINAPI mmTaskYield() { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmTaskYield\n"); mmTaskYield_orig(); } MMRESULT WINAPI timeGetSystemTime( LPMMTIME pmmt, UINT cbmmt) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetSystemTime\n"); return timeGetSystemTime_orig( pmmt, cbmmt); } DWORD WINAPI timeGetTime(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetTime\n"); return timeGetTime_orig(); } MMRESULT WINAPI timeSetEvent( UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD_PTR dwUser, UINT fuEvent) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeSetEvent\n"); return timeSetEvent_orig(uDelay, uResolution, fptc, dwUser, fuEvent); } MMRESULT WINAPI timeKillEvent( UINT uTimerID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeKillEvent\n"); return timeKillEvent_orig( uTimerID); } MMRESULT WINAPI timeGetDevCaps( LPTIMECAPS ptc, UINT cbtc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeGetDevCaps\n"); return timeGetDevCaps_orig( ptc, cbtc); } MMRESULT WINAPI timeBeginPeriod( UINT uPeriod) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeBeginPeriod\n"); return timeBeginPeriod_orig( uPeriod); } MMRESULT WINAPI timeEndPeriod( UINT uPeriod) { + ll_winmm_shim_initialize(); //OutputDebugString(L"timeEndPeriod\n"); return timeEndPeriod_orig( uPeriod); } UINT WINAPI joyGetNumDevs(void) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetNumDevs\n"); return joyGetNumDevs_orig(); } MMRESULT WINAPI joyConfigChanged(DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyConfigChanged\n"); return joyConfigChanged_orig(dwFlags); } MMRESULT WINAPI joyGetDevCapsA( UINT_PTR uJoyID, LPJOYCAPSA pjc, UINT cbjc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetDevCapsA\n"); return joyGetDevCapsA_orig( uJoyID, pjc, cbjc); } MMRESULT WINAPI joyGetDevCapsW( UINT_PTR uJoyID, LPJOYCAPSW pjc, UINT cbjc) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetDevCapsW\n"); return joyGetDevCapsW_orig( uJoyID, pjc, cbjc); } MMRESULT WINAPI joyGetPos( UINT uJoyID, LPJOYINFO pji) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetPos\n"); return joyGetPos_orig( uJoyID, pji); } MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetPosEx\n"); return joyGetPosEx_orig( uJoyID, pji); } MMRESULT WINAPI joyGetThreshold( UINT uJoyID, LPUINT puThreshold) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyGetThreshold\n"); return joyGetThreshold_orig( uJoyID, puThreshold); } MMRESULT WINAPI joyReleaseCapture( UINT uJoyID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joyReleaseCapture\n"); return joyReleaseCapture_orig( uJoyID); } MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joySetCapture\n"); return joySetCapture_orig(hwnd, uJoyID, uPeriod, fChanged); } MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold) { + ll_winmm_shim_initialize(); //OutputDebugString(L"joySetThreshold\n"); return joySetThreshold_orig( uJoyID, uThreshold); } BOOL WINAPI mciDriverNotify(HWND hwndCallback, UINT uDeviceID, UINT uStatus) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciDriverNotify\n"); return mciDriverNotify_orig(hwndCallback, uDeviceID, uStatus); } UINT WINAPI mciDriverYield(UINT uDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciDriverYield\n"); return mciDriverYield_orig(uDeviceID); } FOURCC WINAPI mmioStringToFOURCCA( LPCSTR sz, UINT uFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioStringToFOURCCA\n"); return mmioStringToFOURCCA_orig( sz, uFlags); } FOURCC WINAPI mmioStringToFOURCCW( LPCWSTR sz, UINT uFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioStringToFOURCCW\n"); return mmioStringToFOURCCW_orig( sz, uFlags); } LPMMIOPROC WINAPI mmioInstallIOProcA( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioInstallIOProcA\n"); return mmioInstallIOProcA_orig( fccIOProc, pIOProc, dwFlags); } LPMMIOPROC WINAPI mmioInstallIOProcW( FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioInstallIOProcW\n"); return mmioInstallIOProcW_orig( fccIOProc, pIOProc, dwFlags); } HMMIO WINAPI mmioOpenA( LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioOpenA\n"); return mmioOpenA_orig( pszFileName, pmmioinfo, fdwOpen); } HMMIO WINAPI mmioOpenW( LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioOpenW\n"); return mmioOpenW_orig( pszFileName, pmmioinfo, fdwOpen); } MMRESULT WINAPI mmioRenameA( LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRenameA\n"); return mmioRenameA_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename); } MMRESULT WINAPI mmioRenameW( LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRenameW\n"); return mmioRenameW_orig( pszFileName, pszNewFileName, pmmioinfo, fdwRename); } MMRESULT WINAPI mmioClose( HMMIO hmmio, UINT fuClose) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioClose\n"); return mmioClose_orig( hmmio, fuClose); } LONG WINAPI mmioRead( HMMIO hmmio, HPSTR pch, LONG cch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioRead\n"); return mmioRead_orig( hmmio, pch, cch); } LONG WINAPI mmioWrite( HMMIO hmmio, const char _huge* pch, LONG cch) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioWrite\n"); return mmioWrite_orig( hmmio, pch, cch); } LONG WINAPI mmioSeek( HMMIO hmmio, LONG lOffset, int iOrigin) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSeek\n"); return mmioSeek_orig(hmmio, lOffset, iOrigin); } MMRESULT WINAPI mmioGetInfo( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioGetInfo\n"); return mmioGetInfo_orig( hmmio, pmmioinfo, fuInfo); } MMRESULT WINAPI mmioSetInfo( HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSetInfo\n"); return mmioSetInfo_orig( hmmio, pmmioinfo, fuInfo); } MMRESULT WINAPI mmioSetBuffer( HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSetBuffer\n"); return mmioSetBuffer_orig(hmmio, pchBuffer, cchBuffer, fuBuffer); } MMRESULT WINAPI mmioFlush( HMMIO hmmio, UINT fuFlush) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioFlush\n"); return mmioFlush_orig( hmmio, fuFlush); } MMRESULT WINAPI mmioAdvance( HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioAdvance\n"); return mmioAdvance_orig( hmmio, pmmioinfo, fuAdvance); } LRESULT WINAPI mmioSendMessage( HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioSendMessage\n"); return mmioSendMessage_orig(hmmio, uMsg, lParam1, lParam2); } MMRESULT WINAPI mmioDescend( HMMIO hmmio, LPMMCKINFO pmmcki, const MMCKINFO FAR* pmmckiParent, UINT fuDescend) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioDescend\n"); return mmioDescend_orig(hmmio, pmmcki, pmmckiParent, fuDescend); } MMRESULT WINAPI mmioAscend( HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioAscend\n"); return mmioAscend_orig( hmmio, pmmcki, fuAscend); } MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mmioCreateChunk\n"); return mmioCreateChunk_orig(hmmio, pmmcki, fuCreate); } MCIERROR WINAPI mciSendCommandA( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendCommandA\n"); return mciSendCommandA_orig( mciId, uMsg, dwParam1, dwParam2); } MCIERROR WINAPI mciSendCommandW( MCIDEVICEID mciId, UINT uMsg, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendCommandW\n"); return mciSendCommandW_orig( mciId, uMsg, dwParam1, dwParam2); } MCIERROR WINAPI mciSendStringA( LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendStringA\n"); return mciSendStringA_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback); } MCIERROR WINAPI mciSendStringW( LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSendStringW\n"); return mciSendStringW_orig( lpstrCommand, lpstrReturnString, uReturnLength, hwndCallback); } @@ -1375,72 +1535,84 @@ extern "C" { MCIDEVICEID WINAPI mciGetDeviceIDW( LPCWSTR pszDevice) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDW\n"); return mciGetDeviceIDW_orig( pszDevice); } MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA( DWORD dwElementID, LPCSTR lpstrType ) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDFromElementIDA\n"); return mciGetDeviceIDFromElementIDA_orig( dwElementID, lpstrType ); } MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW( DWORD dwElementID, LPCWSTR lpstrType ) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDeviceIDFromElementIDW\n"); return mciGetDeviceIDFromElementIDW_orig( dwElementID, lpstrType ); } DWORD_PTR WINAPI mciGetDriverData(UINT uDeviceID) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetDriverData\n"); return mciGetDriverData_orig(uDeviceID); } BOOL WINAPI mciGetErrorStringA( MCIERROR mcierr, LPSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetErrorStringA\n"); return mciGetErrorStringA_orig( mcierr, pszText, cchText); } BOOL WINAPI mciGetErrorStringW( MCIERROR mcierr, LPWSTR pszText, UINT cchText) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetErrorStringW\n"); return mciGetErrorStringW_orig( mcierr, pszText, cchText); } BOOL WINAPI mciSetDriverData(UINT uDeviceID, DWORD_PTR dwData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSetDriverData_type\n"); return mciSetDriverData_orig( uDeviceID, dwData ); } BOOL WINAPI mciSetYieldProc( MCIDEVICEID mciId, YIELDPROC fpYieldProc, DWORD dwYieldData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciSetYieldProc\n"); return mciSetYieldProc_orig(mciId, fpYieldProc, dwYieldData); } BOOL WINAPI mciFreeCommandResource(UINT uTable) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciFreeCommandResource\n"); return mciFreeCommandResource_orig(uTable); } HTASK WINAPI mciGetCreatorTask( MCIDEVICEID mciId) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetCreatorTask\n"); return mciGetCreatorTask_orig( mciId); } YIELDPROC WINAPI mciGetYieldProc( MCIDEVICEID mciId, LPDWORD pdwYieldData) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciGetYieldProc\n"); return mciGetYieldProc_orig( mciId, pdwYieldData); } UINT WINAPI mciLoadCommandResource(HINSTANCE hInstance, LPCWSTR lpResName, UINT uType) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciLoadCommandResource"); return mciLoadCommandResource_orig(hInstance, lpResName, uType); } @@ -1448,6 +1620,7 @@ extern "C" { BOOL WINAPI mciExecute(LPCSTR pszCommand) { + ll_winmm_shim_initialize(); //OutputDebugString(L"mciExecute\n"); return mciExecute_orig(pszCommand); } diff --git a/indra/media_plugins/winmmshim/forwarding_api.h b/indra/media_plugins/winmmshim/forwarding_api.h index 89a6b347f3..076a08f769 100644 --- a/indra/media_plugins/winmmshim/forwarding_api.h +++ b/indra/media_plugins/winmmshim/forwarding_api.h @@ -30,6 +30,7 @@ #include <mmsystem.h> void init_function_pointers(HMODULE winmm_handle); +void ll_winmm_shim_initialize(); typedef VOID (*LPTASKCALLBACK)(DWORD_PTR dwInst); diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp index 9563a3b664..47a1e5c018 100644 --- a/indra/media_plugins/winmmshim/winmm_shim.cpp +++ b/indra/media_plugins/winmmshim/winmm_shim.cpp @@ -32,14 +32,21 @@ using std::wstring; static float sVolumeLevel = 1.f; static bool sMute = false; +static CRITICAL_SECTION sCriticalSection; BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { + InitializeCriticalSection(&sCriticalSection); + return TRUE; +} + +void ll_winmm_shim_initialize(){ static bool initialized = false; // do this only once + EnterCriticalSection(&sCriticalSection); if (!initialized) { // bind to original winmm.dll TCHAR system_path[MAX_PATH]; @@ -54,13 +61,15 @@ BOOL APIENTRY DllMain( HMODULE hModule, { // we have a dll, let's get out pointers! initialized = true; init_function_pointers(winmm_handle); - return true; + ::OutputDebugStringA("WINMM_SHIM.DLL: real winmm.dll initialized successfully\n"); + } + else + { + // failed to initialize real winmm.dll + ::OutputDebugStringA("WINMM_SHIM.DLL: Failed to initialize real winmm.dll\n"); } - - // failed to initialize real winmm.dll - return false; } - return true; + LeaveCriticalSection(&sCriticalSection); } @@ -79,6 +88,7 @@ extern "C" MMRESULT WINAPI waveOutOpen( LPHWAVEOUT phwo, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen) { + ll_winmm_shim_initialize(); if (pwfx->wFormatTag != WAVE_FORMAT_PCM || (pwfx->wBitsPerSample != 8 && pwfx->wBitsPerSample != 16)) { // uncompressed 8 and 16 bit sound are the only types we support @@ -97,6 +107,7 @@ extern "C" MMRESULT WINAPI waveOutClose( HWAVEOUT hwo) { + ll_winmm_shim_initialize(); wave_out_map_t::iterator found_it = sWaveOuts.find(hwo); if (found_it != sWaveOuts.end()) { // forget what we know about this handle @@ -108,6 +119,7 @@ extern "C" MMRESULT WINAPI waveOutWrite( HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh) { + ll_winmm_shim_initialize(); MMRESULT result = MMSYSERR_NOERROR; if (sMute) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b95c83e1ac..6b56da5edd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -652,17 +652,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>AvatarPhysicsTest</key> - <map> - <key>Comment</key> - <string>Simulate continuous physics behavior on all nearby avatars.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>AvatarSex</key> <map> <key>Comment</key> @@ -9557,7 +9546,7 @@ <key>ShowNetStats</key> <map> <key>Comment</key> - <string>Show the Search Bar in the Status Overlay</string> + <string>Show the Status Indicators for the Viewer and Network Usage in the Status Overlay</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -11673,7 +11662,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>VoiceDisableMic</key> + <key>VoiceDisableMic</key> <map> <key>Comment</key> <string>Completely disable the ability to open the mic.</string> @@ -11926,6 +11915,33 @@ <key>Value</key> <integer>0</integer> </map> + <key>WaterFogColor</key> + <map> + <key>Comment</key> + <string>Water fog color</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Color4</string> + <key>Value</key> + <array> + <real>0.0863</real> + <real>0.168</real> + <real>0.212</real> + <real>0</real> + </array> + </map> + <key>WaterFogDensity</key> + <map> + <key>Comment</key> + <string>Water fog density</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>16.0</real> + </map> <key>WaterGLFogDensityScale</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index 3d470b27c1..f2816c28f3 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -52,7 +52,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>HelpURLFormat</key> <map> @@ -133,7 +133,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>ScriptsCanShowUI</key> <map> @@ -290,7 +290,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>EnableAvatarShare</key> <map> diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 85899603ee..ce15c4b8f7 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -4339,8 +4339,8 @@ wearable="shape" edit_group="driven" value_default="0" - value_min="-2" - value_max="2"> + value_min="-3" + value_max="3"> <param_morph /> </param> @@ -4352,8 +4352,8 @@ wearable="shape" edit_group="driven" value_default="0" - value_min="-1" - value_max="1"> + value_min="-1.25" + value_max="1.25"> <param_morph /> </param> @@ -11875,7 +11875,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> <param_driver /> </param> @@ -11887,9 +11887,9 @@ render_pass="bump"> label="Breast Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> <param_driver /> </param> @@ -11914,9 +11914,9 @@ render_pass="bump"> label="Breast Physics UpDown Spring" wearable="physics" edit_group="physics_breasts_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -11940,11 +11940,9 @@ render_pass="bump"> label="Breast Physics UpDown Damping" wearable="physics" edit_group="physics_breasts_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1" - camera_elevation=".3" - camera_distance=".8"> + value_max="1"> <param_driver /> </param> @@ -11969,9 +11967,9 @@ render_pass="bump"> label="Breast Physics InOut Spring" wearable="physics" edit_group="physics_breasts_inout" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -11995,9 +11993,9 @@ render_pass="bump"> label="Breast Physics InOut Damping" wearable="physics" edit_group="physics_breasts_inout" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> <param_driver /> </param> @@ -12022,7 +12020,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> <param_driver /> </param> <param @@ -12032,9 +12030,9 @@ render_pass="bump"> label="Belly Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> <param_driver /> </param> <param @@ -12056,9 +12054,9 @@ render_pass="bump"> label="Belly Physics UpDown Spring" wearable="physics" edit_group="physics_belly_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -12080,9 +12078,9 @@ render_pass="bump"> label="Belly Physics UpDown Damping" wearable="physics" edit_group="physics_belly_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> <param_driver /> </param> @@ -12107,7 +12105,7 @@ render_pass="bump"> edit_group="physics_advanced" value_default="0" value_min="0" - value_max=".1"> + value_max="30"> <param_driver /> </param> <param @@ -12117,9 +12115,9 @@ render_pass="bump"> label="Butt Physics Drag" wearable="physics" edit_group="physics_advanced" - value_default=".15" + value_default="1" value_min="0" - value_max=".5"> + value_max="10"> <param_driver /> </param> @@ -12142,9 +12140,9 @@ render_pass="bump"> label="Butt Physics UpDown Spring" wearable="physics" edit_group="physics_butt_updown" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -12166,9 +12164,9 @@ render_pass="bump"> label="Butt Physics UpDown Damping" wearable="physics" edit_group="physics_butt_updown" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> <param_driver /> </param> @@ -12191,9 +12189,9 @@ render_pass="bump"> label="Butt Physics LeftRight Spring" wearable="physics" edit_group="physics_butt_leftright" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -12215,9 +12213,9 @@ render_pass="bump"> label="Butt Physics LeftRight Damping" wearable="physics" edit_group="physics_butt_leftright" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> <param_driver /> </param> @@ -12242,9 +12240,9 @@ render_pass="bump"> label="Breast Physics LeftRight Spring" wearable="physics" edit_group="physics_breasts_leftright" - value_default=".1" + value_default="10" value_min="0" - value_max="1"> + value_max="100"> <param_driver /> </param> <param @@ -12268,9 +12266,9 @@ render_pass="bump"> label="Breast Physics LeftRight Damping" wearable="physics" edit_group="physics_breasts_leftright" - value_default=".05" + value_default=".2" value_min="0" - value_max=".1"> + value_max="1"> <param_driver /> </param> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 15ad330418..af2d951bf7 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -132,7 +132,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 -RenderAvatarPhysicsLODFactor 1 0.9 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index a2cd4b834c..5da1495da9 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 @@ -70,6 +71,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -100,6 +102,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -128,6 +131,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -156,6 +160,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 3ad7f4e892..421f9c0973 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 0 RenderAvatarCloth 0 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 0 RenderCubeMap 1 1 @@ -70,6 +71,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -99,6 +101,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -126,6 +129,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -153,6 +157,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 38e6bb1e5e..c2e5dfff9f 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -26,6 +26,7 @@ list all RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 RenderAvatarVP 1 1 RenderCubeMap 1 1 @@ -71,6 +72,7 @@ list Low RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0 +RenderAvatarPhysicsLODFactor 1 0 RenderAvatarMaxVisible 1 3 RenderAvatarVP 1 0 RenderFarClip 1 64 @@ -101,6 +103,7 @@ list Mid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 +RenderAvatarPhysicsLODFactor 1 0.75 RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 @@ -129,6 +132,7 @@ list High RenderAnisotropic 1 1 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 @@ -157,6 +161,7 @@ list Ultra RenderAnisotropic 1 1 RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarVP 1 1 RenderFarClip 1 256 RenderFlexTimeFactor 1 1.0 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cbd996f909..9de2941c4a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2467,6 +2467,14 @@ bool LLAppViewer::initConfiguration() } } + // If automatic login from command line with --login switch + // init StartSLURL location. In interactive login, LLPanelLogin + // will take care of it. + if ((clp.hasOption("login") || clp.hasOption("autologin")) && !clp.hasOption("url") && !clp.hasOption("slurl")) + { + LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation"))); + } + if (!gSavedSettings.getBOOL("AllowMultipleViewers")) { // @@ -3523,10 +3531,10 @@ bool LLAppViewer::initCache() LLAppViewer::getTextureCache()->setReadOnly(read_only) ; LLVOCache::getInstance()->setReadOnly(read_only); - BOOL texture_cache_mismatch = FALSE ; + bool texture_cache_mismatch = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) { - texture_cache_mismatch = TRUE ; + texture_cache_mismatch = true; if(!read_only) { gSavedSettings.setS32("LocalCacheVersion", LLAppViewer::getTextureCacheVersion()); @@ -3540,7 +3548,9 @@ bool LLAppViewer::initCache() gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) { gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); - mPurgeCache = true; + mPurgeCache = true; + // STORM-1141 force purgeAllTextures to get called to prevent a crash here. -brad + texture_cache_mismatch = true; } // We have moved the location of the cache directory over time. diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 6d40786b08..a29f157cdf 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -493,26 +493,6 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask) mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box); } -void LLBottomTray::showGestureButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_GESTURES, visible); -} - -void LLBottomTray::showMoveButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_MOVEMENT, visible); -} - -void LLBottomTray::showCameraButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_CAMERA, visible); -} - -void LLBottomTray::showSnapshotButton(BOOL visible) -{ - setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible); -} - void LLBottomTray::showSpeakButton(bool visible) { // Show/hide the button @@ -945,15 +925,14 @@ void LLBottomTray::log(LLView* panel, const std::string& descr) { if (NULL == panel) return; LLView* layout = panel->getParent(); - lldebugs << descr << ": " + LL_DEBUGS("Bottom Tray Rects") << descr << ": " << "panel: " << panel->getName() << ", rect: " << panel->getRect() - << "layout: " << layout->getName() + << " layout: " << layout->getName() << ", rect: " << layout->getRect() - << llendl - ; + << LL_ENDL; } void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) @@ -973,7 +952,9 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) if (mNearbyChatBar) log(mNearbyChatBar, "before"); if (mChicletPanel) log(mChicletPanel, "before"); - // stores width size on which bottom tray is less than width required by its children. EXT-991 + // Difference between bottom tray width required to fit its children and the actual width. (see EXT-991) + // Positive value means that bottom tray is not wide enough. + // Negative value means that there is free space. static S32 extra_shrink_width = 0; bool should_be_reshaped = true; @@ -995,11 +976,9 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) // bottom tray is narrowed if (delta_width < 0) { - if (extra_shrink_width > 0) + if (extra_shrink_width > 0) // not enough space { - // is world rect was extra shrunk and decreasing again only update this value - // to delta_width negative - extra_shrink_width -= delta_width; // use "-=" because delta_width is negative + extra_shrink_width += llabs(delta_width); should_be_reshaped = false; } else @@ -1010,13 +989,13 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) width += extra_shrink_width; } } - // bottom tray is widen + // bottom tray is widened else { if (extra_shrink_width > delta_width) { - // Less than minimum width is more than increasing (delta_width) - // only reduce it value and make no reshape + // Still not enough space. + // Only subtract the delta from the required delta and don't reshape. extra_shrink_width -= delta_width; should_be_reshaped = false; } @@ -1056,6 +1035,7 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) { mDesiredNearbyChatWidth = new_width; processChatbarCustomization(new_width); + lldebugs << "Setting nearby chat bar width to " << new_width << " px" << llendl; mChatBarContainer->reshape(new_width, mChatBarContainer->getRect().getHeight()); } needs_restore_custom_state = false; @@ -1067,30 +1047,28 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) { bool still_should_be_processed = true; - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); + const S32 chiclet_panel_shrink_headroom = getChicletPanelShrinkHeadroom(); // There are four steps of processing width decrease. If in one of them required width was reached, // further are not needed. // 1. Decreasing width of chiclet panel. - if (chiclet_panel_width > chiclet_panel_min_width) + if (chiclet_panel_shrink_headroom > 0) { // we have some space to decrease chiclet panel - S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; - - S32 delta_panel = llmin(-delta_width, panel_delta_min); + S32 shrink_by = llmin(-delta_width, chiclet_panel_shrink_headroom); lldebugs << "delta_width: " << delta_width - << ", panel_delta_min: " << panel_delta_min - << ", delta_panel: " << delta_panel + << ", panel_delta_min: " << chiclet_panel_shrink_headroom + << ", shrink_by: " << shrink_by << llendl; - // is chiclet panel width enough to process resizing? - delta_width += panel_delta_min; + // is chiclet panel wide enough to process resizing? + delta_width += chiclet_panel_shrink_headroom; still_should_be_processed = delta_width < 0; - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); + lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl; + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after processing panel decreasing via chiclet panel"); lldebugs << "RS_CHICLET_PANEL" @@ -1114,7 +1092,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) S32 delta_panel = llmin(-delta_width, panel_delta_min); - // whether chatbar panel width is enough to process resizing? + // is chatbar panel wide enough to process resizing? delta_width += panel_delta_min; still_should_be_processed = delta_width < 0; @@ -1122,6 +1100,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) // chatbar should only be shrunk here, not stretched if(delta_panel > 0) { + lldebugs << "Shrinking nearby chat bar by " << delta_panel << " px " << llendl; mChatBarContainer->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight()); } @@ -1153,6 +1132,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) { S32 compensative_width = nearby_needed_width > buttons_freed_width ? buttons_freed_width : nearby_needed_width; log(mNearbyChatBar, "before applying compensative width"); + lldebugs << "Extending nearby chat bar by " << compensative_width << " px" << llendl; mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() + compensative_width, mChatBarContainer->getRect().getHeight() ); log(mNearbyChatBar, "after applying compensative width"); lldebugs << buttons_freed_width << llendl; @@ -1167,52 +1147,46 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) { if (delta_width <= 0) return; - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - - const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; + // how much room we have to show hidden buttons + S32 available_width = delta_width + getChicletPanelShrinkHeadroom(); - // how many room we have to show hidden buttons - S32 total_available_width = delta_width + available_width_chiclet; - - lldebugs << "Processing extending, available width:" - << ", chiclets - " << available_width_chiclet - << ", total - " << total_available_width - << llendl; + lldebugs << "Distributing (" << getChicletPanelShrinkHeadroom() + << " + " << delta_width << ") = " << available_width << " px" << llendl; - S32 available_width = total_available_width; + // 1. Try showing buttons that have been auto-hidden. + S32 processed_width = processShowButtons(available_width); + lldebugs << "processed_width = " << processed_width << ", delta_width = " << delta_width << llendl; - processShowButtons(available_width); + lldebugs << "Available_width after showing buttons: " << available_width << llendl; - // if we have to show/extend some buttons but resized delta width is not enough... - S32 processed_width = total_available_width - available_width; + // If the newly shown buttons have consumed more than delta_width pixels, + // shrink the chiclet panel. if (processed_width > delta_width) { - // ... let's shrink nearby chat & chiclet panels - S32 required_to_process_width = processed_width; - // 1. use delta width of resizing - required_to_process_width -= delta_width; + S32 shrink_by = processed_width - delta_width; // 2. use width available via decreasing of chiclet panel - if (required_to_process_width > 0) + if (shrink_by > 0) { - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_to_process_width, mChicletPanel->getParent()->getRect().getHeight()); + lldebugs << "Shrinking chiclet panel by " << shrink_by << " px" << llendl; + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - shrink_by, mChicletPanel->getParent()->getRect().getHeight()); log(mChicletPanel, "after applying compensative width for chiclets: "); - lldebugs << required_to_process_width << llendl; + lldebugs << shrink_by << llendl; } + // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels + delta_width -= processed_width; } - // shown buttons take some space, rest should be processed by nearby chatbar & chiclet panels - delta_width -= processed_width; - - - // how many space can nearby chatbar take? - S32 chatbar_panel_width_ = mChatBarContainer->getRect().getWidth(); - if (delta_width > 0 && chatbar_panel_width_ < mDesiredNearbyChatWidth) + // 2. Expand the nearby chat bar if needed. + S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth(); + lldebugs << "delta_width = " << delta_width + << ", chatbar_panel_width = " << chatbar_panel_width + << ", mDesiredNearbyChatWidth = " << mDesiredNearbyChatWidth << llendl; + if (delta_width > 0 && chatbar_panel_width < mDesiredNearbyChatWidth) { - S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width_; + S32 delta_panel_max = mDesiredNearbyChatWidth - chatbar_panel_width; S32 delta_panel = llmin(delta_width, delta_panel_max); lldebugs << "Unprocesed delta width: " << delta_width << ", can be applied to chatbar: " << delta_panel_max @@ -1220,17 +1194,25 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) << llendl; delta_width -= delta_panel_max; - mChatBarContainer->reshape(chatbar_panel_width_ + delta_panel, mChatBarContainer->getRect().getHeight()); + lldebugs << "Extending nearby chat bar by " << delta_panel << " px " << llendl; + mChatBarContainer->reshape(chatbar_panel_width + delta_panel, mChatBarContainer->getRect().getHeight()); log(mNearbyChatBar, "applied unprocessed delta width"); } + + // 3. Expand buttons that have been auto-shrunk, + // if we haven't yet consumed all the available headroom. if (delta_width > 0) { - processExtendButtons(delta_width); + S32 available_width = delta_width + getChicletPanelShrinkHeadroom(); + processExtendButtons(available_width); } } -void LLBottomTray::processShowButtons(S32& available_width) +S32 LLBottomTray::processShowButtons(S32& available_width) { + lldebugs << "Distributing " << available_width << " px" << llendl; + S32 original_available_width = available_width; + // process buttons from left to right resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); @@ -1243,37 +1225,20 @@ void LLBottomTray::processShowButtons(S32& available_width) // try to show next button processShowButton(*it, available_width); } + + return original_available_width - available_width; } bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32& available_width) { - lldebugs << "Trying to show object type: " << shown_object_type << llendl; - - LLPanel* panel = getButtonPanel(shown_object_type); - if (NULL == panel) + // Check if the button was previously auto-hidden (due to lack of space). + if (!isAutoHidden(shown_object_type)) { - lldebugs << "There is no object to process for state: " << shown_object_type << llendl; return false; } - bool can_be_shown = canButtonBeShown(shown_object_type); - if (can_be_shown) - { - //validate if we have enough room to show this button - const S32 required_width = panel->getRect().getWidth(); - can_be_shown = available_width >= required_width; - if (can_be_shown) - { - available_width -= required_width; - - setTrayButtonVisible(shown_object_type, true); - lldebugs << "processed object type: " << shown_object_type - << ", rest available width: " << available_width - << llendl; - mResizeState &= ~shown_object_type; - } - } - return can_be_shown; + // Ok. Try showing the button. + return showButton(shown_object_type, available_width); } void LLBottomTray::processHideButtons(S32& required_width, S32& buttons_freed_width) @@ -1298,7 +1263,6 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& re LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for state: " << processed_object_type << llendl; return; } @@ -1313,7 +1277,7 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32& re setTrayButtonVisible(processed_object_type, false); - mResizeState |= processed_object_type; + setAutoHidden(processed_object_type, true); lldebugs << "processing object type: " << processed_object_type << ", buttons_freed_width: " << buttons_freed_width @@ -1382,7 +1346,6 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for type: " << processed_object_type << llendl; return; } @@ -1427,125 +1390,130 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& void LLBottomTray::processExtendButtons(S32& available_width) { // do not allow extending any buttons if we have some buttons hidden via resize - if (mResizeState & RS_BUTTONS_CAN_BE_HIDDEN) return; + if (isAutoHidden(RS_BUTTONS_CAN_BE_HIDDEN)) return; - // process buttons from left to right - resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); - const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + lldebugs << "Distributing " << available_width << " px" << llendl; - // iterate through buttons in the mButtonsProcessOrder first - for (; it != it_end; ++it) + // First try extending the Speak button. + if (available_width > 0) { - // is there available space? - if (available_width <= 0) break; - - // try to extend next button - processExtendButton(*it, available_width); + if (!processExtendSpeakButton(available_width)) + { + // The Speak button needs extension but lacks some space. + // Don't extend other buttons in this case: the Speak button + // should consume the available headroom first. + return; + } } - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; + // Then process the other buttons from left to right. + if (available_width > 0) + { + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + + // iterate through buttons in the mButtonsProcessOrder first + for (; it != it_end; ++it) + { + // is there available space? + if (available_width <= 0) break; - // then try to extend Speak button - if (available_width > 0 || available_width_chiclet > 0) + // try to extend next button + processExtendButton(*it, available_width); + } + } +} + +bool LLBottomTray::processExtendSpeakButton(S32& available_width) +{ + if (available_width <= 0) { - S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; - S32 panel_width = mSpeakPanel->getRect().getWidth(); - S32 possible_extend_width = panel_max_width - panel_width; + llassert(available_width > 0); + return true; + } - if (possible_extend_width >= 0 && possible_extend_width <= available_width + available_width_chiclet) // HACK: this button doesn't change size so possible_extend_width will be 0 - { - if (mSpeakBtn) - { - mSpeakBtn->setLabelVisible(true); - } + const S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; + const S32 panel_width = mSpeakPanel->getRect().getWidth(); + const S32 required_headroom = panel_max_width - panel_width; - mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); + if (panel_width < panel_max_width) // if the button isn't extended already + { + if (available_width < required_headroom) // not enough space + { + lldebugs << "Need (" << required_headroom << " - " << available_width << ") = " + << (required_headroom - available_width) << " more px" + << " to extend the Speak button"<< llendl; - if( available_width > possible_extend_width) - { - available_width -= possible_extend_width; - } - else - { - S32 required_width = possible_extend_width - available_width; - available_width = 0; - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_width, mChicletPanel->getParent()->getRect().getHeight()); - } - lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() - << ", extended width: " << possible_extend_width - << ", rest width to process: " << available_width - << llendl; + return false; // Don't extend other buttons until we extend Speak. } + + // Reshape the Speak button to its maximum width. + if (mSpeakBtn) mSpeakBtn->setLabelVisible(true); + mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); + + available_width -= required_headroom; + llassert(available_width >= 0); + + lldebugs << "Extending Speak button panel: " << mSpeakPanel->getName() + << ", extended width: " << required_headroom + << ", rest width to process: " << available_width + << llendl; } + + return true; } void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32& available_width) { + llassert(available_width >= 0); + LLPanel* panel = getButtonPanel(processed_object_type); if (NULL == panel) { - lldebugs << "There is no object to process for type: " << processed_object_type << llendl; return; } if (!panel->getVisible()) return; + // Widen the button up to its maximum width, but by not more than <available_width> px. S32 panel_max_width = mObjectDefaultWidthMap[processed_object_type]; S32 panel_width = panel->getRect().getWidth(); - S32 possible_extend_width = panel_max_width - panel_width; + S32 required_headroom = panel_max_width - panel_width; - if (possible_extend_width > 0) + S32 extend_by = llmin(available_width, required_headroom); + if (extend_by > 0) { - // let calculate real width to extend - - // 1. apply all possible width - available_width -= possible_extend_width; + panel->reshape(panel_width + extend_by, panel->getRect().getHeight()); - // 2. it it is too much... - if (available_width < 0) - { - // reduce applied extended width to the excessive value. - possible_extend_width += available_width; - available_width = 0; - } - panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight()); + // Decrease amount of headroom available for other panels. + available_width -= extend_by; - lldebugs << "Extending panel: " << panel->getName() - << ", extended width: " << possible_extend_width - << ", rest width to process: " << available_width + lldebugs << "Extending " << panel->getName() + << " by " << extend_by + << " px; remaining available width: " << available_width << llendl; } } bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { - // 0. Check if passed button was previously hidden on resize - bool can_be_shown = mResizeState & processed_object_type; - if (can_be_shown) - { - // Yes, it was. Lets now check that all buttons before it (that can be hidden on resize) - // are already shown - - // process buttons in direct order (from left to right) - resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); - const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); + // Check that all buttons (that can be hidden on resize) + // to the left of the given one are already shown. - // 1. Find and accumulate all buttons types before one passed into the method. - MASK buttons_before_mask = RS_NORESIZE; - for (; it != it_end; ++it) - { - const EResizeState button_type = *it; - if (button_type == processed_object_type) break; + // process buttons in direct order (from left to right) + resize_state_vec_t::const_iterator it = mButtonsProcessOrder.begin(); + const resize_state_vec_t::const_iterator it_end = mButtonsProcessOrder.end(); - buttons_before_mask |= button_type; - } + MASK buttons_before_mask = RS_NORESIZE; + for (; it != it_end; ++it) + { + const EResizeState button_type = *it; + if (button_type == processed_object_type) break; - // 2. Check if some previous buttons are still hidden on resize - can_be_shown = !(buttons_before_mask & mResizeState); + buttons_before_mask |= button_type; } - return can_be_shown; + + return !isAutoHidden(buttons_before_mask); } void LLBottomTray::initResizeStateContainers() @@ -1608,6 +1576,7 @@ void LLBottomTray::initButtonsVisibility() setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton")); setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton")); setVisibleAndFitWidths(RS_BUTTON_MINI_MAP, gSavedSettings.getBOOL("ShowMiniMapButton")); + lldebugs << "mResizeState = " << resizeStateMaskToString(mResizeState) << llendl; } void LLBottomTray::setButtonsControlsAndListeners() @@ -1639,12 +1608,53 @@ bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, cons return true; } +bool LLBottomTray::showButton(EResizeState button_type, S32& available_width) +{ + LLPanel* panel = getButtonPanel(button_type); + if (NULL == panel) + { + return false; + } + + if (panel->getVisible()) + { + return false; + } + + // Check if none of the buttons to the left of the given one was auto-hidden. + // (we auto-show the buttons left to right). + if (!canButtonBeShown(button_type)) + { + return false; + } + + // Make sure we have enough room to show this button. + const S32 required_width = panel->getRect().getWidth(); + if (available_width < required_width) + { + lldebugs << "Need " << (required_width - available_width) << " more px to show " << resizeStateToString(button_type) << llendl; + return false; + } + + // All good. Show the button. + setTrayButtonVisible(button_type, true); + + // Let the caller know that there is now less available space. + available_width -= required_width; + + lldebugs << "Showing button " << resizeStateToString(button_type) + << ", remaining available width: " << available_width + << llendl; + setAutoHidden(button_type, false); + + return true; +} + void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) { LLPanel* panel = getButtonPanel(shown_object_type); if (NULL == panel) { - lldebugs << "There is no object to show for state: " << shown_object_type << llendl; return; } @@ -1675,7 +1685,6 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible LLPanel* cur_panel = getButtonPanel(object_type); if (NULL == cur_panel) { - lldebugs << "There is no object to process for state: " << object_type << llendl; return false; } @@ -1684,17 +1693,13 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible if (visible) { // Assume that only chiclet panel can be auto-resized - const S32 available_width = - mChicletPanel->getParent()->getRect().getWidth() - mChicletPanel->getMinWidth(); + const S32 available_width = getChicletPanelShrinkHeadroom(); S32 preferred_width = mObjectDefaultWidthMap[object_type]; S32 current_width = cur_panel->getRect().getWidth(); S32 result_width = 0; bool decrease_width = false; - // Mark this button to be shown - mResizeState |= object_type; - if (preferred_width > 0 && available_width >= preferred_width) { result_width = preferred_width; @@ -1738,7 +1743,11 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible } else { - // Nothing can be done, give up... + lldebugs << "Need " << (minimal_width - available_width - possible_shrunk_width) + << " more px to show " << resizeStateToString(object_type) << llendl; + + // Make the button uppear when we have more available space. + setAutoHidden(object_type, true); return false; } } @@ -1749,7 +1758,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible current_width = result_width; } - is_set = processShowButton(object_type, current_width); + is_set = showButton(object_type, current_width); // Shrink buttons if needed if (is_set && decrease_width) @@ -1764,7 +1773,8 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible setTrayButtonVisible(object_type, false); // Mark button NOT to show while future bottom tray extending - mResizeState &= ~object_type; + lldebugs << "Removing " << resizeStateToString(object_type) << " from mResizeState" << llendl; + setAutoHidden(object_type, false); // Extend other buttons if need if (delta_width) @@ -1821,12 +1831,14 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) if (delta_width == 0) return; + { + static unsigned dbg_cnt = 0; + lldebugs << llformat("*** (%03d) ************************************* %d", delta_width, ++dbg_cnt) << llendl; + } + mDesiredNearbyChatWidth = new_width; - LLView * chiclet_layout_panel = mChicletPanel->getParent(); - const S32 chiclet_min_width = get_panel_min_width(mToolbarStack, chiclet_layout_panel); - const S32 chiclet_panel_width = chiclet_layout_panel->getRect().getWidth(); - const S32 available_chiclet_shrink_width = chiclet_panel_width - chiclet_min_width; + const S32 available_chiclet_shrink_width = getChicletPanelShrinkHeadroom(); llassert(available_chiclet_shrink_width >= 0); if (delta_width > 0) // panel gets narrowly @@ -1845,6 +1857,16 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) } } +S32 LLBottomTray::getChicletPanelShrinkHeadroom() const +{ + static const S32 min_width = mChicletPanel->getMinWidth(); + const S32 cur_width = mChicletPanel->getParent()->getRect().getWidth(); + + S32 shrink_headroom = cur_width - min_width; + llassert(shrink_headroom >= 0); // the panel cannot get narrower than the minimum + return shrink_headroom; +} + // static std::string LLBottomTray::resizeStateToString(EResizeState state) { @@ -1870,4 +1892,54 @@ std::string LLBottomTray::resizeStateToString(EResizeState state) return "UNKNOWN_BUTTON"; } +// static +std::string LLBottomTray::resizeStateMaskToString(MASK mask) +{ + std::string res; + + bool add_delimiter = false; + for (U32 i = 0; i < 16; i++) + { + EResizeState state = (EResizeState) (1 << i); + if (mask & state) + { + if (!add_delimiter) + { + add_delimiter = true; + } + else + { + res += ", "; + } + + res += resizeStateToString(state); + } + } + + if (res.empty()) + { + res = resizeStateToString(RS_NORESIZE); + } + + res += llformat(" (0x%X)", mask); + return res; +} + +bool LLBottomTray::isAutoHidden(MASK button_types) const +{ + return (mResizeState & button_types) != 0; +} + +void LLBottomTray::setAutoHidden(MASK button_types, bool hide) +{ + if (hide) + { + mResizeState |= button_types; + } + else + { + mResizeState &= ~button_types; + } +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 04e5f5e9e0..52bcd2ddac 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -112,10 +112,6 @@ public: void showBottomTrayContextMenu(S32 x, S32 y, MASK mask); - void showGestureButton(BOOL visible); - void showMoveButton(BOOL visible); - void showCameraButton(BOOL visible); - void showSnapshotButton(BOOL visible); void showSpeakButton(bool visible); void toggleMovementControls(); @@ -240,8 +236,9 @@ private: * * @params[in, out] available_width - reference to available width to be used to show buttons. * @see processShowButton() + * @return consumed pixels (difference in available width). */ - void processShowButtons(S32& available_width); + S32 processShowButtons(S32& available_width); /** * Tries to show panel with specified button using available width. @@ -317,6 +314,20 @@ private: void processExtendButtons(S32& available_width); /** + * Extends the Speak button if there is anough headroom. + * + * Unlike other buttons, the Speak buttons has only two possible widths: + * the minimal one (without label) and the maximal (default) one. + * + * If the button is at its minimum width there is not enough headroom to + * reshape it to the maximum width, the method does nothing. + * + * @param available_width Available headroom. + * @return false if the button requires extension but there's not enough headroom, true otherwise. + */ + bool processExtendSpeakButton(S32& available_width); + + /** * Extends shown button to increase total taken space. * * @params[in] processed_object_type - type of button to be extended. @@ -365,6 +376,16 @@ private: static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility); /** + * Show the button if there is enough space. + * + * @param[in] button_type - type of button to be shown. + * @param[in, out] available_width amount of available space on the bottom bar. + * + * @return true if button was shown, false that's not possible (not enough space, etc) + */ + bool showButton(EResizeState button_type, S32& available_width); + + /** * Sets passed visibility to object specified by resize type. */ void setTrayButtonVisible(EResizeState shown_object_type, bool visible); @@ -417,9 +438,27 @@ private: */ void processChatbarCustomization(S32 new_width); + /** + * @return difference between current chiclet panel width and the minimum. + */ + S32 getChicletPanelShrinkHeadroom() const; + /// Get button name for debugging. static std::string resizeStateToString(EResizeState state); + /// Dump a mask for debugging + static std::string resizeStateMaskToString(MASK mask); + + /// @return true if any of the the passed buttons have been auto-hidden due to lack of available space. + bool isAutoHidden(MASK button_types) const; + + /** + * (Un)Mark the buttons as hidden. + * + * Auto-hidden buttons are those that re-appear as soon as we have enough available space. + */ + void setAutoHidden(MASK button_types, bool hide); + /// Buttons automatically hidden due to lack of space. MASK mResizeState; diff --git a/indra/newview/llbreastmotion.cpp b/indra/newview/llbreastmotion.cpp index 7c205a8b9f..9a8cd5ceae 100644 --- a/indra/newview/llbreastmotion.cpp +++ b/indra/newview/llbreastmotion.cpp @@ -2,31 +2,25 @@ * @file llbreastmotion.cpp * @brief Implementation of LLBreastMotion class. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ diff --git a/indra/newview/llbreastmotion.h b/indra/newview/llbreastmotion.h index 8578d4ad1a..aa0fdf9f8b 100644 --- a/indra/newview/llbreastmotion.h +++ b/indra/newview/llbreastmotion.h @@ -2,31 +2,25 @@ * @file llbreastmotion.h * @brief Implementation of LLBreastMotion class. * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp index fcc73a07bc..18ae6107e7 100644 --- a/indra/newview/lldateutil.cpp +++ b/indra/newview/lldateutil.cpp @@ -32,9 +32,9 @@ #include "llui.h" static S32 DAYS_PER_MONTH_NOLEAP[] = - { 31, 28, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static S32 DAYS_PER_MONTH_LEAP[] = - { 31, 29, 21, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static S32 days_from_month(S32 year, S32 month) { diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 5e10f60aba..5501b8c2ac 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -123,10 +123,7 @@ void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL calle { LLTextEditor::reshape(width, height, called_from_parent); - if (getTextPixelHeight() > getRect().getHeight()) - { - showExpandText(); - } + hideOrShowExpandTextAsNeeded(); } void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params) @@ -136,17 +133,7 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons mExpanderVisible = false; LLTextEditor::setText(text, input_params); - // text contents have changed, segments are cleared out - // so hide the expander and determine if we need it - //mExpanderVisible = false; - if (getTextPixelHeight() > getRect().getHeight()) - { - showExpandText(); - } - else - { - hideExpandText(); - } + hideOrShowExpandTextAsNeeded(); } @@ -200,6 +187,22 @@ S32 LLExpandableTextBox::LLTextBoxEx::getTextPixelHeight() return getTextBoundingRect().getHeight(); } +void LLExpandableTextBox::LLTextBoxEx::hideOrShowExpandTextAsNeeded() +{ + // Restore the text box contents to calculate the text height properly, + // otherwise if a part of the text is hidden under "More" link + // getTextPixelHeight() returns only the height of currently visible text + // including the "More" link. See STORM-250. + hideExpandText(); + + // Show the expander a.k.a. "More" link if we need it, depending on text + // contents height. If not, keep it hidden. + if (getTextPixelHeight() > getRect().getHeight()) + { + showExpandText(); + } +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index bce77225c4..f75ef954ff 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -77,6 +77,12 @@ protected: */ void hideExpandText(); + /** + * Shows the "More" link if the text is too high to be completely + * visible without expanding the text box. Hides that link otherwise. + */ + void hideOrShowExpandTextAsNeeded(); + protected: LLTextBoxEx(const Params& p); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1a9d0af9af..c7fce83b03 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -43,6 +43,7 @@ #include "llcombobox.h" #include "llcommandhandler.h" #include "lldirpicker.h" +#include "lleventtimer.h" #include "llfeaturemanager.h" #include "llfocusmgr.h" //#include "llfirstuse.h" @@ -73,6 +74,7 @@ #include "llviewerwindow.h" #include "llviewermessage.h" #include "llviewershadermgr.h" +#include "llviewerthrottle.h" #include "llvotree.h" #include "llvosky.h" @@ -109,6 +111,7 @@ const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; +const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; //control value for middle mouse as talk2push button const static std::string MIDDLE_MOUSE_CV = "MiddleMouse"; @@ -286,8 +289,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mOriginalIMViaEmail(false), mLanguageChanged(false), mAvatarDataInitialized(false), - mDoubleClickActionDirty(false), - mFavoritesRecordMayExist(false) + mDoubleClickActionDirty(false) { //Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); @@ -412,6 +414,8 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged)); + gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2)); LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); @@ -565,34 +569,6 @@ void LLFloaterPreference::apply() updateDoubleClickSettings(); mDoubleClickActionDirty = false; } - - if (mFavoritesRecordMayExist && !gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin")) - { - removeFavoritesRecordOfUser(); - } -} - -void LLFloaterPreference::removeFavoritesRecordOfUser() -{ - mFavoritesRecordMayExist = false; - std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); - LLSD fav_llsd; - llifstream file; - file.open(filename); - if (!file.is_open()) return; - LLSDSerialize::fromXML(fav_llsd, file); - - LLAvatarName av_name; - LLAvatarNameCache::get( gAgentID, &av_name ); - if (fav_llsd.has(av_name.getLegacyName())) - { - fav_llsd.erase(av_name.getLegacyName()); - } - - llofstream out_file; - out_file.open(filename); - LLSDSerialize::toPrettyXML(fav_llsd, out_file); - } void LLFloaterPreference::cancel() @@ -678,11 +654,6 @@ void LLFloaterPreference::onOpen(const LLSD& key) getChildView("maturity_desired_combobox")->setVisible( false); } - if (LLStartUp::getStartupState() == STATE_STARTED) - { - mFavoritesRecordMayExist = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"); - } - // Forget previous language changes. mLanguageChanged = false; @@ -1558,10 +1529,56 @@ void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location) cache_location_editor->setToolTip(location); } +//------------------------------Updater--------------------------------------- + +static bool handleBandwidthChanged(const LLSD& newvalue) +{ + gViewerThrottle.setMaxBandwidth((F32) newvalue.asReal()); + return true; +} + +class LLPanelPreference::Updater : public LLEventTimer +{ + +public: + + typedef boost::function<bool(const LLSD&)> callback_t; + + Updater(callback_t cb, F32 period) + :LLEventTimer(period), + mCallback(cb) + { + mEventTimer.stop(); + } + + virtual ~Updater(){} + + void update(const LLSD& new_value) + { + mNewValue = new_value; + mEventTimer.start(); + } + +protected: + + BOOL tick() + { + mCallback(mNewValue); + mEventTimer.stop(); + + return FALSE; + } + +private: + + LLSD mNewValue; + callback_t mCallback; +}; //---------------------------------------------------------------------------- static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference"); LLPanelPreference::LLPanelPreference() -: LLPanel() +: LLPanel(), + mBandWidthUpdater(NULL) { mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1)); @@ -1631,10 +1648,24 @@ BOOL LLPanelPreference::postBuild() } } + //////////////////////PanelSetup /////////////////// + if (hasChild("max_bandwidth")) + { + mBandWidthUpdater = new LLPanelPreference::Updater(boost::bind(&handleBandwidthChanged, _1), BANDWIDTH_UPDATER_TIMEOUT); + gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&LLPanelPreference::Updater::update, mBandWidthUpdater, _2)); + } + apply(); return true; } +LLPanelPreference::~LLPanelPreference() +{ + if (mBandWidthUpdater) + { + delete mBandWidthUpdater; + } +} void LLPanelPreference::apply() { // no-op diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 5d5e066ec5..5fe509fb37 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -159,8 +159,6 @@ public: void buildPopupLists(); static void refreshSkin(void* data); - // Remove record of current user's favorites from file on disk. - void removeFavoritesRecordOfUser(); private: static std::string sSkin; // set true if state of double-click action checkbox or radio-group was changed by user @@ -172,8 +170,6 @@ private: bool mAvatarDataInitialized; bool mOriginalHideOnlineStatus; - // Record of current user's favorites may be stored in file on disk. - bool mFavoritesRecordMayExist; std::string mDirectoryVisibility; LLAvatarData mAvatarProperties; @@ -185,6 +181,8 @@ public: LLPanelPreference(); /*virtual*/ BOOL postBuild(); + virtual ~LLPanelPreference(); + virtual void apply(); virtual void cancel(); void setControlFalse(const LLSD& user_data); @@ -198,6 +196,7 @@ public: // cancel() can restore them. virtual void saveSettings(); + class Updater; private: //for "Only friends and groups can call or IM me" static void showFriendsOnlyWarning(LLUICtrl*, const LLSD&); @@ -209,6 +208,8 @@ private: typedef std::map<std::string, LLColor4> string_color_map_t; string_color_map_t mSavedColors; + + Updater* mBandWidthUpdater; }; class LLPanelPreferenceGraphics : public LLPanelPreference diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index f74ae92a7b..50a9c56518 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -56,6 +56,7 @@ #include "llrootview.h" #include "llspeakers.h" #include "llsidetray.h" +#include "llviewerchat.h" static const S32 RECT_PADDING_NOT_INIT = -1; @@ -266,7 +267,9 @@ BOOL LLIMFloater::postBuild() mInputEditor->setMaxTextLength(1023); // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); - + + LLFontGL* font = LLViewerChat::getChatFont(); + mInputEditor->setFont(font); mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) ); mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) ); @@ -891,6 +894,7 @@ void LLIMFloater::updateChatHistoryStyle() void LLIMFloater::processChatHistoryStyleUpdate(const LLSD& newvalue) { + LLFontGL* font = LLViewerChat::getChatFont(); LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel"); for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) @@ -899,6 +903,7 @@ void LLIMFloater::processChatHistoryStyleUpdate(const LLSD& newvalue) if (floater) { floater->updateChatHistoryStyle(); + floater->mInputEditor->setFont(font); } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 622a5607df..bdb9f6167a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4681,7 +4681,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if (LLWearableType::getAllowMultiwear(mWearableType)) { items.push_back(std::string("Wearable Add")); - if (gAgentWearables.getWearableCount(mWearableType) > 0) + if (gAgentWearables.getWearableCount(mWearableType) >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) { disabled_items.push_back(std::string("Wearable Add")); } diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index e22363c2f6..dee15a1efd 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -510,9 +510,15 @@ void LLInventoryFilter::setHoursAgo(U32 hours) { if (mFilterOps.mHoursAgo != hours) { + bool are_date_limits_valid = mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max(); + + bool is_increasing = hours > mFilterOps.mHoursAgo; + bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo; + // *NOTE: need to cache last filter time, in case filter goes stale - BOOL less_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours > mFilterOps.mHoursAgo); - BOOL more_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours <= mFilterOps.mHoursAgo); + BOOL less_restrictive = (are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo)) || !hours); + BOOL more_restrictive = (are_date_limits_valid && (!is_increasing && hours) || is_increasing_from_zero); + mFilterOps.mHoursAgo = hours; mFilterOps.mMinDate = time_min(); mFilterOps.mMaxDate = time_max(); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 53835f0166..b1975c7261 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1059,12 +1059,11 @@ void LLInventoryModel::idleNotifyObservers() { return; } - notifyObservers(""); + notifyObservers(); } // Call this method when it's time to update everyone on a new state. -// The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328] -void LLInventoryModel::notifyObservers(const std::string service_name) +void LLInventoryModel::notifyObservers() { if (mIsNotifyObservers) { @@ -1081,15 +1080,7 @@ void LLInventoryModel::notifyObservers(const std::string service_name) { LLInventoryObserver* observer = *iter; - if (service_name.empty()) - { - observer->changed(mModifyMask); - } - else - { - observer->mMessageName = service_name; - observer->changed(mModifyMask); - } + observer->changed(mModifyMask); // safe way to increment since changed may delete entries! (@!##%@!@&*!) iter = mObservers.upper_bound(observer); @@ -1187,7 +1178,7 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) { changes |= gInventory.updateItem(*it); } - gInventory.notifyObservers("fetchinventory"); + gInventory.notifyObservers(); gViewerWindow->getWindow()->decBusyCount(); } @@ -1196,7 +1187,7 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str { llinfos << "fetchInventory::error " << status << ": " << reason << llendl; - gInventory.notifyObservers("fetchinventory"); + gInventory.notifyObservers(); } bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index f6728fd575..15da09990f 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -425,9 +425,8 @@ public: // has been indicated. void idleNotifyObservers(); - // Call to explicitly update everyone on a new state. The optional argument - // 'service_name' is used by Agent Inventory Service [DEV-20328] - void notifyObservers(const std::string service_name=""); + // Call to explicitly update everyone on a new state. + void notifyObservers(); // Allows outsiders to tell the inventory if something has // been changed 'under the hood', but outside the control of the diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index e31360fcbc..7b1ff102e7 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -388,7 +388,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) titem->setParent(lost_uuid); titem->updateParentOnServer(FALSE); gInventory.updateItem(titem); - gInventory.notifyObservers("fetchDescendents"); + gInventory.notifyObservers(); } } @@ -464,7 +464,7 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) fetcher->setAllFoldersFetched(); } - gInventory.notifyObservers("fetchDescendents"); + gInventory.notifyObservers(); } // If we get back an error (not found, etc...), handle it here. @@ -496,7 +496,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str fetcher->setAllFoldersFetched(); } } - gInventory.notifyObservers("fetchDescendents"); + gInventory.notifyObservers(); } BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat_id) const diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 0fd4b2bee5..6bf19e346d 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -572,16 +572,7 @@ void LLInventoryAddedObserver::changed(U32 mask) // the network, figure out which item was updated. LLMessageSystem* msg = gMessageSystem; - std::string msg_name; - if (mMessageName.empty()) - { - msg_name = msg->getMessageName(); - } - else - { - msg_name = mMessageName; - } - + std::string msg_name = msg->getMessageName(); if (msg_name.empty()) { return; diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index f2a2049a51..2d9021961e 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -63,7 +63,6 @@ public: LLInventoryObserver(); virtual ~LLInventoryObserver(); virtual void changed(U32 mask) = 0; - std::string mMessageName; // used by Agent Inventory Service only. [DEV-20328] }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 572eeb8fc7..03ebc344f1 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -250,9 +250,13 @@ void LLNearbyChat::getAllowedRect(LLRect& rect) void LLNearbyChat::updateChatHistoryStyle() { mChatHistory->clear(); + + LLSD do_not_log; + do_not_log["do_not_log"] = true; for(std::vector<LLChat>::iterator it = mMessageArchive.begin();it!=mMessageArchive.end();++it) { - addMessage(*it,false); + // Update the messages without re-writing them to a log file. + addMessage(*it,false, do_not_log); } } diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 162e465fef..d3fd959152 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -47,6 +47,7 @@ #include "llwindow.h" #include "llviewerwindow.h" #include "llrootview.h" +#include "llviewerchat.h" S32 LLNearbyChatBar::sLastSpecialChatChannel = 0; @@ -433,13 +434,26 @@ BOOL LLNearbyChatBar::postBuild() mChatBox->setPassDelete(TRUE); mChatBox->setReplaceNewlinesWithSpaces(FALSE); mChatBox->setEnableLineHistory(TRUE); + mChatBox->setFont(LLViewerChat::getChatFont()); mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); mOutputMonitor->setVisible(FALSE); + // Register for font change notifications + LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); + return TRUE; } +void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp) +{ + // Update things with the new font whohoo + if (mChatBox) + { + mChatBox->setFont(fontp); + } +} + //static LLNearbyChatBar* LLNearbyChatBar::getInstance() { diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 96ab45071b..efddec942f 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -127,6 +127,7 @@ protected: void sendChat( EChatType type ); void onChatBoxCommit(); + void onChatFontChange(LLFontGL* fontp); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); EChatType processChatTypeTriggers(EChatType type, std::string &str); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 8bd2d5ad6a..b73d97e4c4 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1133,7 +1133,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); - + if (!panel_list) { llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; @@ -1145,7 +1145,18 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; continue; } - + + // Don't show female subparts if you're not female, etc. + if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) + { + tab->setVisible(FALSE); + continue; + } + else + { + tab->setVisible(TRUE); + } + // what edit group do we want to extract params for? const std::string edit_group = subpart_entry->mEditGroup; @@ -1196,6 +1207,12 @@ void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) void LLPanelEditWearable::changeCamera(U8 subpart) { + // Don't change the camera if this type doesn't have a camera switch. + // Useful for wearables like physics that don't have an associated physical body part. + if (LLWearableType::getDisableCameraSwitch(mWearablePtr->getType())) + { + return; + } const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(mWearablePtr->getType()); if (!wearable_entry) { diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a5385b0b1c..4ac3a248d3 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -81,6 +81,10 @@ const S32 MAX_PASSWORD = 16; LLPanelLogin *LLPanelLogin::sInstance = NULL; BOOL LLPanelLogin::sCapslockDidNotification = FALSE; +// Helper for converting a user name into the canonical "Firstname Lastname" form. +// For new accounts without a last name "Resident" is added as a last name. +static std::string canonicalize_username(const std::string& name); + class LLLoginRefreshHandler : public LLCommandHandler { public: @@ -232,7 +236,14 @@ void LLPanelLogin::addFavoritesToStartLocation() for (LLSD::map_const_iterator iter = fav_llsd.beginMap(); iter != fav_llsd.endMap(); ++iter) { - if(iter->first != getChild<LLComboBox>("username_combo")->getSimple()) continue; + std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); + + // The account name in stored_favorites.xml has Resident last name even if user has + // a single word account name, so it can be compared case-insensitive with the + // user defined "firstname lastname". + S32 res = LLStringUtil::compareInsensitive(canonicalize_username(user_defined_name), iter->first); + if (res != 0) continue; + combo->addSeparator(); LLSD user_llsd = iter->second; for (LLSD::array_const_iterator iter1 = user_llsd.beginArray(); @@ -1036,3 +1047,28 @@ void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& n break; } } + +std::string canonicalize_username(const std::string& name) +{ + std::string cname = name; + LLStringUtil::trim(cname); + + // determine if the username is a first/last form or not. + size_t separator_index = cname.find_first_of(" ._"); + std::string first = cname.substr(0, separator_index); + std::string last; + if (separator_index != cname.npos) + { + last = cname.substr(separator_index+1, cname.npos); + LLStringUtil::trim(last); + } + else + { + // ...on Linden grids, single username users as considered to have + // last name "Resident" + last = "Resident"; + } + + // Username in traditional "firstname lastname" form. + return first + ' ' + last; +} diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 0c3f2f3e31..90617b7dc7 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -81,7 +81,6 @@ public: BOOL getCheckSinceLogoff(); static void onTimeAgo(LLUICtrl*, void *); - static void onCheckSinceLogoff(LLUICtrl*, void *); static void onCloseBtn(void* user_data); static void selectAllTypes(void* user_data); static void selectNoTypes(void* user_data); @@ -619,20 +618,6 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento updateElementsFromFilter(); } - -void LLFloaterInventoryFinder::onCheckSinceLogoff(LLUICtrl *ctrl, void *user_data) -{ - LLFloaterInventoryFinder *self = (LLFloaterInventoryFinder *)user_data; - if (!self) return; - - bool since_logoff= self->getChild<LLUICtrl>("check_since_logoff")->getValue(); - - if (!since_logoff && - !( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() ) ) - { - self->mSpinSinceHours->set(1.0f); - } -} BOOL LLFloaterInventoryFinder::postBuild() { const LLRect& viewrect = mPanelMainInventory->getRect(); @@ -647,9 +632,6 @@ BOOL LLFloaterInventoryFinder::postBuild() mSpinSinceDays = getChild<LLSpinCtrl>("spin_days_ago"); childSetCommitCallback("spin_days_ago", onTimeAgo, this); - // mCheckSinceLogoff = getChild<LLSpinCtrl>("check_since_logoff"); - childSetCommitCallback("check_since_logoff", onCheckSinceLogoff, this); - childSetAction("Close", onCloseBtn, this); updateElementsFromFilter(); @@ -660,12 +642,10 @@ void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data) LLFloaterInventoryFinder *self = (LLFloaterInventoryFinder *)user_data; if (!self) return; - bool since_logoff=true; if ( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() ) { - since_logoff = false; + self->getChild<LLUICtrl>("check_since_logoff")->setValue(false); } - self->getChild<LLUICtrl>("check_since_logoff")->setValue(since_logoff); } void LLFloaterInventoryFinder::changeFilter(LLInventoryFilter* filter) diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index acf8973f03..30a04109bc 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -1,701 +1,732 @@ -/**
- * @file llphysicsmotion.cpp
- * @brief Implementation of LLPhysicsMotion class.
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-#include "llviewerprecompiledheaders.h"
-#include "linden_common.h"
-
-#include "m3math.h"
-#include "v3dmath.h"
-
-#include "llphysicsmotion.h"
-#include "llcharacter.h"
-#include "llviewercontrol.h"
-#include "llviewervisualparam.h"
-#include "llvoavatarself.h"
-
-typedef std::map<std::string, std::string> controller_map_t;
-typedef std::map<std::string, F32> default_controller_map_t;
-
-#define MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION 0.f;
-
-inline F64 llsgn(const F64 a)
-{
- if (a >= 0)
- return 1;
- return -1;
-}
-
-/*
- At a high level, this works by setting temporary parameters that are not stored
- in the avatar's list of params, and are not conveyed to other users. We accomplish
- this by creating some new temporary driven params inside avatar_lad that are then driven
- by the actual params that the user sees and sets. For example, in the old system,
- the user sets a param called breast bouyancy, which controls the Z value of the breasts.
- In our new system, the user still sets the breast bouyancy, but that param is redefined
- as a driver param so that affects a new temporary driven param that the bounce is applied
- to.
-*/
-
-class LLPhysicsMotion
-{
-public:
- /*
- param_driver_name: The param that controls the params that are being affected by the physics.
- joint_name: The joint that the body part is attached to. The joint is
- used to determine the orientation (rotation) of the body part.
-
- character: The avatar that this physics affects.
-
- motion_direction_vec: The direction (in world coordinates) that determines the
- motion. For example, (0,0,1) is up-down, and means that up-down motion is what
- determines how this joint moves.
-
- controllers: The various settings (e.g. spring force, mass) that determine how
- the body part behaves.
- */
- LLPhysicsMotion(const std::string ¶m_driver_name,
- const std::string &joint_name,
- LLCharacter *character,
- const LLVector3 &motion_direction_vec,
- const controller_map_t &controllers) :
- mParamDriverName(param_driver_name),
- mJointName(joint_name),
- mMotionDirectionVec(motion_direction_vec),
- mParamDriver(NULL),
- mParamControllers(controllers),
- mCharacter(character),
- mLastTime(0),
- mPosition_local(0),
- mVelocityJoint_local(0),
- mPositionLastUpdate_local(0)
- {
- mJointState = new LLJointState;
- }
-
- BOOL initialize();
-
- ~LLPhysicsMotion() {}
-
- BOOL onUpdate(F32 time);
-
- LLPointer<LLJointState> getJointState()
- {
- return mJointState;
- }
-protected:
- F32 getParamValue(const std::string& controller_key)
- {
- const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key);
- if (entry == mParamControllers.end())
- {
- return sDefaultController[controller_key];
- }
- const std::string& param_name = (*entry).second.c_str();
- return mCharacter->getVisualParamWeight(param_name.c_str());
- }
- void setParamValue(LLViewerVisualParam *param,
- const F32 new_value_local);
-
- F32 toLocal(const LLVector3 &world);
- F32 calculateVelocity_local(const F32 time_delta);
- F32 calculateAcceleration_local(F32 velocity_local,
- const F32 time_delta);
-private:
- const std::string mParamDriverName;
- const std::string mParamControllerName;
- const LLVector3 mMotionDirectionVec;
- const std::string mJointName;
-
- F32 mPosition_local;
- F32 mVelocityJoint_local; // How fast the joint is moving
- F32 mAccelerationJoint_local; // Acceleration on the joint
-
- F32 mVelocity_local; // How fast the param is moving
- F32 mPositionLastUpdate_local;
- LLVector3 mPosition_world;
-
- LLViewerVisualParam *mParamDriver;
- const controller_map_t mParamControllers;
-
- LLPointer<LLJointState> mJointState;
- LLCharacter *mCharacter;
-
- F32 mLastTime;
-
- static default_controller_map_t sDefaultController;
-};
-
-default_controller_map_t initDefaultController()
-{
- default_controller_map_t controller;
- controller["Mass"] = 0.2f;
- controller["Gravity"] = 0.0f;
- controller["Damping"] = .05f;
- controller["Drag"] = 0.15f;
- controller["MaxEffect"] = 0.1f;
- controller["Spring"] = 0.1f;
- controller["Gain"] = 10.0f;
- return controller;
-}
-
-default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController();
-
-BOOL LLPhysicsMotion::initialize()
-{
- if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str())))
- return FALSE;
- mJointState->setUsage(LLJointState::ROT);
-
- mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str());
- if (mParamDriver == NULL)
- {
- llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl;
- return FALSE;
- }
-
- return TRUE;
-}
-
-LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) :
- LLMotion(id),
- mCharacter(NULL)
-{
- mName = "breast_motion";
-}
-
-LLPhysicsMotionController::~LLPhysicsMotionController()
-{
- for (motion_vec_t::iterator iter = mMotions.begin();
- iter != mMotions.end();
- ++iter)
- {
- delete (*iter);
- }
-}
-
-BOOL LLPhysicsMotionController::onActivate()
-{
- return TRUE;
-}
-
-void LLPhysicsMotionController::onDeactivate()
-{
-}
-
-LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter *character)
-{
- mCharacter = character;
-
- mMotions.clear();
-
- // Breast Cleavage
- {
- controller_map_t controller;
- controller["Mass"] = "Breast_Physics_Mass";
- controller["Gravity"] = "Breast_Physics_Gravity";
- controller["Drag"] = "Breast_Physics_Drag";
- controller["Damping"] = "Breast_Physics_InOut_Damping";
- controller["MaxEffect"] = "Breast_Physics_InOut_Max_Effect";
- controller["Spring"] = "Breast_Physics_InOut_Spring";
- controller["Gain"] = "Breast_Physics_InOut_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_InOut_Controller",
- "mChest",
- character,
- LLVector3(-1,0,0),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
-
- // Breast Bounce
- {
- controller_map_t controller;
- controller["Mass"] = "Breast_Physics_Mass";
- controller["Gravity"] = "Breast_Physics_Gravity";
- controller["Drag"] = "Breast_Physics_Drag";
- controller["Damping"] = "Breast_Physics_UpDown_Damping";
- controller["MaxEffect"] = "Breast_Physics_UpDown_Max_Effect";
- controller["Spring"] = "Breast_Physics_UpDown_Spring";
- controller["Gain"] = "Breast_Physics_UpDown_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_UpDown_Controller",
- "mChest",
- character,
- LLVector3(0,0,1),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
-
- // Breast Sway
- {
- controller_map_t controller;
- controller["Mass"] = "Breast_Physics_Mass";
- controller["Gravity"] = "Breast_Physics_Gravity";
- controller["Drag"] = "Breast_Physics_Drag";
- controller["Damping"] = "Breast_Physics_LeftRight_Damping";
- controller["MaxEffect"] = "Breast_Physics_LeftRight_Max_Effect";
- controller["Spring"] = "Breast_Physics_LeftRight_Spring";
- controller["Gain"] = "Breast_Physics_LeftRight_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_LeftRight_Controller",
- "mChest",
- character,
- LLVector3(0,-1,0),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
- // Butt Bounce
- {
- controller_map_t controller;
- controller["Mass"] = "Butt_Physics_Mass";
- controller["Gravity"] = "Butt_Physics_Gravity";
- controller["Drag"] = "Butt_Physics_Drag";
- controller["Damping"] = "Butt_Physics_UpDown_Damping";
- controller["MaxEffect"] = "Butt_Physics_UpDown_Max_Effect";
- controller["Spring"] = "Butt_Physics_UpDown_Spring";
- controller["Gain"] = "Butt_Physics_UpDown_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_UpDown_Controller",
- "mPelvis",
- character,
- LLVector3(0,0,-1),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
-
- // Butt LeftRight
- {
- controller_map_t controller;
- controller["Mass"] = "Butt_Physics_Mass";
- controller["Gravity"] = "Butt_Physics_Gravity";
- controller["Drag"] = "Butt_Physics_Drag";
- controller["Damping"] = "Butt_Physics_LeftRight_Damping";
- controller["MaxEffect"] = "Butt_Physics_LeftRight_Max_Effect";
- controller["Spring"] = "Butt_Physics_LeftRight_Spring";
- controller["Gain"] = "Butt_Physics_LeftRight_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller",
- "mPelvis",
- character,
- LLVector3(0,-1,0),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
-
- // Belly Bounce
- {
- controller_map_t controller;
- controller["Mass"] = "Belly_Physics_Mass";
- controller["Gravity"] = "Belly_Physics_Gravity";
- controller["Drag"] = "Belly_Physics_Drag";
- controller["Damping"] = "Belly_Physics_UpDown_Damping";
- controller["MaxEffect"] = "Belly_Physics_UpDown_Max_Effect";
- controller["Spring"] = "Belly_Physics_UpDown_Spring";
- controller["Gain"] = "Belly_Physics_UpDown_Gain";
- LLPhysicsMotion *motion = new LLPhysicsMotion("Belly_Physics_UpDown_Controller",
- "mPelvis",
- character,
- LLVector3(0,0,-1),
- controller);
- if (!motion->initialize())
- {
- llassert_always(FALSE);
- return STATUS_FAILURE;
- }
- addMotion(motion);
- }
-
- return STATUS_SUCCESS;
-}
-
-void LLPhysicsMotionController::addMotion(LLPhysicsMotion *motion)
-{
- addJointState(motion->getJointState());
- mMotions.push_back(motion);
-}
-
-F32 LLPhysicsMotionController::getMinPixelArea()
-{
- return MIN_REQUIRED_PIXEL_AREA_BREAST_MOTION;
-}
-
-// Local space means "parameter space".
-F32 LLPhysicsMotion::toLocal(const LLVector3 &world)
-{
- LLJoint *joint = mJointState->getJoint();
- const LLQuaternion rotation_world = joint->getWorldRotation();
-
- LLVector3 dir_world = mMotionDirectionVec * rotation_world;
- dir_world.normalize();
- return world * dir_world;
-}
-
-F32 LLPhysicsMotion::calculateVelocity_local(const F32 time_delta)
-{
- LLJoint *joint = mJointState->getJoint();
- const LLVector3 position_world = joint->getWorldPosition();
- const LLQuaternion rotation_world = joint->getWorldRotation();
- const LLVector3 last_position_world = mPosition_world;
- const LLVector3 velocity_world = (position_world-last_position_world) / time_delta;
- const F32 velocity_local = toLocal(velocity_world);
- return velocity_local;
-}
-
-F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local,
- const F32 time_delta)
-{
-// const F32 smoothing = getParamValue("Smoothing");
- static const F32 smoothing = 3.0f; // Removed smoothing param since it's probably not necessary
- const F32 acceleration_local = velocity_local - mVelocityJoint_local;
-
- const F32 smoothed_acceleration_local =
- acceleration_local * 1.0/smoothing +
- mAccelerationJoint_local * (smoothing-1.0)/smoothing;
-
- return smoothed_acceleration_local;
-}
-
-BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
-{
- // Skip if disabled globally.
- if (!gSavedSettings.getBOOL("AvatarPhysics"))
- {
- return TRUE;
- }
-
- BOOL update_visuals = FALSE;
- for (motion_vec_t::iterator iter = mMotions.begin();
- iter != mMotions.end();
- ++iter)
- {
- LLPhysicsMotion *motion = (*iter);
- update_visuals |= motion->onUpdate(time);
- }
-
- if (update_visuals)
- mCharacter->updateVisualParams();
-
- return TRUE;
-}
-
-
-// Return TRUE if character has to update visual params.
-BOOL LLPhysicsMotion::onUpdate(F32 time)
-{
- // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w");
-
- if (!mParamDriver)
- return FALSE;
-
- if (!mLastTime)
- {
- mLastTime = time;
- return FALSE;
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // Get all parameters and settings
- //
-
- const F32 time_delta = time - mLastTime;
- if (time_delta > 3.0 || time_delta <= 0.01)
- {
- mLastTime = time;
- return FALSE;
- }
-
- // Higher LOD is better. This controls the granularity
- // and frequency of updates for the motions.
- const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor;
- if (lod_factor == 0)
- {
- return TRUE;
- }
-
- LLJoint *joint = mJointState->getJoint();
-
- const F32 behavior_mass = getParamValue("Mass");
- const F32 behavior_gravity = getParamValue("Gravity");
- const F32 behavior_spring = getParamValue("Spring");
- const F32 behavior_gain = getParamValue("Gain");
- const F32 behavior_damping = getParamValue("Damping");
- const F32 behavior_drag = getParamValue("Drag");
- const BOOL physics_test = gSavedSettings.getBOOL("AvatarPhysicsTest");
-
- F32 behavior_maxeffect = getParamValue("MaxEffect");
- if (physics_test)
- behavior_maxeffect = 1.0f;
- // Maximum effect is [0,1] range.
- const F32 min_val = 0.5f-behavior_maxeffect/2.0;
- const F32 max_val = 0.5f+behavior_maxeffect/2.0;
-
- // mPositon_local should be in normalized 0,1 range already. Just making sure...
- F32 position_current_local = llclamp(mPosition_local,
- 0.0f,
- 1.0f);
-
- // Normalize the param position to be from [0,1].
- // We have to use normalized values because there may be more than one driven param,
- // and each of these driven params may have its own range.
- // This means we'll do all our calculations in normalized [0,1] local coordinates.
- F32 position_user_local = mParamDriver->getWeight();
- position_user_local = (position_user_local - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight());
-
- // If the effect is turned off then don't process unless we need one more update
- // to set the position to the default (i.e. user) position.
- if ((behavior_maxeffect == 0) && (position_current_local == position_user_local))
- {
- return FALSE;
- }
-
- //
- // End parameters and settings
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate velocity and acceleration in parameter space.
- //
-
- const F32 velocity_joint_local = calculateVelocity_local(time_delta);
- const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local, time_delta);
-
- //
- // End velocity and acceleration
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate the total force
- //
-
- // Spring force is a restoring force towards the original user-set breast position.
- // F = kx
- const F32 spring_length = position_current_local - position_user_local;
- const F32 force_spring = -spring_length * behavior_spring;
-
- // Acceleration is the force that comes from the change in velocity of the torso.
- // F = ma
- const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass);
-
- // Gravity always points downward in world space.
- // F = mg
- const LLVector3 gravity_world(0,0,1);
- const F32 force_gravity = behavior_gain * (toLocal(gravity_world) * behavior_gravity * behavior_mass);
-
- // Damping is a restoring force that opposes the current velocity.
- // F = -kv
- const F32 force_damping = -behavior_damping * mVelocity_local;
-
- // Drag is a force imparted by velocity (intuitively it is similar to wind resistance)
- // F = .5kv^2
- const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local);
-
- const F32 force_net = (force_accel +
- force_gravity +
- force_spring +
- force_damping +
- force_drag);
-
- //
- // End total force
- ////////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////////
- // Calculate new params
- //
-
- // Calculate the new acceleration based on the net force.
- // a = F/m
- const F32 acceleration_new_local = force_net / behavior_mass;
- static const F32 max_acceleration = 10.0f; // magic number, used to be customizable.
- F32 velocity_new_local = mVelocity_local + acceleration_new_local;
- velocity_new_local = llclamp(velocity_new_local,
- -max_acceleration, max_acceleration);
-
- // Temporary debugging setting to cause all avatars to move, for profiling purposes.
- if (physics_test)
- {
- velocity_new_local = sin(time*4.0);
- }
- // Calculate the new parameters, or remain unchanged if max speed is 0.
- F32 position_new_local = position_current_local + velocity_new_local*time_delta;
- if (behavior_maxeffect == 0)
- position_new_local = position_user_local;
-
- // Zero out the velocity if the param is being pushed beyond its limits.
- if ((position_new_local < min_val && velocity_new_local < 0) ||
- (position_new_local > max_val && velocity_new_local > 0))
- {
- velocity_new_local = 0;
- }
-
- const F32 position_new_local_clamped = llclamp(position_new_local,
- min_val,
- max_val);
-
- LLDriverParam *driver_param = dynamic_cast<LLDriverParam *>(mParamDriver);
- llassert_always(driver_param);
- if (driver_param)
- {
- // If this is one of our "hidden" driver params, then make sure it's
- // the default value.
- if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) &&
- (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT))
- {
- mCharacter->setVisualParamWeight(driver_param,
- 0,
- FALSE);
- }
- for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin();
- iter != driver_param->mDriven.end();
- ++iter)
- {
- LLDrivenEntry &entry = (*iter);
- LLViewerVisualParam *driven_param = entry.mParam;
- setParamValue(driven_param,position_new_local_clamped);
- }
- }
-
- //
- // End calculate new params
- ////////////////////////////////////////////////////////////////////////////////
-
- ////////////////////////////////////////////////////////////////////////////////
- // Conditionally update the visual params
- //
-
- // Updating the visual params (i.e. what the user sees) is fairly expensive.
- // So only update if the params have changed enough, and also take into account
- // the graphics LOD settings.
-
- BOOL update_visuals = FALSE;
-
- // For non-self, if the avatar is small enough visually, then don't update.
- const F32 area_for_max_settings = 0.0;
- const F32 area_for_min_settings = 1400.0;
- const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor);
- const F32 pixel_area = fsqrtf(mCharacter->getPixelArea());
-
- const BOOL is_self = (dynamic_cast<LLVOAvatarSelf *>(mCharacter) != NULL);
- if ((pixel_area > area_for_this_setting) || is_self)
- {
- const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped);
- const F32 min_delta = (1.01f-lod_factor)*0.4f;
- if (llabs(position_diff_local) > min_delta)
- {
- update_visuals = TRUE;
- mPositionLastUpdate_local = position_new_local;
- }
- }
-
- //
- // End update visual params
- ////////////////////////////////////////////////////////////////////////////////
-
- mVelocityJoint_local = velocity_joint_local;
-
- mVelocity_local = velocity_new_local;
- mAccelerationJoint_local = acceleration_joint_local;
- mPosition_local = position_new_local;
-
- mPosition_world = joint->getWorldPosition();
- mLastTime = time;
-
- /*
- // Write out debugging info into a spreadsheet.
- if (mFileWrite != NULL && is_self)
- {
- fprintf(mFileWrite,"%f\t%f\t%f \t\t%f \t\t%f\t%f\t%f\t \t\t%f\t%f\t%f\t%f\t%f \t\t%f\t%f\t%f\n",
- position_new_local,
- velocity_new_local,
- acceleration_new_local,
-
- time_delta,
-
- mPosition_world[0],
- mPosition_world[1],
- mPosition_world[2],
-
- force_net,
- force_spring,
- force_accel,
- force_damping,
- force_drag,
-
- spring_length,
- velocity_joint_local,
- acceleration_joint_local
- );
- }
- */
-
- return update_visuals;
-}
-
-// Range of new_value_local is assumed to be [0 , 1] normalized.
-void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param,
- F32 new_value_normalized)
-{
- const F32 value_min_local = param->getMinWeight();
- const F32 value_max_local = param->getMaxWeight();
-
- const F32 new_value_local = value_min_local + (value_max_local-value_min_local) * new_value_normalized;
-
- mCharacter->setVisualParamWeight(param,
- new_value_local,
- FALSE);
-}
+/** + * @file llphysicsmotion.cpp + * @brief Implementation of LLPhysicsMotion class. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +//----------------------------------------------------------------------------- +// Header Files +//----------------------------------------------------------------------------- +#include "llviewerprecompiledheaders.h" +#include "linden_common.h" + +#include "m3math.h" +#include "v3dmath.h" + +#include "llphysicsmotion.h" +#include "llagent.h" +#include "llcharacter.h" +#include "llviewercontrol.h" +#include "llviewervisualparam.h" +#include "llvoavatarself.h" + +typedef std::map<std::string, std::string> controller_map_t; +typedef std::map<std::string, F32> default_controller_map_t; + +#define MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION 0.f +#define TIME_ITERATION_STEP 0.1f + +inline F64 llsgn(const F64 a) +{ + if (a >= 0) + return 1; + return -1; +} + +/* + At a high level, this works by setting temporary parameters that are not stored + in the avatar's list of params, and are not conveyed to other users. We accomplish + this by creating some new temporary driven params inside avatar_lad that are then driven + by the actual params that the user sees and sets. For example, in the old system, + the user sets a param called breast bouyancy, which controls the Z value of the breasts. + In our new system, the user still sets the breast bouyancy, but that param is redefined + as a driver param so that affects a new temporary driven param that the bounce is applied + to. +*/ + +class LLPhysicsMotion +{ +public: + /* + param_driver_name: The param that controls the params that are being affected by the physics. + joint_name: The joint that the body part is attached to. The joint is + used to determine the orientation (rotation) of the body part. + + character: The avatar that this physics affects. + + motion_direction_vec: The direction (in world coordinates) that determines the + motion. For example, (0,0,1) is up-down, and means that up-down motion is what + determines how this joint moves. + + controllers: The various settings (e.g. spring force, mass) that determine how + the body part behaves. + */ + LLPhysicsMotion(const std::string ¶m_driver_name, + const std::string &joint_name, + LLCharacter *character, + const LLVector3 &motion_direction_vec, + const controller_map_t &controllers) : + mParamDriverName(param_driver_name), + mJointName(joint_name), + mMotionDirectionVec(motion_direction_vec), + mParamDriver(NULL), + mParamControllers(controllers), + mCharacter(character), + mLastTime(0), + mPosition_local(0), + mVelocityJoint_local(0), + mPositionLastUpdate_local(0) + { + mJointState = new LLJointState; + } + + BOOL initialize(); + + ~LLPhysicsMotion() {} + + BOOL onUpdate(F32 time); + + LLPointer<LLJointState> getJointState() + { + return mJointState; + } +protected: + F32 getParamValue(const std::string& controller_key) + { + const controller_map_t::const_iterator& entry = mParamControllers.find(controller_key); + if (entry == mParamControllers.end()) + { + return sDefaultController[controller_key]; + } + const std::string& param_name = (*entry).second.c_str(); + return mCharacter->getVisualParamWeight(param_name.c_str()); + } + void setParamValue(LLViewerVisualParam *param, + const F32 new_value_local, + F32 behavior_maxeffect); + + F32 toLocal(const LLVector3 &world); + F32 calculateVelocity_local(); + F32 calculateAcceleration_local(F32 velocity_local); +private: + const std::string mParamDriverName; + const std::string mParamControllerName; + const LLVector3 mMotionDirectionVec; + const std::string mJointName; + + F32 mPosition_local; + F32 mVelocityJoint_local; // How fast the joint is moving + F32 mAccelerationJoint_local; // Acceleration on the joint + + F32 mVelocity_local; // How fast the param is moving + F32 mPositionLastUpdate_local; + LLVector3 mPosition_world; + + LLViewerVisualParam *mParamDriver; + const controller_map_t mParamControllers; + + LLPointer<LLJointState> mJointState; + LLCharacter *mCharacter; + + F32 mLastTime; + + static default_controller_map_t sDefaultController; +}; + +default_controller_map_t initDefaultController() +{ + default_controller_map_t controller; + controller["Mass"] = 0.2f; + controller["Gravity"] = 0.0f; + controller["Damping"] = .05f; + controller["Drag"] = 0.15f; + controller["MaxEffect"] = 0.1f; + controller["Spring"] = 0.1f; + controller["Gain"] = 10.0f; + return controller; +} + +default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController(); + +BOOL LLPhysicsMotion::initialize() +{ + if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str()))) + return FALSE; + mJointState->setUsage(LLJointState::ROT); + + mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); + if (mParamDriver == NULL) + { + llinfos << "Failure reading in [ " << mParamDriverName << " ]" << llendl; + return FALSE; + } + + return TRUE; +} + +LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : + LLMotion(id), + mCharacter(NULL) +{ + mName = "breast_motion"; +} + +LLPhysicsMotionController::~LLPhysicsMotionController() +{ + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + delete (*iter); + } +} + +BOOL LLPhysicsMotionController::onActivate() +{ + return TRUE; +} + +void LLPhysicsMotionController::onDeactivate() +{ +} + +LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter *character) +{ + mCharacter = character; + + mMotions.clear(); + + // Breast Cleavage + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_InOut_Damping"; + controller["MaxEffect"] = "Breast_Physics_InOut_Max_Effect"; + controller["Spring"] = "Breast_Physics_InOut_Spring"; + controller["Gain"] = "Breast_Physics_InOut_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_InOut_Controller", + "mChest", + character, + LLVector3(-1,0,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Breast Bounce + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Breast_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Breast_Physics_UpDown_Spring"; + controller["Gain"] = "Breast_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_UpDown_Controller", + "mChest", + character, + LLVector3(0,0,1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Breast Sway + { + controller_map_t controller; + controller["Mass"] = "Breast_Physics_Mass"; + controller["Gravity"] = "Breast_Physics_Gravity"; + controller["Drag"] = "Breast_Physics_Drag"; + controller["Damping"] = "Breast_Physics_LeftRight_Damping"; + controller["MaxEffect"] = "Breast_Physics_LeftRight_Max_Effect"; + controller["Spring"] = "Breast_Physics_LeftRight_Spring"; + controller["Gain"] = "Breast_Physics_LeftRight_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Breast_Physics_LeftRight_Controller", + "mChest", + character, + LLVector3(0,-1,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + // Butt Bounce + { + controller_map_t controller; + controller["Mass"] = "Butt_Physics_Mass"; + controller["Gravity"] = "Butt_Physics_Gravity"; + controller["Drag"] = "Butt_Physics_Drag"; + controller["Damping"] = "Butt_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Butt_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Butt_Physics_UpDown_Spring"; + controller["Gain"] = "Butt_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_UpDown_Controller", + "mPelvis", + character, + LLVector3(0,0,-1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Butt LeftRight + { + controller_map_t controller; + controller["Mass"] = "Butt_Physics_Mass"; + controller["Gravity"] = "Butt_Physics_Gravity"; + controller["Drag"] = "Butt_Physics_Drag"; + controller["Damping"] = "Butt_Physics_LeftRight_Damping"; + controller["MaxEffect"] = "Butt_Physics_LeftRight_Max_Effect"; + controller["Spring"] = "Butt_Physics_LeftRight_Spring"; + controller["Gain"] = "Butt_Physics_LeftRight_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Butt_Physics_LeftRight_Controller", + "mPelvis", + character, + LLVector3(0,-1,0), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + // Belly Bounce + { + controller_map_t controller; + controller["Mass"] = "Belly_Physics_Mass"; + controller["Gravity"] = "Belly_Physics_Gravity"; + controller["Drag"] = "Belly_Physics_Drag"; + controller["Damping"] = "Belly_Physics_UpDown_Damping"; + controller["MaxEffect"] = "Belly_Physics_UpDown_Max_Effect"; + controller["Spring"] = "Belly_Physics_UpDown_Spring"; + controller["Gain"] = "Belly_Physics_UpDown_Gain"; + LLPhysicsMotion *motion = new LLPhysicsMotion("Belly_Physics_UpDown_Controller", + "mPelvis", + character, + LLVector3(0,0,-1), + controller); + if (!motion->initialize()) + { + llassert_always(FALSE); + return STATUS_FAILURE; + } + addMotion(motion); + } + + return STATUS_SUCCESS; +} + +void LLPhysicsMotionController::addMotion(LLPhysicsMotion *motion) +{ + addJointState(motion->getJointState()); + mMotions.push_back(motion); +} + +F32 LLPhysicsMotionController::getMinPixelArea() +{ + return MIN_REQUIRED_PIXEL_AREA_AVATAR_PHYSICS_MOTION; +} + +// Local space means "parameter space". +F32 LLPhysicsMotion::toLocal(const LLVector3 &world) +{ + LLJoint *joint = mJointState->getJoint(); + const LLQuaternion rotation_world = joint->getWorldRotation(); + + LLVector3 dir_world = mMotionDirectionVec * rotation_world; + dir_world.normalize(); + return world * dir_world; +} + +F32 LLPhysicsMotion::calculateVelocity_local() +{ + const F32 world_to_model_scale = 100.0f; + LLJoint *joint = mJointState->getJoint(); + const LLVector3 position_world = joint->getWorldPosition(); + const LLQuaternion rotation_world = joint->getWorldRotation(); + const LLVector3 last_position_world = mPosition_world; + const LLVector3 positionchange_world = (position_world-last_position_world) * world_to_model_scale; + const LLVector3 velocity_world = positionchange_world; + const F32 velocity_local = toLocal(velocity_world); + return velocity_local; +} + +F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local) +{ +// const F32 smoothing = getParamValue("Smoothing"); + static const F32 smoothing = 3.0f; // Removed smoothing param since it's probably not necessary + const F32 acceleration_local = velocity_local - mVelocityJoint_local; + + const F32 smoothed_acceleration_local = + acceleration_local * 1.0/smoothing + + mAccelerationJoint_local * (smoothing-1.0)/smoothing; + + return smoothed_acceleration_local; +} + +BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) +{ + // Skip if disabled globally. + if (!gSavedSettings.getBOOL("AvatarPhysics")) + { + return TRUE; + } + + BOOL update_visuals = FALSE; + for (motion_vec_t::iterator iter = mMotions.begin(); + iter != mMotions.end(); + ++iter) + { + LLPhysicsMotion *motion = (*iter); + update_visuals |= motion->onUpdate(time); + } + + if (update_visuals) + mCharacter->updateVisualParams(); + + return TRUE; +} + + +// Return TRUE if character has to update visual params. +BOOL LLPhysicsMotion::onUpdate(F32 time) +{ + // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); + + if (!mParamDriver) + return FALSE; + + if (!mLastTime) + { + mLastTime = time; + return FALSE; + } + + //////////////////////////////////////////////////////////////////////////////// + // Get all parameters and settings + // + + const F32 time_delta = time - mLastTime; + + // Don't update too frequently, to avoid precision errors from small time slices. + if (time_delta <= .01) + { + return FALSE; + } + + // If less than 1FPS, we don't want to be spending time updating physics at all. + if (time_delta > 1.0) + { + mLastTime = time; + return FALSE; + } + + // Higher LOD is better. This controls the granularity + // and frequency of updates for the motions. + const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor; + if (lod_factor == 0) + { + return TRUE; + } + + LLJoint *joint = mJointState->getJoint(); + + const F32 behavior_mass = getParamValue("Mass"); + const F32 behavior_gravity = getParamValue("Gravity"); + const F32 behavior_spring = getParamValue("Spring"); + const F32 behavior_gain = getParamValue("Gain"); + const F32 behavior_damping = getParamValue("Damping"); + const F32 behavior_drag = getParamValue("Drag"); + const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. + + F32 behavior_maxeffect = getParamValue("MaxEffect"); + if (physics_test) + behavior_maxeffect = 1.0f; + + // Normalize the param position to be from [0,1]. + // We have to use normalized values because there may be more than one driven param, + // and each of these driven params may have its own range. + // This means we'll do all our calculations in normalized [0,1] local coordinates. + const F32 position_user_local = (mParamDriver->getWeight() - mParamDriver->getMinWeight()) / (mParamDriver->getMaxWeight() - mParamDriver->getMinWeight()); + + // + // End parameters and settings + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate velocity and acceleration in parameter space. + // + + //const F32 velocity_joint_local = calculateVelocity_local(time_iteration_step); + const F32 velocity_joint_local = calculateVelocity_local(); + const F32 acceleration_joint_local = calculateAcceleration_local(velocity_joint_local); + + // + // End velocity and acceleration + //////////////////////////////////////////////////////////////////////////////// + + BOOL update_visuals = FALSE; + + // Break up the physics into a bunch of iterations so that differing framerates will show + // roughly the same behavior. + for (F32 time_iteration = 0; time_iteration <= time_delta; time_iteration += TIME_ITERATION_STEP) + { + F32 time_iteration_step = TIME_ITERATION_STEP; + if (time_iteration + TIME_ITERATION_STEP > time_delta) + { + time_iteration_step = time_delta-time_iteration; + } + + // mPositon_local should be in normalized 0,1 range already. Just making sure... + const F32 position_current_local = llclamp(mPosition_local, + 0.0f, + 1.0f); + // If the effect is turned off then don't process unless we need one more update + // to set the position to the default (i.e. user) position. + if ((behavior_maxeffect == 0) && (position_current_local == position_user_local)) + { + return update_visuals; + } + + //////////////////////////////////////////////////////////////////////////////// + // Calculate the total force + // + + // Spring force is a restoring force towards the original user-set breast position. + // F = kx + const F32 spring_length = position_current_local - position_user_local; + const F32 force_spring = -spring_length * behavior_spring; + + // Acceleration is the force that comes from the change in velocity of the torso. + // F = ma + const F32 force_accel = behavior_gain * (acceleration_joint_local * behavior_mass); + + // Gravity always points downward in world space. + // F = mg + const LLVector3 gravity_world(0,0,1); + const F32 force_gravity = (toLocal(gravity_world) * behavior_gravity * behavior_mass); + + // Damping is a restoring force that opposes the current velocity. + // F = -kv + const F32 force_damping = -behavior_damping * mVelocity_local; + + // Drag is a force imparted by velocity (intuitively it is similar to wind resistance) + // F = .5kv^2 + const F32 force_drag = .5*behavior_drag*velocity_joint_local*velocity_joint_local*llsgn(velocity_joint_local); + + const F32 force_net = (force_accel + + force_gravity + + force_spring + + force_damping + + force_drag); + + // + // End total force + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // Calculate new params + // + + // Calculate the new acceleration based on the net force. + // a = F/m + const F32 acceleration_new_local = force_net / behavior_mass; + static const F32 max_velocity = 100.0f; // magic number, used to be customizable. + F32 velocity_new_local = mVelocity_local + acceleration_new_local*time_iteration_step; + velocity_new_local = llclamp(velocity_new_local, + -max_velocity, max_velocity); + + // Temporary debugging setting to cause all avatars to move, for profiling purposes. + if (physics_test) + { + velocity_new_local = sin(time*4.0); + } + // Calculate the new parameters, or remain unchanged if max speed is 0. + F32 position_new_local = position_current_local + velocity_new_local*time_iteration_step; + if (behavior_maxeffect == 0) + position_new_local = position_user_local; + + // Zero out the velocity if the param is being pushed beyond its limits. + if ((position_new_local < 0 && velocity_new_local < 0) || + (position_new_local > 1 && velocity_new_local > 0)) + { + velocity_new_local = 0; + } + + // Check for NaN values. A NaN value is detected if the variables doesn't equal itself. + // If NaN, then reset everything. + if ((mPosition_local != mPosition_local) || + (mVelocity_local != mVelocity_local) || + (position_new_local != position_new_local)) + { + position_new_local = 0; + mVelocity_local = 0; + mVelocityJoint_local = 0; + mAccelerationJoint_local = 0; + mPosition_local = 0; + mPosition_world = LLVector3(0,0,0); + } + + const F32 position_new_local_clamped = llclamp(position_new_local, + 0.0f, + 1.0f); + + LLDriverParam *driver_param = dynamic_cast<LLDriverParam *>(mParamDriver); + llassert_always(driver_param); + if (driver_param) + { + // If this is one of our "hidden" driver params, then make sure it's + // the default value. + if ((driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE) && + (driver_param->getGroup() != VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT)) + { + mCharacter->setVisualParamWeight(driver_param, + 0, + FALSE); + } + for (LLDriverParam::entry_list_t::iterator iter = driver_param->mDriven.begin(); + iter != driver_param->mDriven.end(); + ++iter) + { + LLDrivenEntry &entry = (*iter); + LLViewerVisualParam *driven_param = entry.mParam; + setParamValue(driven_param,position_new_local_clamped, behavior_maxeffect); + } + } + + // + // End calculate new params + //////////////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////////////// + // Conditionally update the visual params + // + + // Updating the visual params (i.e. what the user sees) is fairly expensive. + // So only update if the params have changed enough, and also take into account + // the graphics LOD settings. + + // For non-self, if the avatar is small enough visually, then don't update. + const F32 area_for_max_settings = 0.0; + const F32 area_for_min_settings = 1400.0; + const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); + const F32 pixel_area = fsqrtf(mCharacter->getPixelArea()); + + const BOOL is_self = (dynamic_cast<LLVOAvatarSelf *>(mCharacter) != NULL); + if ((pixel_area > area_for_this_setting) || is_self) + { + const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); + const F32 min_delta = (1.0001f-lod_factor)*0.4f; + if (llabs(position_diff_local) > min_delta) + { + update_visuals = TRUE; + mPositionLastUpdate_local = position_new_local; + } + } + + // + // End update visual params + //////////////////////////////////////////////////////////////////////////////// + + mVelocity_local = velocity_new_local; + mAccelerationJoint_local = acceleration_joint_local; + mPosition_local = position_new_local; + } + mLastTime = time; + mPosition_world = joint->getWorldPosition(); + mVelocityJoint_local = velocity_joint_local; + + + /* + // Write out debugging info into a spreadsheet. + if (mFileWrite != NULL && is_self) + { + fprintf(mFileWrite,"%f\t%f\t%f \t\t%f \t\t%f\t%f\t%f\t \t\t%f\t%f\t%f\t%f\t%f \t\t%f\t%f\t%f\n", + position_new_local, + velocity_new_local, + acceleration_new_local, + + time_delta, + + mPosition_world[0], + mPosition_world[1], + mPosition_world[2], + + force_net, + force_spring, + force_accel, + force_damping, + force_drag, + + spring_length, + velocity_joint_local, + acceleration_joint_local + ); + } + */ + + return update_visuals; +} + +// Range of new_value_local is assumed to be [0 , 1] normalized. +void LLPhysicsMotion::setParamValue(LLViewerVisualParam *param, + F32 new_value_normalized, + F32 behavior_maxeffect) +{ + const F32 value_min_local = param->getMinWeight(); + const F32 value_max_local = param->getMaxWeight(); + const F32 min_val = 0.5f-behavior_maxeffect/2.0; + const F32 max_val = 0.5f+behavior_maxeffect/2.0; + + // Scale from [0,1] to [min_val,max_val] + const F32 new_value_rescaled = min_val + (max_val-min_val) * new_value_normalized; + + // Scale from [0,1] to [value_min_local,value_max_local] + const F32 new_value_local = value_min_local + (value_max_local-value_min_local) * new_value_rescaled; + + mCharacter->setVisualParamWeight(param, + new_value_local, + FALSE); +} diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h index 0c0087d269..b246fa99bb 100644 --- a/indra/newview/llphysicsmotion.h +++ b/indra/newview/llphysicsmotion.h @@ -1,124 +1,118 @@ -/**
- * @file llphysicsmotion.h
- * @brief Implementation of LLPhysicsMotion class.
- *
- * $LicenseInfo:firstyear=2001&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLPHYSICSMOTIONCONTROLLER_H
-#define LL_LLPHYSICSMOTIONCONTROLLER_H
-
-//-----------------------------------------------------------------------------
-// Header files
-//-----------------------------------------------------------------------------
-#include "llmotion.h"
-#include "llframetimer.h"
-
-#define PHYSICS_MOTION_FADEIN_TIME 1.0f
-#define PHYSICS_MOTION_FADEOUT_TIME 1.0f
-
-class LLPhysicsMotion;
-
-//-----------------------------------------------------------------------------
-// class LLPhysicsMotion
-//-----------------------------------------------------------------------------
-class LLPhysicsMotionController :
- public LLMotion
-{
-public:
- // Constructor
- LLPhysicsMotionController(const LLUUID &id);
-
- // Destructor
- virtual ~LLPhysicsMotionController();
-
-public:
- //-------------------------------------------------------------------------
- // functions to support MotionController and MotionRegistry
- //-------------------------------------------------------------------------
-
- // static constructor
- // all subclasses must implement such a function and register it
- static LLMotion *create(const LLUUID &id) { return new LLPhysicsMotionController(id); }
-
-public:
- //-------------------------------------------------------------------------
- // animation callbacks to be implemented by subclasses
- //-------------------------------------------------------------------------
-
- // motions must specify whether or not they loop
- virtual BOOL getLoop() { return TRUE; }
-
- // motions must report their total duration
- virtual F32 getDuration() { return 0.0; }
-
- // motions must report their "ease in" duration
- virtual F32 getEaseInDuration() { return PHYSICS_MOTION_FADEIN_TIME; }
-
- // motions must report their "ease out" duration.
- virtual F32 getEaseOutDuration() { return PHYSICS_MOTION_FADEOUT_TIME; }
-
- // called to determine when a motion should be activated/deactivated based on avatar pixel coverage
- virtual F32 getMinPixelArea();
-
- // motions must report their priority
- virtual LLJoint::JointPriority getPriority() { return LLJoint::MEDIUM_PRIORITY; }
-
- virtual LLMotionBlendType getBlendType() { return ADDITIVE_BLEND; }
-
- // run-time (post constructor) initialization,
- // called after parameters have been set
- // must return true to indicate success and be available for activation
- virtual LLMotionInitStatus onInitialize(LLCharacter *character);
-
- // called when a motion is activated
- // must return TRUE to indicate success, or else
- // it will be deactivated
- virtual BOOL onActivate();
-
- // called per time step
- // must return TRUE while it is active, and
- // must return FALSE when the motion is completed.
- virtual BOOL onUpdate(F32 time, U8* joint_mask);
-
- // called when a motion is deactivated
- virtual void onDeactivate();
-
- LLCharacter* getCharacter() { return mCharacter; }
-
-protected:
- void addMotion(LLPhysicsMotion *motion);
-private:
- LLCharacter* mCharacter;
-
- typedef std::vector<LLPhysicsMotion *> motion_vec_t;
- motion_vec_t mMotions;
-};
-
-#endif // LL_LLPHYSICSMOTION_H
-
+/** + * @file llphysicsmotion.h + * @brief Implementation of LLPhysicsMotion class. + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLPHYSICSMOTIONCONTROLLER_H +#define LL_LLPHYSICSMOTIONCONTROLLER_H + +//----------------------------------------------------------------------------- +// Header files +//----------------------------------------------------------------------------- +#include "llmotion.h" +#include "llframetimer.h" + +#define PHYSICS_MOTION_FADEIN_TIME 1.0f +#define PHYSICS_MOTION_FADEOUT_TIME 1.0f + +class LLPhysicsMotion; + +//----------------------------------------------------------------------------- +// class LLPhysicsMotion +//----------------------------------------------------------------------------- +class LLPhysicsMotionController : + public LLMotion +{ +public: + // Constructor + LLPhysicsMotionController(const LLUUID &id); + + // Destructor + virtual ~LLPhysicsMotionController(); + +public: + //------------------------------------------------------------------------- + // functions to support MotionController and MotionRegistry + //------------------------------------------------------------------------- + + // static constructor + // all subclasses must implement such a function and register it + static LLMotion *create(const LLUUID &id) { return new LLPhysicsMotionController(id); } + +public: + //------------------------------------------------------------------------- + // animation callbacks to be implemented by subclasses + //------------------------------------------------------------------------- + + // motions must specify whether or not they loop + virtual BOOL getLoop() { return TRUE; } + + // motions must report their total duration + virtual F32 getDuration() { return 0.0; } + + // motions must report their "ease in" duration + virtual F32 getEaseInDuration() { return PHYSICS_MOTION_FADEIN_TIME; } + + // motions must report their "ease out" duration. + virtual F32 getEaseOutDuration() { return PHYSICS_MOTION_FADEOUT_TIME; } + + // called to determine when a motion should be activated/deactivated based on avatar pixel coverage + virtual F32 getMinPixelArea(); + + // motions must report their priority + virtual LLJoint::JointPriority getPriority() { return LLJoint::MEDIUM_PRIORITY; } + + virtual LLMotionBlendType getBlendType() { return ADDITIVE_BLEND; } + + // run-time (post constructor) initialization, + // called after parameters have been set + // must return true to indicate success and be available for activation + virtual LLMotionInitStatus onInitialize(LLCharacter *character); + + // called when a motion is activated + // must return TRUE to indicate success, or else + // it will be deactivated + virtual BOOL onActivate(); + + // called per time step + // must return TRUE while it is active, and + // must return FALSE when the motion is completed. + virtual BOOL onUpdate(F32 time, U8* joint_mask); + + // called when a motion is deactivated + virtual void onDeactivate(); + + LLCharacter* getCharacter() { return mCharacter; } + +protected: + void addMotion(LLPhysicsMotion *motion); +private: + LLCharacter* mCharacter; + + typedef std::vector<LLPhysicsMotion *> motion_vec_t; + motion_vec_t mMotions; +}; + +#endif // LL_LLPHYSICSMOTION_H + diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index 5a67fd482a..36f8c8d13e 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -490,6 +490,16 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) mLastSex = avatar_sex; + // Check for NaN condition (NaN is detected if a variable doesn't equal itself. + if (mCurWeight != mCurWeight) + { + mCurWeight = 0.0; + } + if (mLastWeight != mLastWeight) + { + mLastWeight = mCurWeight+.001; + } + // perform differential update of morph F32 delta_weight = ( getSex() & avatar_sex ) ? (mCurWeight - mLastWeight) : (getDefaultWeight() - mLastWeight); // store last weight diff --git a/indra/newview/llsidetraylistener.cpp b/indra/newview/llsidetraylistener.cpp index 6db13e517d..cd6fa28948 100644 --- a/indra/newview/llsidetraylistener.cpp +++ b/indra/newview/llsidetraylistener.cpp @@ -4,8 +4,25 @@ * @date 2011-02-15 * @brief Implementation for llsidetraylistener. * - * $LicenseInfo:firstyear=2011&license=lgpl$ - * Copyright (c) 2011, Linden Research, Inc. + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ diff --git a/indra/newview/llsidetraylistener.h b/indra/newview/llsidetraylistener.h index 0dd2067433..51e2137762 100644 --- a/indra/newview/llsidetraylistener.h +++ b/indra/newview/llsidetraylistener.h @@ -4,8 +4,25 @@ * @date 2011-02-15 * @brief * - * $LicenseInfo:firstyear=2011&license=lgpl$ - * Copyright (c) 2011, Linden Research, Inc. + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 4bc8a7ec54..ca908ef822 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -720,6 +720,8 @@ bool idle_startup() timeout_count = 0; + initialize_edit_menu(); + if (show_connect_box) { // Load all the name information out of the login view @@ -736,8 +738,6 @@ bool idle_startup() // Make sure the process dialog doesn't hide things gViewerWindow->setShowProgress(FALSE); - initialize_edit_menu(); - // Show the login dialog login_show(); // connect dialog is already shown, so fill in the names diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index e7b5c13860..cb49976e5f 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -310,7 +310,7 @@ void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& S32 new_text_left = mChiclet->getRect().mRight + CHICLET_HPAD; LLRect text_rect = text->getRect(); text_rect.mLeft = new_text_left; - text->setRect(text_rect); + text->setShape(text_rect); } //--------------------------------------------------------------------------------- diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 8b2f066d41..0f337825e9 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -220,7 +220,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal } static LLUIColor alert_caution_text_color = LLUIColorTable::instance().getColor("AlertCautionTextColor"); - static LLUIColor alert_text_color = LLUIColorTable::instance().getColor("AlertTextColor"); if (mCaution) { LLIconCtrl* icon = LLUICtrlFactory::getInstance()->createFromFile<LLIconCtrl>("alert_icon.xml", this, LLPanel::child_registry_t::instance()); @@ -233,10 +232,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal msg_x += 32 + HPAD; msg_box->setColor( alert_caution_text_color ); } - else - { - msg_box->setColor( alert_text_color ); - } LLRect rect; rect.setLeftTopAndSize( msg_x, msg_y, text_rect.getWidth(), text_rect.getHeight() ); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 1c745906aa..ba243f258a 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1386,6 +1386,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL worn = TRUE; } break; + case LLAssetType::AT_CALLINGCARD: + // Calling Cards in object are disabled for now + // because of incomplete LSL support. See STORM-1117. + return ACCEPT_NO; default: break; } diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 286b16bab2..f5484ff010 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -36,6 +36,7 @@ #include "llinstantmessage.h" //SYSTEM_FROM // LLViewerChat +LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal; //static void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) @@ -256,3 +257,16 @@ std::string LLViewerChat::getObjectImSLURL(const LLChat& chat, const LLSD& args) return url; } + +//static +boost::signals2::connection LLViewerChat::setFontChangedCallback(const font_change_signal_t::slot_type& cb) +{ + return sChatFontChangedSignal.connect(cb); +} + +//static +void LLViewerChat::signalChatFontChanged() +{ + // Notify all observers that our font has changed + sChatFontChangedSignal(getChatFont()); +} diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h index 0f15d29f04..c05caf0a95 100644 --- a/indra/newview/llviewerchat.h +++ b/indra/newview/llviewerchat.h @@ -35,6 +35,8 @@ class LLViewerChat { public: + typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t; + static void getChatColor(const LLChat& chat, LLColor4& r_color); static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha); static LLFontGL* getChatFont(); @@ -42,8 +44,12 @@ public: static void formatChatMsg(const LLChat& chat, std::string& formated_msg); static std::string getSenderSLURL(const LLChat& chat, const LLSD& args); + static boost::signals2::connection setFontChangedCallback(const font_change_signal_t::slot_type& cb); + static void signalChatFontChanged(); + private: static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args); + static font_change_signal_t sChatFontChangedSignal; }; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index ffe607f912..06c1520314 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -239,12 +239,6 @@ static bool handleVideoMemoryChanged(const LLSD& newvalue) return true; } -static bool handleBandwidthChanged(const LLSD& newvalue) -{ - gViewerThrottle.setMaxBandwidth((F32) newvalue.asReal()); - return true; -} - static bool handleChatFontSizeChanged(const LLSD& newvalue) { if(gConsole) @@ -562,7 +556,6 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); gSavedSettings.getControl("RenderTreeLODFactor")->getSignal()->connect(boost::bind(&handleTreeLODChanged, _2)); gSavedSettings.getControl("RenderFlexTimeFactor")->getSignal()->connect(boost::bind(&handleFlexLODChanged, _2)); - gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&handleBandwidthChanged, _2)); gSavedSettings.getControl("RenderGamma")->getSignal()->connect(boost::bind(&handleGammaChanged, _2)); gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _2)); gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _2)); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 68011ebf07..9e58acdcd3 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1456,6 +1456,9 @@ private: void saveFavoritesSLURLs(); + // Remove record of current user's favorites from file on disk. + void removeFavoritesRecordOfUser(); + void onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark); void storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl); @@ -1540,6 +1543,10 @@ void LLFavoritesOrderStorage::destroyClass() { LLFavoritesOrderStorage::instance().saveFavoritesSLURLs(); } + else + { + LLFavoritesOrderStorage::instance().removeFavoritesRecordOfUser(); + } } void LLFavoritesOrderStorage::load() @@ -1608,6 +1615,28 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() LLSDSerialize::toPrettyXML(fav_llsd, file); } +void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() +{ + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); + LLSD fav_llsd; + llifstream file; + file.open(filename); + if (!file.is_open()) return; + LLSDSerialize::fromXML(fav_llsd, file); + + LLAvatarName av_name; + LLAvatarNameCache::get( gAgentID, &av_name ); + if (fav_llsd.has(av_name.getLegacyName())) + { + fav_llsd.erase(av_name.getLegacyName()); + } + + llofstream out_file; + out_file.open(filename); + LLSDSerialize::toPrettyXML(fav_llsd, out_file); + +} + void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmark* landmark) { if (!landmark) return; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c568c8eedb..d958551a0a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6420,12 +6420,12 @@ class LLToolsSelectedScriptAction : public view_listener_t else if (action == "start") { name = "start_queue"; - msg = "Running"; + msg = "SetRunning"; } else if (action == "stop") { name = "stop_queue"; - msg = "RunningNot"; + msg = "SetRunningNot"; } LLUUID id; id.generate(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9641a0901c..d0fdae1e1b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5523,7 +5523,11 @@ void process_alert_core(const std::string& message, BOOL modal) { LLSD args; std::string new_msg =LLNotifications::instance().getGlobalString(message); - args["MESSAGE"] = new_msg; + + std::string localized_msg; + bool is_message_localized = LLTrans::findString(localized_msg, new_msg); + + args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; LLNotificationsUtil::add("SystemMessageTip", args); } } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index cc635f71f9..f5fb074992 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1469,7 +1469,7 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) } setActive() ; - if (!mForceToSaveRawImage) + if (!needsToSaveRawImage()) { mNeedsAux = FALSE; destroyRawImage(); diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index d239347810..4b3a9a4dc3 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -72,6 +72,8 @@ LLWaterParamManager::LLWaterParamManager() : mWave1Dir(.5f, .5f, "wave1Dir"), mWave2Dir(.5f, .5f, "wave2Dir"), mDensitySliderValue(1.0f), + mPrevFogDensity(16.0f), // 2^4 + mPrevFogColor(22.f/255.f, 43.f/255.f, 54.f/255.f, 0.0f), mWaterFogKS(1.0f) { } @@ -265,6 +267,20 @@ void LLWaterParamManager::update(LLViewerCamera * cam) // update the shaders and the menu propagateParameters(); + // If water fog color has been changed, save it. + if (mPrevFogColor != mFogColor) + { + gSavedSettings.setColor4("WaterFogColor", mFogColor); + mPrevFogColor = mFogColor; + } + + // If water fog density has been changed, save it. + if (mPrevFogDensity != mFogDensity) + { + gSavedSettings.setF32("WaterFogDensity", mFogDensity); + mPrevFogDensity = mFogDensity; + } + // sync menus if they exist LLFloaterWater* waterfloater = LLFloaterReg::findTypedInstance<LLFloaterWater>("env_water"); if(waterfloater) @@ -449,7 +465,24 @@ LLWaterParamManager * LLWaterParamManager::instance() sInstance->loadAllPresets(LLStringUtil::null); sInstance->getParamSet("Default", sInstance->mCurParams); + sInstance->initOverrides(); } return sInstance; } + +void LLWaterParamManager::initOverrides() +{ + // Override fog color from the current preset with the saved setting. + LLColor4 fog_color_override = gSavedSettings.getColor4("WaterFogColor"); + mFogColor = fog_color_override; + mPrevFogColor = fog_color_override; + mCurParams.set("waterFogColor", fog_color_override); + + // Do the same with fog density. + F32 fog_density = gSavedSettings.getF32("WaterFogDensity"); + mPrevFogDensity = fog_density; + mFogDensity = fog_density; + mCurParams.set("waterFogDensity", fog_density); + setDensitySliderValue(mFogDensity.mExp); +} diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h index c479f1861c..f465034c39 100644 --- a/indra/newview/llwaterparammanager.h +++ b/indra/newview/llwaterparammanager.h @@ -284,6 +284,9 @@ public: // singleton pattern implementation static LLWaterParamManager * instance(); +private: + void initOverrides(); + public: LLWaterParamSet mCurParams; @@ -314,6 +317,9 @@ private: LLVector4 mWaterPlane; F32 mWaterFogKS; + LLColor4 mPrevFogColor; + F32 mPrevFogDensity; + // our parameter manager singleton instance static LLWaterParamManager * sInstance; }; diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index f933be4d8f..c090ab5c3d 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -80,7 +80,7 @@ LLWearableDictionary::LLWearableDictionary() addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, FALSE)); + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE)); @@ -144,6 +144,7 @@ BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) { const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); const WearableEntry *entry = dict->lookup(type); + if (!entry) return FALSE; return entry->mDisableCameraSwitch; } @@ -152,6 +153,7 @@ BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type) { const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); const WearableEntry *entry = dict->lookup(type); + if (!entry) return FALSE; return entry->mAllowMultiwear; } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index c6f9b6f6e4..6b2af1f8b7 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1446,59 +1446,52 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi { positions->clear(); } - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); - iter != LLWorld::getInstance()->getRegionList().end(); ++iter) + // get the list of avatars from the character list first, so distances are correct + // when agent is above 1020m and other avatars are nearby + for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) { - LLViewerRegion* regionp = *iter; - const LLVector3d& origin_global = regionp->getOriginGlobal(); - S32 count = regionp->mMapAvatars.count(); - for (S32 i = 0; i < count; i++) + LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; + if(!pVOAvatar->isDead() && !pVOAvatar->isSelf()) { - LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); - if(dist_vec(pos_global, relative_to) <= radius) + LLUUID uuid = pVOAvatar->getID(); + if(!uuid.isNull()) { - if(positions != NULL) + LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + if(dist_vec(pos_global, relative_to) <= radius) { - positions->push_back(pos_global); - } - if(avatar_ids != NULL) - { - avatar_ids->push_back(regionp->mMapAvatarIDs.get(i)); + if(positions != NULL) + { + positions->push_back(pos_global); + } + if(avatar_ids !=NULL) + { + avatar_ids->push_back(uuid); + } } } } } - // retrieve the list of close avatars from viewer objects as well - // for when we are above 1000m, only do this when we are retrieving - // uuid's too as there could be duplicates - if(avatar_ids != NULL) + // region avatars added for situations where radius is greater than RenderFarClip + for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); + iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) + LLViewerRegion* regionp = *iter; + const LLVector3d& origin_global = regionp->getOriginGlobal(); + S32 count = regionp->mMapAvatars.count(); + for (S32 i = 0; i < count; i++) { - LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if(pVOAvatar->isDead() || pVOAvatar->isSelf()) - continue; - LLUUID uuid = pVOAvatar->getID(); - if(uuid.isNull()) - continue; - LLVector3d pos_global = pVOAvatar->getPositionGlobal(); + LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global); if(dist_vec(pos_global, relative_to) <= radius) { - bool found = false; - uuid_vec_t::iterator sel_iter = avatar_ids->begin(); - for (; sel_iter != avatar_ids->end(); sel_iter++) - { - if(*sel_iter == uuid) - { - found = true; - break; - } - } - if(!found) + LLUUID uuid = regionp->mMapAvatarIDs.get(i); + // if this avatar doesn't already exist in the list, add it + if(uuid.notNull() && avatar_ids!=NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end()) { if(positions != NULL) + { positions->push_back(pos_global); + } avatar_ids->push_back(uuid); } } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 48fa01f0d9..a19eccf748 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -115,9 +115,6 @@ name="AlertCautionTextColor" reference="LtYellow" /> <color - name="AlertTextColor" - value="0.58 0.66 0.84 1" /> - <color name="AvatarListItemIconDefaultColor" reference="White" /> <color diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml index 3705a5902a..ed499619f6 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="IM chats" name="EnableIMChatPopups" tool_tip="Vælg for at se popup vindue når personlige beskeder (IM) modtages"/> <spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_lifetime"/> <spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_fadingtime"/> - <check_box label="Benyt maskin-oversættelse ved chat (håndteret af Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Benyt maskin-oversættelse ved chat (håndteret af Google)</text> <text name="translate_language_text" width="110"> Oversæt chat til : </text> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml index 5810cc21e7..067463be02 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Midterste museknap </panel.string> <slider label="Generel" name="System Volume"/> - <check_box initial_value="true" label="Sluk lyd når minimeret" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Sluk lyd når minimeret</text> <slider label="Knapper" name="UI Volume"/> <slider label="Omgivelser" name="Wind Volume"/> <slider label="Lyd effekter" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index 8086128dd7..8c8cdd31fe 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="IM-Chats" name="EnableIMChatPopups" tool_tip="Markieren, um Popups zu sehen, wenn Instant Message eintrifft"/> <spinner label="Lebenszeit von Toasts für Chat in der Nähe:" name="nearby_toasts_lifetime"/> <spinner label="Ein-/Ausblenddauer von Toasts für Chat in der Nähe:" name="nearby_toasts_fadingtime"/> - <check_box label="Bei Chat Maschinenübersetzung verwenden (Service von Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Bei Chat Maschinenübersetzung verwenden (Service von Google)</text> <text name="translate_language_text"> Chat übersetzen in: </text> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml index 0f029d8664..07631b6a91 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Mittlere Maustaste </panel.string> <slider label="Master-Lautstärke" name="System Volume"/> - <check_box initial_value="true" label="Stummschalten, wenn minimiert" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Stummschalten, wenn minimiert</text> <slider label="Schaltflächen" name="UI Volume"/> <slider label="Umgebung" name="Wind Volume"/> <slider label="Soundeffekte" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml index babbf0f5ca..92001534e7 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml @@ -34,7 +34,7 @@ layout="topleft" name="contains_text" width="276"> - [NAME] contains: + <nolink>[NAME]</nolink> contains: </text> <scroll_list background_visible="true" diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index ef670bdd52..dcfa8bc060 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -45,7 +45,7 @@ name="pref core" tab_group="1" tab_position="left" - tab_width="115" + tab_width="140" tab_padding_right="0" top="21" width="658"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 81b7d35253..8a85a331e5 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3113,6 +3113,16 @@ function="ToggleControl" parameter="ImagePipelineUseHTTP" /> </menu_item_check> + <menu_item_check + label="HTTP Inventory" + name="HTTP Inventory"> + <menu_item_check.on_check + function="CheckControl" + parameter="UseHTTPInventory" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="UseHTTPInventory" /> + </menu_item_check> <menu_item_call label="Compress Images" name="Compress Images"> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c57f09c32f..a6e5e7a219 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -1,530 +1,530 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- background_visible="true"
- bg_alpha_color="DkGray"
- bg_opaque_color="DkGray"
- chrome="true"
- follows="left|bottom|right"
- focus_root="true"
- height="33"
- layout="topleft"
- left="0"
- name="bottom_tray"
- top="28"
- width="1310">
- <string
- name="DragIndicationImageName"
- value="Accordion_ArrowOpened_Off" />
- <string
- name="SpeakBtnToolTip"
- value="Turns microphone on/off" />
- <string
- name="VoiceControlBtnToolTip"
- value="Shows/hides voice control panel" />
- <layout_stack
- border_size="0"
- clip="false"
- follows="all"
- height="28"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="toolbar_stack"
- orientation="horizontal"
- top="0"
- width="1310">
- <layout_panel
- auto_resize="false"
- user_resize="false"
- min_width="2"
- width="2" />
- <layout_panel
- auto_resize="false"
- layout="topleft"
- max_width="320"
- min_width="214"
- height="28"
- mouse_opaque="false"
- name="chat_bar_layout_panel"
- user_resize="true"
- width="310" >
- <panel
- name="chat_bar"
- filename="panel_nearby_chat_bar.xml"
- left="0"
- height="28"
- width="308"
- top="0"
- mouse_opaque="false"
- follows="left|right"
- />
- </layout_panel>
- <!--
- This 5px Panel is an indicator of where the resize handle is.
- The panel provides a gap between the resize handle icon and a button to the right.
- -->
- <layout_panel
- auto_resize="false"
- layout="topleft"
- max_width="5"
- min_width="5"
- name="chat_bar_resize_handle_panel"
- user_resize="false"
- width="5">
- <icon
- follows="top|right"
- height="25"
- image_name="ChatBarHandle"
- layout="topleft"
- left="-7"
- name="resize_handle"
- top="4"
- width="5" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="59"
- mouse_opaque="false"
- name="speak_panel"
- top_delta="0"
- user_resize="false"
- width="108">
- <talk_button
- follows="left|right"
- height="23"
- layout="topleft"
- left="0"
- name="talk"
- top="5"
- width="105">
- <show_button
- tab_stop="true">
- <init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="voice_controls" />
- </show_button>
- <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales.
- & pad_right is default value for long label which can be right aligned. See EXT-6318 -->
- <speak_button
- halign="center"
- label="Speak"
- label_selected="Speak"
- name="speak_btn"
- pad_right="20"
- tab_stop="true"
- use_ellipses="true" />
- </talk_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="65"
- mouse_opaque="false"
- name="gesture_panel"
- top_delta="0"
- user_resize="false"
- width="85">
- <gesture_combo_list
- follows="left|right"
- height="23"
- label="Gesture"
- layout="topleft"
- left="0"
- name="Gesture"
- tool_tip="Shows/hides gestures"
- top="5"
- width="82">
- <combo_button
- pad_right="10"
- use_ellipses="true" />
- <combo_list
- page_lines="17" />
- </gesture_combo_list>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="movement_panel"
- user_resize="false"
- width="83">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Move"
- layout="topleft"
- name="movement_btn"
- tool_tip="Shows/hides movement controls"
- top="5"
- use_ellipses="true"
- width="80">
- <init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="moveview" />
- </bottomtray_button>
-
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="cam_panel"
- user_resize="false"
- width="83">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="View"
- layout="topleft"
- left="0"
- name="camera_btn"
- tool_tip="Shows/hides camera controls"
- top="5"
- use_ellipses="true"
- width="80">
- <init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="camera" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_width="40"
- mouse_opaque="false"
- name="snapshot_panel"
- user_resize="false"
- width="39">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_overlay="Snapshot_Off"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- layout="topleft"
- left="0"
- name="snapshots"
- tool_tip="Take snapshot"
- top="5"
- width="36">
- <init_callback
- function="Button.SetFloaterToggle"
- parameter="snapshot" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="build_btn_panel"
- user_resize="false"
- width="83">
- <!--*FIX: Build Floater is not opened with default registration. Will be fixed soon.
-Disabled for now.
--->
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Build"
- layout="topleft"
- left="0"
- name="build_btn"
- tool_tip="Shows/hides Build Tools"
- top="5"
- use_ellipses="true"
- width="80">
- <commit_callback
- function="Build.Toggle"
- parameter="build" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="search_btn_panel"
- user_resize="false"
- width="83">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Search"
- layout="topleft"
- left="0"
- name="search_btn"
- tool_tip="Shows/hides Search"
- top="5"
- use_ellipses="true"
- width="80">
- <init_callback
- function="Button.SetFloaterToggle"
- parameter="search" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="world_map_btn_panel"
- user_resize="false"
- width="83">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Map"
- layout="topleft"
- left="0"
- name="world_map_btn"
- tool_tip="Shows/hides World Map"
- top="5"
- use_ellipses="true"
- width="80">
- <init_callback
- function="Button.SetFloaterToggle"
- parameter="world_map" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="left|right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="52"
- mouse_opaque="false"
- name="mini_map_btn_panel"
- user_resize="false"
- width="83">
- <bottomtray_button
- follows="left|right"
- height="23"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Mini-Map"
- layout="topleft"
- left="0"
- name="mini_map_btn"
- tool_tip="Shows/hides Mini-Map"
- top="5"
- use_ellipses="true"
- width="80">
- <init_callback
- function="Button.SetFloaterToggle"
- parameter="mini_map" />
- </bottomtray_button>
- </layout_panel>
- <layout_panel
- follows="left|right"
- height="30"
- layout="topleft"
- min_width="95"
- mouse_opaque="false"
- name="chiclet_list_panel"
- top="0"
- user_resize="false"
- width="189">
- <!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same
-as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991-->
- <chiclet_panel
- chiclet_padding="4"
- follows="left|right"
- height="24"
- layout="topleft"
- left="1"
- min_width="95"
- mouse_opaque="false"
- name="chiclet_list"
- top="7"
- width="189">
- <button
- auto_resize="true"
- follows="right"
- height="29"
- image_hover_selected="SegmentedBtn_Left_Over"
- image_hover_unselected="SegmentedBtn_Left_Over"
- image_overlay="Arrow_Small_Left"
- image_pressed="SegmentedBtn_Left_Press"
- image_pressed_selected="SegmentedBtn_Left_Press"
- image_selected="SegmentedBtn_Left_Off"
- image_unselected="SegmentedBtn_Left_Off"
- layout="topleft"
- name="chicklet_left_scroll_button"
- tab_stop="false"
- top="-28"
- visible="false"
- width="7" />
- <button
- auto_resize="true"
- follows="right"
- height="29"
- image_hover_selected="SegmentedBtn_Right_Over"
- image_hover_unselected="SegmentedBtn_Right_Over"
- image_overlay="Arrow_Small_Right"
- image_pressed="SegmentedBtn_Right_Press"
- image_pressed_selected="SegmentedBtn_Right_Press"
- image_selected="SegmentedBtn_Right_Off"
- image_unselected="SegmentedBtn_Right_Off"
- layout="topleft"
- name="chicklet_right_scroll_button"
- tab_stop="false"
- top="-28"
- visible="false"
- width="7" />
- </chiclet_panel>
- </layout_panel>
- <layout_panel auto_resize="false"
- user_resize="false"
- width="4"
- min_width="4"/>
- <layout_panel
- auto_resize="false"
- follows="right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="37"
- name="im_well_panel"
- top="0"
- user_resize="false"
- width="37">
- <chiclet_im_well
- follows="right"
- height="28"
- layout="topleft"
- left="0"
- max_displayed_count="99"
- name="im_well"
- top="0"
- width="35">
- <!--
-Emulate 4 states of button by background images, see details in EXT-3147. The same should be for notification_well button
-xml attribute Description
-image_unselected "Unlit" - there are no new messages
-image_selected "Unlit" + "Selected" - there are no new messages and the Well is open
-image_pressed "Lit" - there are new messages
-image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open
- -->
- <button
- auto_resize="true"
- follows="right"
- halign="center"
- height="23"
- image_overlay="Unread_IM"
- image_overlay_alignment="center"
- image_pressed="WellButton_Lit"
- image_pressed_selected="WellButton_Lit_Selected"
- image_selected="PushButton_Press"
- label_color="Black"
- left="0"
- name="Unread IM messages"
- tool_tip="Conversations"
- width="34">
- <init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="im_well_window" />
- </button>
- </chiclet_im_well>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- follows="right"
- height="28"
- layout="topleft"
- min_height="28"
- min_width="37"
- name="notification_well_panel"
- top="0"
- user_resize="false"
- width="37">
- <chiclet_notification
- follows="right"
- height="23"
- layout="topleft"
- left="0"
- max_displayed_count="99"
- name="notification_well"
- top="5"
- width="35">
- <button
- auto_resize="true"
- bottom_pad="3"
- follows="right"
- halign="center"
- height="23"
- image_overlay="Notices_Unread"
- image_overlay_alignment="center"
- image_pressed="WellButton_Lit"
- image_pressed_selected="WellButton_Lit_Selected"
- image_selected="PushButton_Press"
- label_color="Black"
- left="0"
- name="Unread"
- tool_tip="Notifications"
- width="34">
- <init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="notification_well_window" />
- </button>
- </chiclet_notification>
- </layout_panel>
- <layout_panel
- auto_resize="false"
- user_resize="false"
- min_width="4"
- name="DUMMY2"
- width="8" />
- </layout_stack>
-</panel>
\ No newline at end of file +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + background_visible="true" + bg_alpha_color="DkGray" + bg_opaque_color="DkGray" + chrome="true" + follows="left|bottom|right" + focus_root="true" + height="33" + layout="topleft" + left="0" + name="bottom_tray" + top="28" + width="1310"> + <string + name="DragIndicationImageName" + value="Accordion_ArrowOpened_Off" /> + <string + name="SpeakBtnToolTip" + value="Turns microphone on/off" /> + <string + name="VoiceControlBtnToolTip" + value="Shows/hides voice control panel" /> + <layout_stack + border_size="0" + clip="false" + follows="all" + height="28" + layout="topleft" + left="0" + mouse_opaque="false" + name="toolbar_stack" + orientation="horizontal" + top="0" + width="1310"> + <layout_panel + auto_resize="false" + user_resize="false" + min_width="2" + width="2" /> + <layout_panel + auto_resize="false" + layout="topleft" + max_width="320" + min_width="214" + height="28" + mouse_opaque="false" + name="chat_bar_layout_panel" + user_resize="true" + width="250" > + <panel + name="chat_bar" + filename="panel_nearby_chat_bar.xml" + left="0" + height="28" + width="248" + top="0" + mouse_opaque="false" + follows="left|right" + /> + </layout_panel> + <!-- + This 5px Panel is an indicator of where the resize handle is. + The panel provides a gap between the resize handle icon and a button to the right. + --> + <layout_panel + auto_resize="false" + layout="topleft" + max_width="5" + min_width="5" + name="chat_bar_resize_handle_panel" + user_resize="false" + width="5"> + <icon + follows="top|right" + height="25" + image_name="ChatBarHandle" + layout="topleft" + left="-7" + name="resize_handle" + top="4" + width="5" /> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="59" + mouse_opaque="false" + name="speak_panel" + top_delta="0" + user_resize="false" + width="108"> + <talk_button + follows="left|right" + height="23" + layout="topleft" + left="0" + name="talk" + top="5" + width="105"> + <show_button + tab_stop="true"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="voice_controls" /> + </show_button> + <!-- do not remove halign attribute with default value. otherwise it can't be overridden in other locales. + & pad_right is default value for long label which can be right aligned. See EXT-6318 --> + <speak_button + halign="center" + label="Speak" + label_selected="Speak" + name="speak_btn" + pad_right="20" + tab_stop="true" + use_ellipses="true" /> + </talk_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="65" + mouse_opaque="false" + name="gesture_panel" + top_delta="0" + user_resize="false" + width="85"> + <gesture_combo_list + follows="left|right" + height="23" + label="Gesture" + layout="topleft" + left="0" + name="Gesture" + tool_tip="Shows/hides gestures" + top="5" + width="82"> + <combo_button + pad_right="10" + use_ellipses="true" /> + <combo_list + page_lines="17" /> + </gesture_combo_list> + </layout_panel> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="movement_panel" + user_resize="false" + width="83"> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Move" + layout="topleft" + name="movement_btn" + tool_tip="Shows/hides movement controls" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="moveview" /> + </bottomtray_button> + + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="cam_panel" + user_resize="false" + width="83"> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="View" + layout="topleft" + left="0" + name="camera_btn" + tool_tip="Shows/hides camera controls" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="camera" /> + </bottomtray_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_width="40" + mouse_opaque="false" + name="snapshot_panel" + user_resize="false" + width="39"> + <bottomtray_button + follows="left|right" + height="23" + image_overlay="Snapshot_Off" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + layout="topleft" + left="0" + name="snapshots" + tool_tip="Take snapshot" + top="5" + width="36"> + <init_callback + function="Button.SetFloaterToggle" + parameter="snapshot" /> + </bottomtray_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="build_btn_panel" + user_resize="false" + width="83"> + <!--*FIX: Build Floater is not opened with default registration. Will be fixed soon. +Disabled for now. +--> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Build" + layout="topleft" + left="0" + name="build_btn" + tool_tip="Shows/hides Build Tools" + top="5" + use_ellipses="true" + width="80"> + <commit_callback + function="Build.Toggle" + parameter="build" /> + </bottomtray_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="search_btn_panel" + user_resize="false" + width="83"> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Search" + layout="topleft" + left="0" + name="search_btn" + tool_tip="Shows/hides Search" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="search" /> + </bottomtray_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="52" + mouse_opaque="false" + name="world_map_btn_panel" + user_resize="false" + width="83"> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Map" + layout="topleft" + left="0" + name="world_map_btn" + tool_tip="Shows/hides World Map" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="world_map" /> + </bottomtray_button> + </layout_panel> + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="62" + mouse_opaque="false" + name="mini_map_btn_panel" + user_resize="false" + width="83"> + <bottomtray_button + follows="left|right" + height="23" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" + is_toggle="true" + label="Mini-Map" + layout="topleft" + left="0" + name="mini_map_btn" + tool_tip="Shows/hides Mini-Map" + top="5" + use_ellipses="true" + width="80"> + <init_callback + function="Button.SetFloaterToggle" + parameter="mini_map" /> + </bottomtray_button> + </layout_panel> + <layout_panel + follows="left|right" + height="30" + layout="topleft" + min_width="95" + mouse_opaque="false" + name="chiclet_list_panel" + top="0" + user_resize="false" + width="189"> +<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same +as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991--> + <chiclet_panel + chiclet_padding="4" + follows="left|right" + height="24" + layout="topleft" + left="1" + min_width="95" + mouse_opaque="false" + name="chiclet_list" + top="7" + width="189"> + <button + auto_resize="true" + follows="right" + height="29" + image_hover_selected="SegmentedBtn_Left_Over" + image_hover_unselected="SegmentedBtn_Left_Over" + image_overlay="Arrow_Small_Left" + image_pressed="SegmentedBtn_Left_Press" + image_pressed_selected="SegmentedBtn_Left_Press" + image_selected="SegmentedBtn_Left_Off" + image_unselected="SegmentedBtn_Left_Off" + layout="topleft" + name="chicklet_left_scroll_button" + tab_stop="false" + top="-28" + visible="false" + width="7" /> + <button + auto_resize="true" + follows="right" + height="29" + image_hover_selected="SegmentedBtn_Right_Over" + image_hover_unselected="SegmentedBtn_Right_Over" + image_overlay="Arrow_Small_Right" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Press" + image_selected="SegmentedBtn_Right_Off" + image_unselected="SegmentedBtn_Right_Off" + layout="topleft" + name="chicklet_right_scroll_button" + tab_stop="false" + top="-28" + visible="false" + width="7" /> + </chiclet_panel> + </layout_panel> + <layout_panel auto_resize="false" + user_resize="false" + width="4" + min_width="4"/> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="37" + name="im_well_panel" + top="0" + user_resize="false" + width="37"> + <chiclet_im_well + follows="right" + height="28" + layout="topleft" + left="0" + max_displayed_count="99" + name="im_well" + top="0" + width="35"> + <!-- +Emulate 4 states of button by background images, see details in EXT-3147. The same should be for notification_well button +xml attribute Description +image_unselected "Unlit" - there are no new messages +image_selected "Unlit" + "Selected" - there are no new messages and the Well is open +image_pressed "Lit" - there are new messages +image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + --> + <button + auto_resize="true" + follows="right" + halign="center" + height="23" + image_overlay="Unread_IM" + image_overlay_alignment="center" + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" + image_selected="PushButton_Press" + label_color="Black" + left="0" + name="Unread IM messages" + tool_tip="Conversations" + width="34"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="im_well_window" /> + </button> + </chiclet_im_well> + </layout_panel> + <layout_panel + auto_resize="false" + follows="right" + height="28" + layout="topleft" + min_height="28" + min_width="37" + name="notification_well_panel" + top="0" + user_resize="false" + width="37"> + <chiclet_notification + follows="right" + height="23" + layout="topleft" + left="0" + max_displayed_count="99" + name="notification_well" + top="5" + width="35"> + <button + auto_resize="true" + bottom_pad="3" + follows="right" + halign="center" + height="23" + image_overlay="Notices_Unread" + image_overlay_alignment="center" + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" + image_selected="PushButton_Press" + label_color="Black" + left="0" + name="Unread" + tool_tip="Notifications" + width="34"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="notification_well_window" /> + </button> + </chiclet_notification> + </layout_panel> + <layout_panel + auto_resize="false" + user_resize="false" + min_width="4" + name="DUMMY2" + width="8" /> + </layout_stack> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index 559df5bec9..714dca7fac 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -67,7 +67,7 @@ image_overlay="Arrow_Up" hover_glow_amount="0.15" layout="topleft" - left="180" + left="200" name="enable_this_popup" top_pad="5" width="40"> @@ -81,7 +81,7 @@ image_overlay="Arrow_Down" hover_glow_amount="0.15" layout="topleft" - left_pad="40" + left_pad="20" name="disable_this_popup" top_delta="0" width="40"> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index a1082d9c32..404537e1f2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -208,15 +208,27 @@ <check_box control_name="TranslateChat" enabled="true" - height="16" - label="Use machine translation while chatting (powered by Google)" + height="16" layout="topleft" left="30" name="translate_chat_checkbox" - bottom_delta="30" + top_pad="5" width="400" /> + <!-- *HACK + After storm-1109 will be fixed: instead of using this text_box, word_wrap should be applied for "translate_chat_checkbox" check_box's label.--> + <text + follows="top|left" + height="15" + layout="topleft" + left="50" + name="translate_chb_label" + top_delta="1" + width="450" + wrap="true"> + Use machine translation while chatting (powered by Google) + </text> <text - bottom_delta="30" + top_pad="20" name="translate_language_text" follows="left|top" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 36f8f99178..9c718fdb87 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -307,17 +307,6 @@ tool_tip="Check to use display names in chat, IM, name tags, etc." top_pad="3"/> - <check_box - control_name="EnableUIHints" - follows="top|left" - height="16" - label="Enable Viewer UI Hints" - layout="topleft" - left="27" - name="viewer_hints_check" - top_pad="5" - width="237"/> - <text type="string" length="1" @@ -326,7 +315,7 @@ layout="topleft" left="30" name="inworld_typing_rg_label" - top_pad="6" + top_pad="1" width="400"> Pressing letter keys: </text> @@ -348,9 +337,9 @@ width="150" /> <radio_item label="Affects movement (i.e. WASD)" - left_pad="0" + left="0" layout="topleft" - top_delta="0" + top="18" height="16" name="radio_move" value="0" @@ -365,7 +354,7 @@ layout="topleft" left="30" name="title_afk_text" - top_pad="4" + top_pad="15" width="190"> Away timeout: </text> @@ -408,7 +397,7 @@ left="30" mouse_opaque="false" name="text_box3" - top_pad="5" + top_pad="3" width="240"> Busy mode response: </text> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_move.xml b/indra/newview/skins/default/xui/en/panel_preferences_move.xml index d2fc6ea09a..04412bdb9c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_move.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_move.xml @@ -120,12 +120,13 @@ type="string" length="1" follows="left|top" - height="10" + height="15" layout="topleft" left_delta="3" name=" Mouse Sensitivity" top_pad="10" - width="160"> + width="160" + wrap="true"> Mouselook mouse sensitivity: </text> <slider @@ -139,7 +140,7 @@ max_val="15" name="mouse_sensitivity" top_delta="-1" - width="145" /> + width="115" /> <check_box control_name="InvertMouse" height="16" @@ -158,7 +159,7 @@ left="78" name="arrow_keys_move_avatar_check" width="237" - top_pad="1"/> + top_pad="10"/> <check_box control_name="AllowTapTapHoldRun" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 6954a8b53a..30be5bc853 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -82,8 +82,8 @@ control_name="ShowFavoritesOnLogin" enabled="false" height="16" - label="Show my Favorite Landmarks at Login (via 'Start At' drop-down menu)" layout="topleft" + label="Show my Favorite Landmarks at Login (via 'Start At' drop-down menu)" left="30" name="favorites_on_login_check" top_pad="10" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index a314e0d85e..62e445862f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -50,12 +50,24 @@ control_name="MuteWhenMinimized" height="15" initial_value="true" - label="Mute when minimized" layout="topleft" name="mute_when_minimized" top_delta="3" left_pad="5" - width="235" /> + width="20" /> + <!-- *HACK + After storm-1109 will be fixed: instead of using this text_box, word_wrap should be applied for "mute_when_minimized" check_box's label.--> + <text + follows="top|left" + height="15" + layout="topleft" + left_pad="0" + name="mute_chb_label" + top_delta="0" + width="150" + wrap="true"> + Mute when minimized + </text> <slider control_name="AudioLevelUI" disabled_control="MuteAudio" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 27295150c5..b0ede60fa0 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3214,6 +3214,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. The session initialization is timed out </string> + <string name="Home position set.">Home position set.</string> + <string name="voice_morphing_url">http://secondlife.com/landing/voicemorphing</string> <!-- Financial operations strings --> diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml index a1e32e44de..4d69dda7eb 100644 --- a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml +++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <avatar_icon + name="avatar_icon" default_icon_name="Generic_Person_Large" use_draw_context_alpha="false"> </avatar_icon> diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml index 830ea12e41..e6d4bff8b5 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml @@ -6,20 +6,24 @@ track_color="ScrollbarTrackColor" thumb_color="ScrollbarThumbColor" thickness="15"> - <up_button image_unselected="ScrollArrow_Up" + <up_button name="up_button" + image_unselected="ScrollArrow_Up" image_selected="ScrollArrow_Up" scale_image="true" hover_glow_amount="0.35"/> - <down_button image_unselected="ScrollArrow_Down" + <down_button name="down_button" + image_unselected="ScrollArrow_Down" image_selected="ScrollArrow_Down" scale_image="true" hover_glow_amount="0.35"/> - <left_button image_unselected="ScrollArrow_Left" + <left_button name="left_button" + image_unselected="ScrollArrow_Left" image_selected="ScrollArrow_Left" scale_image="true" hover_glow_amount="0.35"/> - <right_button image_unselected="ScrollArrow_Right" - image_selected="ScrollArrow_Right" - scale_image="true" - hover_glow_amount="0.35"/> + <right_button name="right_button" + image_unselected="ScrollArrow_Right" + image_selected="ScrollArrow_Right" + scale_image="true" + hover_glow_amount="0.35"/> </scroll_bar> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml index 0b304fe287..aba85f9ff1 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="Chats de MI" name="EnableIMChatPopups" tool_tip="Activa esta casilla para ver una ventana emergente cada vez que recibas un mensaje instantáneo"/> <spinner label="Duración de los interlocutores favoritos:" name="nearby_toasts_lifetime"/> <spinner label="Tiempo de los otros interlocutores:" name="nearby_toasts_fadingtime"/> - <check_box label="Usar la traducción automática (con Google) en el chat" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Usar la traducción automática (con Google) en el chat</text> <text name="translate_language_text"> Traducir el chat al: </text> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml index db3659abcd..2bc82307a8 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Botón medio del ratón </panel.string> <slider label="Volumen general" name="System Volume"/> - <check_box initial_value="true" label="Silenciar cuando minimice" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Silenciar cuando minimice</text> <slider label="Botones" name="UI Volume"/> <slider label="Ambiental" name="Wind Volume"/> <slider label="Efectos de sonido" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml index 4b3fc35150..d5cecfc698 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="Chats IM" name="EnableIMChatPopups" tool_tip="Cocher cette case pour qu'un popup s'affiche à réception d'un message instantané."/> <spinner label="Durée de vie du popup Chat près de moi :" name="nearby_toasts_lifetime"/> <spinner label="Disparition progressive du popup Chat près de moi :" name="nearby_toasts_fadingtime"/> - <check_box label="Utiliser la traduction automatique lors des chats (fournie par Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Utiliser la traduction automatique lors des chats (fournie par Google)</text> <text name="translate_language_text"> Traduire le chat en : </text> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml index 48630918d7..ac7f72d367 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Bouton central de la souris </panel.string> <slider label="Volume principal" name="System Volume"/> - <check_box initial_value="true" label="Couper quand minimisé" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Couper quand minimisé</text> <slider label="Boutons" name="UI Volume"/> <slider label="Ambiant" name="Wind Volume"/> <slider label="Effets sonores" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml index 4a1bbdf64a..208dd5ed28 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_chat.xml @@ -56,7 +56,8 @@ <radio_item label="Finestre separate" name="radio" value="0"/> <radio_item label="Schede" name="radio2" value="1"/> </radio_group> - <check_box label="Usa la traduzione meccanica durante le chat (tecnologia Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Usa la traduzione meccanica durante le chat (tecnologia Google)</text> <text name="translate_language_text" width="110"> Traduci chat in: </text> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml index 6e70a314c5..e2332b63d0 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Suoni" name="Preference Media panel"> <slider label="Vol. principale" name="System Volume"/> - <check_box initial_value="true" label="Disatt. se a icona" name="mute_when_minimized"/> + <check_box initial_value="true" label="" name="mute_when_minimized"/> + <text name="mute_chb_label">Disatt. se a icona</text> <slider label="Pulsanti" name="UI Volume"/> <slider label="Ambiente" name="Wind Volume"/> <slider label="Effetti sonori" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml index c260cebef8..ce2a0f35e4 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_chat.xml @@ -56,7 +56,8 @@ <radio_item label="別々のウィンドウ" name="radio" value="0"/> <radio_item label="タブ" name="radio2" value="1"/> </radio_group> - <check_box label="チャット中に内容を機械翻訳する(Google翻訳)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >チャット中に内容を機械翻訳する(Google翻訳)</text> <text name="translate_language_text"> 翻訳する言語: </text> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml index 9fbbd46220..74696a3b35 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="サウンド" name="Preference Media panel"> <slider label="全体の音量" name="System Volume"/> - <check_box initial_value="true" label="最小化でミュート" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">最小化でミュート</text> <slider label="ボタン" name="UI Volume"/> <slider label="風" name="Wind Volume"/> <slider label="効果音" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/nl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/nl/panel_preferences_sound.xml index 2b709bde40..5ded015868 100644 --- a/indra/newview/skins/default/xui/nl/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/nl/panel_preferences_sound.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Geluid" name="Preference Media panel"> <slider label="Hoofd volume" name="System Volume"/> - <check_box initial_value="true" label="Dempen indien geminimaliseerd" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Dempen indien geminimaliseerd</text> <slider label="Omliggend" name="Wind Volume"/> <slider label="Knoppen" name="UI Volume"/> <slider label="Media" name="Media Volume"/> diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml index c7142c8419..4a4e6509ab 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="Czat IM" name="EnableIMChatPopups" tool_tip="Zaznacz aby widzieć wyskakujące okienka kiedy IM się pojawia"/> <spinner label="Czas widoczności czatu w pobliżu:" name="nearby_toasts_lifetime"/> <spinner label="Czas znikania czatu w pobliżu:" name="nearby_toasts_fadingtime"/> - <check_box label="Używaj translatora podczas rozmowy (wspierany przez Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Używaj translatora podczas rozmowy (wspierany przez Google)</text> <text name="translate_language_text"> Przetłumacz czat na: </text> diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml index ac93949a1b..692f24715b 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Środkowy przycisk myszy </panel.string> <slider label="Główny" name="System Volume"/> - <check_box initial_value="true" label="Wycisz podczas minimalizacji" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Wycisz podczas minimalizacji</text> <slider label="Interfejs" name="UI Volume"/> <slider label="Otoczenie" name="Wind Volume"/> <slider label="Efekty dźwiękowe" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml index 368c474ee9..412bdbb13e 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml @@ -29,7 +29,8 @@ <check_box label="Bate-papos de MI" name="EnableIMChatPopups" tool_tip="Exibir pop-up de mensagens instantâneas novas"/> <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_lifetime"/> <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_fadingtime"/> - <check_box label="Traduzir bate-papo automaticamente (via Google)" name="translate_chat_checkbox"/> + <check_box name="translate_chat_checkbox"/> + <text name="translate_chb_label" >Traduzir bate-papo automaticamente (via Google)</text> <text name="translate_language_text"> Traduzir bate-papo para: </text> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml index 3846bfb377..6053deb5b1 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml @@ -4,7 +4,8 @@ Botão do meio do mouse </panel.string> <slider label="Volume principal" name="System Volume"/> - <check_box initial_value="true" label="Silenciar ao minimizar" name="mute_when_minimized"/> + <check_box initial_value="true" name="mute_when_minimized"/> + <text name="mute_chb_label">Silenciar ao minimizar</text> <slider label="Botões" name="UI Volume"/> <slider label="Ambiente" name="Wind Volume"/> <slider label="Efeitos sonoros" name="SFX Volume"/> diff --git a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml index 39d1a90850..5730adab8a 100644 --- a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml @@ -42,40 +42,5 @@ show_speaking_indicator="false" width="147" /> </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="130" - name="call_btn_panel" - user_resize="false" - visible="false"> - <button - follows="all" - height="20" - label="Call" - name="call_btn" - width="130" - top="5" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="130" - name="end_call_btn_panel" - user_resize="false" - visible="false"> - <button - follows="all" - height="20" - label="Leave Call" - name="end_call_btn" - top="5"/> - </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml index be13bc1bb7..c3f46f11e0 100644 --- a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml @@ -78,39 +78,6 @@ width="140" /> </layout_panel> <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="call_btn_panel" - user_resize="false"> - <button - follows="left|top|right" - height="23" - label="Call" - name="call_btn" - width="140" /> - </layout_panel> - <layout_panel - auto_resize="false" - follows="top|left|right" - height="25" - layout="topleft" - min_height="25" - width="140" - name="end_call_btn_panel" - user_resize="false" - visible="false"> - <button - follows="left|top|right" - height="23" - label="End Call" - name="end_call_btn" - width="140" /> - </layout_panel> - <layout_panel mouse_opaque="false" auto_resize="true" follows="top|left" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f0b1973fdf..f671c770ea 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -939,9 +939,9 @@ class Linux_i686Manifest(LinuxManifest): self.path("libdb-5.1.so") self.path("libdb-5.so") self.path("libdb.so") - self.path("libcrypto.so.0.9.8") + self.path("libcrypto.so.1.0.0") self.path("libexpat.so.1.5.2") - self.path("libssl.so.0.9.8") + self.path("libssl.so.1.0.0") self.path("libuuid.so") self.path("libuuid.so.16") self.path("libuuid.so.16.0.22") diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index ee65e0aa87..884b00f0cc 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2008&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2011, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -2237,7 +2237,13 @@ void LLMediaPluginTest::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e case MEDIA_EVENT_LINK_HOVERED: { std::cerr << "Media event: MEDIA_EVENT_LINK_HOVERED, hover text is: " << self->getHoverText() << std::endl; - }; + } + break; + + default: + { + std::cerr << "Media event: <unknown>, code is: " << int(event) << std::endl; + } break; } } |