From 87b079bd6b22f03a108cba3cff9e4d8570131ba9 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 22 Oct 2009 17:38:26 -0700 Subject: fix for text history being lost when closing chat history floater reviewed by James --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 90c5463aa7..b5a89d53e8 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -11,6 +11,7 @@ save_rect="true" title="Nearby Chat" save_visibility="true" + single_instance="true" width="320"> Date: Thu, 22 Oct 2009 18:09:07 -0700 Subject: Ext-1110 - Unable to select whole text by mouse in the text widget --- indra/llui/lltextbase.cpp | 44 +++++++++++++++++++++-------------------- indra/newview/llchathistory.cpp | 7 ++++--- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 22cce755b0..9b976466eb 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -538,10 +538,6 @@ void LLTextBase::drawText() next_start = getLineStart(cur_line + 1); line_end = next_start; } - if ( text[line_end-1] == '\n' ) - { - --line_end; - } LLRect text_rect(line.mRect.mLeft + mTextRect.mLeft - scrolled_view_rect.mLeft, line.mRect.mTop - scrolled_view_rect.mBottom + mTextRect.mBottom, @@ -957,10 +953,20 @@ void LLTextBase::draw() // then update scroll position, as cursor may have moved updateScrollFromCursor(); + LLRect doc_rect; + if (mScroller) + { + mScroller->localRectToOtherView(mScroller->getContentWindowRect(), &doc_rect, this); + } + else + { + doc_rect = getLocalRect(); + } + if (mBGVisible) { // clip background rect against extents, if we support scrolling - LLLocalClipRect clip(getLocalRect(), mScroller != NULL); + LLLocalClipRect clip(doc_rect, mScroller != NULL); LLColor4 bg_color = mReadOnly ? mReadOnlyBgColor.get() @@ -975,7 +981,7 @@ void LLTextBase::draw() { // only clip if we support scrolling (mScroller != NULL) - LLLocalClipRect clip(mTextRect, mScroller != NULL); + LLLocalClipRect clip(doc_rect, mScroller != NULL); drawSelectionBackground(); drawText(); drawCursor(); @@ -2218,6 +2224,11 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele const LLWString &text = mEditor.getWText(); + if ( text[seg_end-1] == '\n' ) + { + --seg_end; + } + F32 right_x = rect.mLeft; if (!mStyle->isVisible()) { @@ -2362,16 +2373,7 @@ void LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt { LLWString text = mEditor.getWText(); - // look for any printable character, then return the font height - height = 0; - for (S32 index = mStart + first_char; index < mStart + first_char + num_chars; ++index) - { - if (text[index] != '\n') - { - height = mFontHeight; - break; - } - } + height = mFontHeight; width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); } @@ -2393,7 +2395,11 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin S32 last_char = mStart + segment_offset; for (; last_char != mEnd; ++last_char) { - if (text[last_char] == '\n') break; + if (text[last_char] == '\n') + { + last_char++; + break; + } } // set max characters to length of segment, or to first newline @@ -2416,10 +2422,6 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin // include terminating NULL num_chars++; } - else if (text[mStart + segment_offset + num_chars] == '\n') - { - num_chars++; - } return num_chars; } diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ebf46a6e3f..94058365be 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -101,12 +101,12 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr if (mLastFromName == from) { view = getSeparator(); - view_text = " "; + view_text = "\n"; } else { view = getHeader(avatar_id, from, time); - view_text = "\n" + from + MESSAGE_USERNAME_DATE_SEPARATOR + time; + view_text = from + MESSAGE_USERNAME_DATE_SEPARATOR + time + '\n'; } //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); @@ -118,7 +118,8 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); //Append the text message - appendText(message, TRUE, style_params); + message += '\n'; + appendText(message, FALSE, style_params); mLastFromName = from; blockUndo(); -- cgit v1.2.3 From 6698c681fd3ae139629d677ddd01b5102a71fa3d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 26 Oct 2009 14:06:42 -0700 Subject: Add some logging to perhaps discern more information about reported crashes --- indra/newview/llmediadataclient.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 6ae42d23d3..512104a2f4 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -367,8 +367,9 @@ BOOL LLMediaDataClient::QueueTimer::tick() // Peel one off of the items from the queue, and execute request request_ptr_t request = queue.top(); llassert(!request.isNull()); - const LLMediaDataClientObject *object = request->getObject(); + const LLMediaDataClientObject *object = (request.isNull()) ? NULL : request->getObject(); bool performed_request = false; + bool error = false; llassert(NULL != object); if (NULL != object && object->hasMedia()) { @@ -387,7 +388,11 @@ BOOL LLMediaDataClient::QueueTimer::tick() } } else { - if (NULL == object) + if (request.isNull()) + { + LL_WARNS("LLMediaDataClient") << "Not Sending request: NULL request!" << LL_ENDL; + } + else if (NULL == object) { LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " NULL object!" << LL_ENDL; } @@ -395,9 +400,10 @@ BOOL LLMediaDataClient::QueueTimer::tick() { LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " hasMedia() is false!" << LL_ENDL; } + error = true; } bool exceeded_retries = request->getRetryCount() > mMDC->mMaxNumRetries; - if (performed_request || exceeded_retries) // Try N times before giving up + if (performed_request || exceeded_retries || error) // Try N times before giving up { if (exceeded_retries) { -- cgit v1.2.3 From 771fe6cb8d71b6d6ca6cd002fb41a11cd8f3f2bc Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 26 Oct 2009 14:16:48 -0700 Subject: Re labled "About Land" links back to "About Land" for 2.0. --- indra/newview/skins/default/xui/en/floater_tools.xml | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8cdcee6927..29fe046ed3 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2836,8 +2836,8 @@