diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lltextbase.cpp | 89 | ||||
-rw-r--r-- | indra/llui/lltextbase.h | 18 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 11 | ||||
-rw-r--r-- | indra/llui/lltexteditor.h | 2 | ||||
-rw-r--r-- | indra/newview/character/avatar_lad.xml | 7 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llchathistory.h | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterabout.cpp | 265 | ||||
-rw-r--r-- | indra/newview/lltexlayer.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llwearable.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_about.xml | 104 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preview_notecard.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_test_textbox.xml | 67 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/chat_history.xml | 4 |
16 files changed, 346 insertions, 255 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 0add3fb500..653505a12e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -973,7 +973,7 @@ void LLTextBase::draw() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(mDocumentView->getRect(), bg_color, TRUE); + gl_rect_2d(mTextRect, bg_color, TRUE); } // draw document view @@ -1034,13 +1034,13 @@ S32 LLTextBase::getLeftOffset(S32 width) switch (mHAlign) { case LLFontGL::LEFT: - return 0; + return mHPad; case LLFontGL::HCENTER: - return (mTextRect.getWidth() - width) / 2; + return mHPad + (mTextRect.getWidth() - width - mHPad) / 2; case LLFontGL::RIGHT: return mTextRect.getWidth() - width; default: - return 0; + return mHPad; } } @@ -1048,8 +1048,6 @@ S32 LLTextBase::getLeftOffset(S32 width) static LLFastTimer::DeclareTimer FTM_TEXT_REFLOW ("Text Reflow"); void LLTextBase::reflow(S32 start_index) { - if (!mReflowNeeded) return; - LLFastTimer ft(FTM_TEXT_REFLOW); updateSegments(); @@ -1078,7 +1076,7 @@ void LLTextBase::reflow(S32 start_index) segment_set_t::iterator seg_iter = mSegments.begin(); S32 seg_offset = 0; S32 line_start_index = 0; - const S32 text_width = mTextRect.getWidth(); // optionally reserve room for margin + const S32 text_width = mTextRect.getWidth() - mHPad; // reserve room for margin S32 remaining_pixels = text_width; LLWString text(getWText()); S32 line_count = 0; @@ -2037,7 +2035,6 @@ void LLTextBase::updateRects() } else { - mContentsRect = mLineInfoList.begin()->mRect; for (line_list_t::const_iterator line_iter = ++mLineInfoList.begin(); line_iter != mLineInfoList.end(); @@ -2046,13 +2043,28 @@ void LLTextBase::updateRects() mContentsRect.unionWith(line_iter->mRect); } - mContentsRect.mRight += mHPad; + mContentsRect.mLeft = 0; mContentsRect.mTop += mVPad; - // get around rounding errors when clipping text against rectangle - mContentsRect.stretch(1); + + S32 delta_pos = -mContentsRect.mBottom; + // move line segments to fit new document rect + for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) + { + it->mRect.translate(0, delta_pos); + } + mContentsRect.translate(0, delta_pos); } + // update document container dimensions according to text contents + LLRect doc_rect = mContentsRect; + // use old mTextRect constraint document to width of viewable region + doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth(); + mDocumentView->setShape(doc_rect); + + //update mTextRect *after* mDocumentView has been resized + // so that scrollbars are added if document needs to scroll + // since mTextRect does not include scrollbars LLRect old_text_rect = mTextRect; mTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); //FIXME: replace border with image? @@ -2060,43 +2072,14 @@ void LLTextBase::updateRects() { mTextRect.stretch(-1); } - mTextRect.mLeft += mHPad; - mTextRect.mTop -= mVPad; if (mTextRect != old_text_rect) { needsReflow(); } - // change document rect size too - LLRect document_rect; - if (mScroller) - { - // document is size of scroller or size of text contents, whichever is larger - document_rect.setOriginAndSize(0, 0, - mScroller->getContentWindowRect().getWidth(), - llmax(mScroller->getContentWindowRect().getHeight(), mContentsRect.getHeight())); - } - else - { - // document size is just extents of reflowed text, reset to origin 0,0 - document_rect.set(0, - getLocalRect().getHeight(), - getLocalRect().getWidth(), - llmin(0, getLocalRect().getHeight() - mContentsRect.getHeight())); - } - mDocumentView->setShape(document_rect); - - // after making document big enough to hold all the text, move the text to fit in the document - if (!mLineInfoList.empty()) - { - S32 delta_pos = mDocumentView->getRect().getHeight() - mLineInfoList.begin()->mRect.mTop - mVPad; - // move line segments to fit new document rect - for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) - { - it->mRect.translate(0, delta_pos); - } - mContentsRect.translate(0, delta_pos); - } + // update document container again, using new mTextRect + doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth(); + mDocumentView->setShape(doc_rect); } @@ -2442,12 +2425,14 @@ void LLNormalTextSegment::dump() const // LLInlineViewSegment // -LLInlineViewSegment::LLInlineViewSegment(LLView* view, S32 start, S32 end, bool force_new_line, S32 hpad, S32 vpad) +LLInlineViewSegment::LLInlineViewSegment(const Params& p, S32 start, S32 end) : LLTextSegment(start, end), - mView(view), - mForceNewLine(force_new_line), - mHPad(hpad), // one sided padding (applied to left and right) - mVPad(vpad) + mView(p.view), + mForceNewLine(p.force_newline), + mLeftPad(p.left_pad), + mRightPad(p.right_pad), + mTopPad(p.top_pad), + mBottomPad(p.bottom_pad) { } @@ -2467,8 +2452,8 @@ void LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt } else { - width = mHPad * 2 + mView->getRect().getWidth(); - height = mVPad * 2 + mView->getRect().getHeight(); + width = mLeftPad + mRightPad + mView->getRect().getWidth(); + height = mBottomPad + mTopPad + mView->getRect().getHeight(); } } @@ -2491,14 +2476,14 @@ S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin void LLInlineViewSegment::updateLayout(const LLTextBase& editor) { LLRect start_rect = editor.getDocRectFromDocIndex(mStart); - mView->setOrigin(start_rect.mLeft + mHPad, start_rect.mBottom + mVPad); + mView->setOrigin(start_rect.mLeft + mLeftPad, start_rect.mBottom + mBottomPad); } F32 LLInlineViewSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { // return padded width of widget // widget is actually drawn during mDocumentView's draw() - return (F32)(draw_rect.mLeft + mView->getRect().getWidth() + mHPad * 2); + return (F32)(draw_rect.mLeft + mView->getRect().getWidth() + mLeftPad + mRightPad); } void LLInlineViewSegment::unlinkFromDocument(LLTextBase* editor) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index d0787f001e..14fd786127 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -459,7 +459,17 @@ public: class LLInlineViewSegment : public LLTextSegment { public: - LLInlineViewSegment(LLView* widget, S32 start, S32 end, bool force_new_line, S32 hpad = 0, S32 vpad = 0); + struct Params : public LLInitParam::Block<Params> + { + Mandatory<LLView*> view; + Optional<bool> force_newline; + Optional<S32> left_pad, + right_pad, + bottom_pad, + top_pad; + }; + + LLInlineViewSegment(const Params& p, S32 start, S32 end); ~LLInlineViewSegment(); /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; @@ -470,8 +480,10 @@ public: /*virtual*/ void linkToDocument(class LLTextBase* editor); private: - S32 mHPad; - S32 mVPad; + S32 mLeftPad; + S32 mRightPad; + S32 mTopPad; + S32 mBottomPad; LLView* mView; bool mForceNewLine; }; diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 570ca4b998..f0238dba49 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2307,7 +2307,7 @@ void LLTextEditor::insertText(const std::string &new_text) setEnabled( enabled ); } -void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool force_new_line, S32 hpad, S32 vpad) +void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo) { // Save old state S32 selection_start = mSelectionStart; @@ -2321,12 +2321,9 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, setCursorPos(old_length); - LLWString widget_wide_text; + LLWString widget_wide_text = utf8str_to_wstring(text); - // Add carriage return if not first line - widget_wide_text = utf8str_to_wstring(widget_text); - - LLTextSegmentPtr segment = new LLInlineViewSegment(widget, old_length, old_length + widget_text.size(), force_new_line, hpad, vpad); + LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + widget_wide_text.size()); insert(getLength(), widget_wide_text, FALSE, segment); needsReflow(); @@ -2349,7 +2346,7 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, setCursorPos(cursor_pos); } - if( !allow_undo ) + if (!allow_undo) { blockUndo(); } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 4847f4d117..10fc94dedc 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -166,7 +166,7 @@ public: // inserts text at cursor void insertText(const std::string &text); - void appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool force_newline, S32 hpad, S32 vpad); + void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); // Non-undoable void setText(const LLStringExplicit &utf8str); diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index f3bfa37cea..c43ba27984 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -5589,6 +5589,13 @@ </layer> <layer + name="hair texture alpha layer" + visibility_mask="TRUE"> + <texture + local_texture="hair_grain" /> + </layer> + + <layer name="hair alpha" visibility_mask="TRUE"> <texture diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 38e8985188..aaca568320 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -254,7 +254,7 @@ mMessageSeparatorFilename(p.message_separator), mLeftTextPad(p.left_text_pad), mRightTextPad(p.right_text_pad), mLeftWidgetPad(p.left_widget_pad), -mRightWidgetPad(p.rigth_widget_pad) +mRightWidgetPad(p.right_widget_pad) { } @@ -308,12 +308,19 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty } //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); - target_rect.mLeft += mLeftWidgetPad; + // squeeze down the widget by subtracting padding off left and right + target_rect.mLeft += mLeftWidgetPad + mHPad; target_rect.mRight -= mRightWidgetPad; view->reshape(target_rect.getWidth(), view->getRect().getHeight()); view->setOrigin(target_rect.mLeft, view->getRect().mBottom); - appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); + LLInlineViewSegment::Params p; + p.view = view; + p.force_newline = true; + p.left_pad = mLeftWidgetPad; + p.right_pad = mRightWidgetPad; + + appendWidget(p, view_text, false); //Append the text message std::string message = chat.mText + '\n'; diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index f13e974a9c..92dcfdd958 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -53,7 +53,7 @@ class LLChatHistory : public LLTextEditor //Widget left padding from the scroll rect Optional<S32> left_widget_pad; //Widget right padding from the scroll rect - Optional<S32> rigth_widget_pad; + Optional<S32> right_widget_pad; Params() : message_header("message_header"), @@ -61,7 +61,7 @@ class LLChatHistory : public LLTextEditor left_text_pad("left_text_pad"), right_text_pad("right_text_pad"), left_widget_pad("left_widget_pad"), - rigth_widget_pad("rigth_widget_pad") + right_widget_pad("right_widget_pad") { } diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 92ad28a105..63ea990d14 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -61,6 +61,9 @@ #include "lluri.h"
#include "v3dmath.h"
#include "llwindow.h"
+#include "stringize.h"
+#include "llsdutil_math.h"
+#include "lleventdispatcher.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -85,6 +88,10 @@ private: public:
/*virtual*/ BOOL postBuild();
+
+ /// Obtain the data used to fill out the contents string. This is
+ /// separated so that we can programmatically access the same info.
+ static LLSD getInfo();
void onClickCopyToClipboard();
};
@@ -114,25 +121,117 @@ BOOL LLFloaterAbout::postBuild() getChild<LLUICtrl>("copy_btn")->setCommitCallback(
boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this));
- // Version string
- std::string version = LLTrans::getString("APP_NAME")
- + llformat(" %d.%d.%d (%d) %s %s (%s)\n",
- LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
- __DATE__, __TIME__,
- gSavedSettings.getString("VersionChannelName").c_str());
+#if LL_WINDOWS
+ getWindow()->incBusyCount();
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+#endif
+ LLSD info(getInfo());
+#if LL_WINDOWS
+ getWindow()->decBusyCount();
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+#endif
- std::string support;
- support.append(version);
- support.append("[" + get_viewer_release_notes_url() + " " +
- LLTrans::getString("ReleaseNotes") + "]");
- support.append("\n\n");
+ std::ostringstream support;
-#if LL_MSVC
- support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER));
-#endif
+ // Render the LLSD from getInfo() as a format_map_t
+ LLStringUtil::format_map_t args;
+ // For reasons I don't yet understand, [ReleaseNotes] is not part of the
+ // default substitution strings whereas [APP_NAME] is. But it works to
+ // simply copy it into these specific args.
+ args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
+ for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
+ ii != iend; ++ii)
+ {
+ if (! ii->second.isArray())
+ {
+ // Scalar value
+ if (ii->second.isUndefined())
+ {
+ args[ii->first] = getString("none");
+ }
+ else
+ {
+ // don't forget to render value asString()
+ args[ii->first] = ii->second.asString();
+ }
+ }
+ else
+ {
+ // array value: build KEY_0, KEY_1 etc. entries
+ for (LLSD::Integer n(0), size(ii->second.size()); n < size; ++n)
+ {
+ args[STRINGIZE(ii->first << '_' << n)] = ii->second[n].asString();
+ }
+ }
+ }
+
+ // Now build the various pieces
+ support << getString("AboutHeader", args);
+ if (info.has("COMPILER"))
+ {
+ support << "\n\n" << getString("AboutCompiler", args);
+ }
+ if (info.has("REGION"))
+ {
+ support << "\n\n" << getString("AboutPosition", args);
+ }
+ support << "\n\n" << getString("AboutSystem", args);
+ if (info.has("GRAPHICS_DRIVER_VERSION"))
+ {
+ support << "\n\n" << getString("AboutDriver", args);
+ }
+ support << "\n\n" << getString("AboutLibs", args);
+ if (info.has("PACKETS_IN"))
+ {
+ support << '\n' << getString("AboutTraffic", args);
+ }
-#if LL_GNUC
- support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION));
+ support_widget->appendText(support.str(),
+ FALSE,
+ LLStyle::Params()
+ .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor")));
+ support_widget->blockUndo();
+
+ // Fix views
+ support_widget->setCursorPos(0);
+ support_widget->setEnabled(FALSE);
+
+ credits_widget->setCursorPos(0);
+ credits_widget->setEnabled(FALSE);
+
+ return TRUE;
+}
+
+// static
+LLSD LLFloaterAbout::getInfo()
+{
+ // The point of having one method build an LLSD info block and the other
+ // construct the user-visible About string is to ensure that the same info
+ // is available to a getInfo() caller as to the user opening
+ // LLFloaterAbout.
+ LLSD info;
+ LLSD version;
+ version.append(LL_VERSION_MAJOR);
+ version.append(LL_VERSION_MINOR);
+ version.append(LL_VERSION_PATCH);
+ version.append(LL_VERSION_BUILD);
+ info["VIEWER_VERSION"] = version;
+ info["VIEWER_VERSION_STR"] = STRINGIZE(version[0].asInteger() << '.' <<
+ version[1].asInteger() << '.' <<
+ version[2].asInteger() << '.' <<
+ version[3].asInteger());
+ info["BUILD_DATE"] = __DATE__;
+ info["BUILD_TIME"] = __TIME__;
+ info["CHANNEL"] = gSavedSettings.getString("VersionChannelName");
+
+ info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url();
+
+#if LL_MSVC
+ info["COMPILER"] = "MSVC";
+ info["COMPILER_VERSION"] = _MSC_VER;
+#elif LL_GNUC
+ info["COMPILER"] = "GCC";
+ info["COMPILER_VERSION"] = GCC_VERSION;
#endif
// Position
@@ -140,120 +239,49 @@ BOOL LLFloaterAbout::postBuild() if (region)
{
const LLVector3d &pos = gAgent.getPositionGlobal();
- LLUIString pos_text = getString("you_are_at");
- pos_text.setArg("[POSITION]",
- llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
- support.append(pos_text);
-
- LLUIString region_text = getString ("in_region") + " ";
- region_text.setArg("[REGION]", llformat ("%s", gAgent.getRegion()->getName().c_str()));
- support.append(region_text);
-
- std::string buffer;
- buffer = gAgent.getRegion()->getHost().getHostName();
- support.append(buffer);
- support.append(" (");
- buffer = gAgent.getRegion()->getHost().getString();
- support.append(buffer);
- support.append(")\n");
- support.append(gLastVersionChannel);
- support.append("\n");
- support.append("[" + LLWeb::escapeURL(region->getCapability("ServerReleaseNotes")) +
- " " + LLTrans::getString("ReleaseNotes") + "]");
- support.append("\n\n");
+ info["POSITION"] = ll_sd_from_vector3d(pos);
+ info["REGION"] = gAgent.getRegion()->getName();
+ info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
+ info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
+ info["SERVER_VERSION"] = gLastVersionChannel;
+ info["SERVER_RELEASE_NOTES_URL"] = LLWeb::escapeURL(region->getCapability("ServerReleaseNotes"));
}
- // *NOTE: Do not translate text like GPU, Graphics Card, etc -
- // Most PC users that know what these mean will be used to the english versions,
- // and this info sometimes gets sent to support
-
// CPU
- support.append(getString("CPU") + " ");
- support.append( gSysCPU.getCPUString() );
- support.append("\n");
-
- U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
+ info["CPU"] = gSysCPU.getCPUString();
+ info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024);
// Moved hack adjustment to Windows memory size into llsys.cpp
-
- LLStringUtil::format_map_t args;
- args["[MEM]"] = llformat ("%u", memory);
- support.append(getString("Memory", args) + "\n");
-
- support.append(getString("OSVersion") + " ");
- support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
- support.append("\n");
-
- support.append(getString("GraphicsCardVendor") + " ");
- support.append( (const char*) glGetString(GL_VENDOR) );
- support.append("\n");
-
- support.append(getString("GraphicsCard") + " ");
- support.append( (const char*) glGetString(GL_RENDERER) );
- support.append("\n");
+ info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
+ info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
+ info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
#if LL_WINDOWS
- getWindow()->incBusyCount();
- getWindow()->setCursor(UI_CURSOR_ARROW);
- support.append("Windows Graphics Driver Version: ");
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
- support.append(driver_info["DriverVersion"]);
+ info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
}
- support.append("\n");
- getWindow()->decBusyCount();
- getWindow()->setCursor(UI_CURSOR_ARROW);
#endif
- support.append(getString("OpenGLVersion") + " ");
- support.append( (const char*) glGetString(GL_VERSION) );
- support.append("\n");
-
- support.append("\n");
-
- support.append(getString("LibCurlVersion") + " ");
- support.append( LLCurl::getVersionString() );
- support.append("\n");
-
- support.append(getString("J2CDecoderVersion") + " ");
- support.append( LLImageJ2C::getEngineInfo() );
- support.append("\n");
-
- support.append(getString("AudioDriverVersion") + " ");
+ info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
+ info["LIBCURL_VERSION"] = LLCurl::getVersionString();
+ info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
bool want_fullname = true;
- support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : getString("none") );
- support.append("\n");
+ info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
// TODO: Implement media plugin version query
-
- support.append(getString("LLQtWebkitVersion") + " ");
- support.append("\n");
+ info["QT_WEBKIT_VERSION"] = "4.5.2";
if (gPacketsIn > 0)
{
- args["[LOST]"] = llformat ("%.0f", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent());
- args["[IN]"] = llformat ("%.0f", F32(gPacketsIn));
- args["[PCT]"] = llformat ("%.1f", 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
- support.append(getString ("PacketsLost", args) + "\n");
+ info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
+ info["PACKETS_IN"] = F32(gPacketsIn);
+ info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
}
- support_widget->appendText(support,
- FALSE,
- LLStyle::Params()
- .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor")));
- support_widget->blockUndo();
-
- // Fix views
- support_widget->setCursorPos(0);
- support_widget->setEnabled(FALSE);
-
- credits_widget->setCursorPos(0);
- credits_widget->setEnabled(FALSE);
-
- return TRUE;
+ return info;
}
-
static std::string get_viewer_release_notes_url()
{
std::ostringstream version;
@@ -272,6 +300,27 @@ static std::string get_viewer_release_notes_url() return LLWeb::escapeURL(url.str());
}
+class LLFloaterAboutListener: public LLDispatchListener
+{
+public:
+ LLFloaterAboutListener():
+ LLDispatchListener("LLFloaterAbout", "op")
+ {
+ add("getInfo", &LLFloaterAboutListener::getInfo, LLSD().insert("reply", LLSD()));
+ }
+
+private:
+ void getInfo(const LLSD& request) const
+ {
+ LLReqID reqid(request);
+ LLSD reply(LLFloaterAbout::getInfo());
+ reqid.stamp(reply);
+ LLEventPumps::instance().obtain(request["reply"]).post(reply);
+ }
+};
+
+static LLFloaterAboutListener floaterAboutListener;
+
void LLFloaterAbout::onClickCopyToClipboard()
{
LLViewerTextEditor *support_widget =
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 17547cae39..5d9046ac90 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -804,8 +804,9 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, gGL.setColorMask(false, true); gGL.setSceneBlendType(LLRender::BT_REPLACE); + // (Optionally) replace alpha with a single component image from a tga file. - if (!info->mStaticAlphaFileName.empty() && mMaskLayerList.empty()) + if (!info->mStaticAlphaFileName.empty()) { LLGLSNoAlphaTest gls_no_alpha_test; gGL.flush(); diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 8f74ea29ac..a091028ec2 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -545,7 +545,7 @@ BOOL LLWearable::isDirty() const else { // image found in current image list but not saved image list - return FALSE; + return TRUE; } } } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index b46b766fc0..d3366cdcaa 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -144,6 +144,7 @@ <texture name="Info" file_name="icons/Info.png" preload="false" /> <texture name="Info_Small" file_name="icons/Info_Small.png" preload="false" /> <texture name="Info_Off" file_name="navbar/Info_Off.png" preload="false" /> + <texture name="Info_Over" file_name="icons/Info_Over.png" preload="false" /> <texture name="Info_Press" file_name="navbar/Info_Press.png" preload="false" /> <texture name="Inspector_Background" file_name="windows/Inspector_Background.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index b194b533af..5cd11ba292 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -7,66 +7,56 @@ save_rect="true" title="About [APP_NAME]" width="470"> - <floater.string - name="you_are_at"> - You are at [POSITION] - </floater.string> - <floater.string - name="in_region"> - in [REGION] located at - </floater.string> - <floater.string - name="CPU"> - CPU: - </floater.string> - <floater.string - name="Memory"> - Memory: [MEM] MB - </floater.string> - <floater.string - name="OSVersion"> - OS Version: - </floater.string> - <floater.string - name="GraphicsCardVendor"> - Graphics Card Vendor: - </floater.string> - <floater.string - name="GraphicsCard"> - Graphics Card: - </floater.string> - <floater.string - name="OpenGLVersion"> - OpenGL Version: - </floater.string> - <floater.string - name="LibCurlVersion"> - libcurl Version: - </floater.string> - <floater.string - name="J2CDecoderVersion"> - J2C Decoder Version: - </floater.string> - <floater.string - name="AudioDriverVersion"> - Audio Driver Version: - </floater.string> - <floater.string - name="none"> - (none) - </floater.string> - <floater.string - name="LLMozLibVersion"> - LLMozLib Version: - </floater.string> <floater.string - name="LLQtWebkitVersion"> - Qt Webkit Version: 4.5.2 + name="AboutHeader"> +[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) +[[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] + +</floater.string> + <floater.string + name="AboutCompiler"> +Built with [COMPILER] version [COMPILER_VERSION] + +</floater.string> + <floater.string + name="AboutPosition"> +You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at [HOSTNAME] ([HOSTIP]) +[SERVER_VERSION] +[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]] + +</floater.string> + <!-- *NOTE: Do not translate text like GPU, Graphics Card, etc - + Most PC users who know what these mean will be used to the English versions, + and this info sometimes gets sent to support. --> + <floater.string + name="AboutSystem"> +CPU: [CPU] +Memory: [MEMORY_MB] MB +OS Version: [OS_VERSION] +Graphics Card Vendor: [GRAPHICS_CARD_VENDOR] +Graphics Card: [GRAPHICS_CARD] +</floater.string> + <floater.string + name="AboutDriver"> +Windows Graphics Driver Version: [GRAPHICS_DRIVER_VERSION] +</floater.string> + <floater.string + name="AboutLibs"> +OpenGL Version: [OPENGL_VERSION] + +libcurl Version: [LIBCURL_VERSION] +J2C Decoder Version: [J2C_VERSION] +Audio Driver Version: [AUDIO_DRIVER_VERSION] +Qt Webkit Version: [QT_WEBKIT_VERSION] +</floater.string> + <floater.string + name="none"> + (none) </floater.string> <floater.string - name="PacketsLost"> - Packets Lost: [LOST]/[IN] ([PCT]%) - </floater.string> + name="AboutTraffic"> +Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) +</floater.string> <tab_container follows="all" top="25" diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index 8cdafe110a..d2b8455eab 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -83,7 +83,7 @@ Loading... </text_editor> <button - follows="left|bottom" + follows="right|bottom" height="22" label="Save" label_selected="Save" diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml index 8305452c85..c33ab8aa70 100644 --- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml @@ -114,16 +114,59 @@ Escaped greater than > </text> <text - type="string" - length="1" - bottom="390" - label="N" - layout="topleft" - left="10" - name="floater_map_north" - right="30" - text_color="1 1 1 0.7" - top="370"> - N - </text> + type="string" + length="1" + bottom="390" + label="N" + layout="topleft" + left="10" + name="right_aligned_text" + width="380" + halign="right" + text_color="1 1 1 0.7" + top_pad="10"> + Right aligned text + </text> + <text + type="string" + length="1" + bottom="390" + label="N" + layout="topleft" + left="10" + name="centered_text" + width="380" + halign="center" + text_color="1 1 1 0.7" + top_pad="10"> + Centered text + </text> + <text + type="string" + length="1" + bottom="390" + label="N" + layout="topleft" + left="10" + name="centered_text" + width="380" + halign="left" + text_color="1 1 1 0.7" + top_pad="10"> + Left aligned text + </text> + <text + type="string" + length="1" + bottom="390" + label="N" + layout="topleft" + left="10" + name="floater_map_north" + right="30" + text_color="1 1 1 0.7" + top="370"> + N + </text> + </floater> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 35d6478c48..887c5b7e21 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2018,15 +2018,14 @@ this texture in your inventory <string name="IMTeen">teen</string> <!-- floater region info --> + <!-- The following will replace variable [ALL_ESTATES] in notifications EstateAllowed*, EstateBanned*, EstateManager* --> <string name="RegionInfoError">error</string> <string name="RegionInfoAllEstatesOwnedBy"> - all estates -owned by [OWNER] + all estates owned by [OWNER] </string> - <string name="RegionInfoAllEstatesYouOwn">all estates you owned</string> + <string name="RegionInfoAllEstatesYouOwn">all estates that you own</string> <string name="RegionInfoAllEstatesYouManage"> - all estates that -you managed for [OWNER] + all estates that you manage for [OWNER] </string> <string name="RegionInfoAllowedResidents">Allowed residents: ([ALLOWEDAGENTS], max [MAXACCESS])</string> <string name="RegionInfoAllowedGroups">Allowed groups: ([ALLOWEDGROUPS], max [MAXACCESS])</string> diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml index b72d59524e..ea6997ebd5 100644 --- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml +++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml @@ -4,8 +4,8 @@ message_separator="panel_chat_separator.xml" left_text_pad="10" right_text_pad="15" - left_widget_pad="5" - rigth_widget_pad="10" + left_widget_pad="0" + right_widget_pad="10" max_length="2147483647" enabled="false" track_bottom="true" |