diff options
author | James Cook <james@lindenlab.com> | 2009-10-03 23:40:28 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-03 23:40:28 +0000 |
commit | ada0f4fa221f2c7070fb02a2b7ff903bdde11c45 (patch) | |
tree | 0ede83511c304110138c01d16da2fff55162ef31 /indra/newview/llnearbychat.cpp | |
parent | b1a280841e1823a19658923a8eefeb67d1d70735 (diff) |
Merge inspectors UI project, gooey-4, into viewer-2 trunk. Added new tooltips to 3D avatars, 2D avatar names, and 3D objects. Refactors tooltips and text boxes, line editors, and text editors. Breaks LLExpandableTextBox, but a fix is coming.
Resolved conflicts in lltexteditor.cpp, llchatitemscontainerctrl.cpp, llchatmsgbox.cpp, llfloaterbuycurrency.cpp, llnearbychat.cpp, floater_buy_currency.xml, and ru/strings.xml
Merging revisions 134925-135157 of svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-4 into C:\source\viewer-2.0.0-3, respecting ancestry
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 8430937933..cc5f37b903 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -51,6 +51,7 @@ //for LLViewerTextEditor support #include "llagent.h" // gAgent #include "llfloaterscriptdebug.h" +#include "llslurl.h" #include "llviewertexteditor.h" #include "llstylemap.h" @@ -207,7 +208,7 @@ void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& colo if (chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID != LLUUID::null) { - str_URL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str()); + str_URL = LLSLURL::buildCommand("agent", chat.mFromID, "inspect"); } // If the chat line has an associated url, link it up to the name. @@ -216,20 +217,31 @@ void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& colo { std::string start_line = line.substr(0, chat.mFromName.length() + 1); line = line.substr(chat.mFromName.length() + 1); - mChatHistoryEditor->appendStyledText(start_line, false, prepend_newline, LLStyleMap::instance().lookup(chat.mFromID,str_URL)); + mChatHistoryEditor->appendText(start_line, prepend_newline, + LLStyleMap::instance().lookup(chat.mFromID,str_URL)); + mChatHistoryEditor->blockUndo(); prepend_newline = false; } S32 font_size = gSavedSettings.getS32("ChatFontSize"); - std::string font_name = ""; - - if (0 == font_size) - font_name = "small"; - else if (2 == font_size) - font_name = "sansserifbig"; + const LLFontGL* fontp = NULL; + switch(font_size) + { + case 0: + fontp = LLFontGL::getFontSansSerifSmall(); + break; + default: + case 1: + fontp = LLFontGL::getFontSansSerif(); + break; + case 2: + fontp = LLFontGL::getFontSansSerifBig(); + break; + } - mChatHistoryEditor->appendColoredText(line, false, prepend_newline, color, font_name); + mChatHistoryEditor->appendText(line, prepend_newline, LLStyle::Params().color(color).font(fontp)); + mChatHistoryEditor->blockUndo(); } void LLNearbyChat::addMessage(const LLChat& chat) @@ -250,11 +262,6 @@ void LLNearbyChat::addMessage(const LLChat& chat) } // could flash the chat button in the status bar here. JC - - - mChatHistoryEditor->setParseHTML(TRUE); - mChatHistoryEditor->setParseHighlights(TRUE); - if (!chat.mMuted) add_timestamped_line(chat, color); } |