summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcommon/CMakeLists.txt5
-rw-r--r--indra/llcommon/lluriparser.cpp228
-rw-r--r--indra/llcommon/lluriparser.h84
-rwxr-xr-xindra/llprimitive/llmodel.cpp16
-rwxr-xr-xindra/llui/CMakeLists.txt3
-rwxr-xr-xindra/llui/lltextbase.cpp7
-rwxr-xr-xindra/llui/lltextutil.cpp91
-rwxr-xr-xindra/llui/lltextutil.h19
-rwxr-xr-xindra/llui/llurlentry.cpp21
-rwxr-xr-xindra/llui/llurlentry.h6
-rwxr-xr-xindra/llui/llurlregistry.cpp6
-rwxr-xr-xindra/newview/llhudeffectlookat.cpp20
-rwxr-xr-xindra/newview/llviewermenu.cpp8
13 files changed, 364 insertions, 150 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 763f5a3521..debb42fb5f 100755
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -12,12 +12,14 @@ include(GoogleBreakpad)
include(GooglePerfTools)
include(Copy3rdPartyLibs)
include(ZLIB)
+include(URIPARSER)
include_directories(
${EXPAT_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${BREAKPAD_INCLUDE_DIRECTORIES}
+ ${URIPARSER_INCLUDE_DIRS}
)
# add_executable(lltreeiterators lltreeiterators.cpp)
@@ -103,6 +105,7 @@ set(llcommon_SOURCE_FILES
lltracerecording.cpp
lltracethreadrecorder.cpp
lluri.cpp
+ lluriparser.cpp
lluuid.cpp
llworkerthread.cpp
timing.cpp
@@ -217,6 +220,7 @@ set(llcommon_HEADER_FILES
llunits.h
llunittype.h
lluri.h
+ lluriparser.h
lluuid.h
llwin32headers.h
llwin32headerslean.h
@@ -261,6 +265,7 @@ target_link_libraries(
${BOOST_PROGRAM_OPTIONS_LIBRARY}
${BOOST_REGEX_LIBRARY}
${GOOGLE_PERFTOOLS_LIBRARIES}
+ ${URIPARSER_LIBRARIES}
)
if (DARWIN)
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
new file mode 100644
index 0000000000..ef4481d32f
--- /dev/null
+++ b/indra/llcommon/lluriparser.cpp
@@ -0,0 +1,228 @@
+/**
+ * @file lluriparser.cpp
+ * @author Protey
+ * @date 2014-10-07
+ * @brief Implementation of the LLUriParser class.
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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$
+ */
+
+#include "linden_common.h"
+#include "lluriparser.h"
+
+LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mRes(0)
+{
+ mState.uri = &mUri;
+
+ if (u.find("://") == std::string::npos)
+ {
+ mNormalizedUri = "http://";
+ mTmpScheme = true;
+ }
+
+ mNormalizedUri += u.c_str();
+
+ mRes = parse();
+}
+
+LLUriParser::~LLUriParser()
+{
+ uriFreeUriMembersA(&mUri);
+}
+
+S32 LLUriParser::parse()
+{
+ mRes = uriParseUriA(&mState, mNormalizedUri.c_str());
+ return mRes;
+}
+
+const char * LLUriParser::scheme() const
+{
+ return mScheme.c_str();
+}
+
+void LLUriParser::sheme(const std::string& s)
+{
+ mTmpScheme = !s.size();
+ mScheme = s;
+}
+
+const char * LLUriParser::port() const
+{
+ return mPort.c_str();
+}
+
+void LLUriParser::port(const std::string& s)
+{
+ mPort = s;
+}
+
+const char * LLUriParser::host() const
+{
+ return mHost.c_str();
+}
+
+void LLUriParser::host(const std::string& s)
+{
+ mHost = s;
+}
+
+const char * LLUriParser::path() const
+{
+ return mPath.c_str();
+}
+
+void LLUriParser::path(const std::string& s)
+{
+ mPath = s;
+}
+
+const char * LLUriParser::query() const
+{
+ return mQuery.c_str();
+}
+
+void LLUriParser::query(const std::string& s)
+{
+ mQuery = s;
+}
+
+const char * LLUriParser::fragment() const
+{
+ return mFragment.c_str();
+}
+
+void LLUriParser::fragment(const std::string& s)
+{
+ mFragment = s;
+}
+
+void LLUriParser::textRangeToString(UriTextRangeA& textRange, std::string& str)
+{
+ S32 len = textRange.afterLast - textRange.first;
+ if (len)
+ {
+ str = textRange.first;
+ str = str.substr(0, len);
+ }
+}
+
+void LLUriParser::extractParts()
+{
+ if (mTmpScheme)
+ {
+ mScheme.clear();
+ }
+ else
+ {
+ textRangeToString(mUri.scheme, mScheme);
+ }
+
+ textRangeToString(mUri.hostText, mHost);
+ textRangeToString(mUri.portText, mPort);
+ textRangeToString(mUri.query, mQuery);
+ textRangeToString(mUri.fragment, mFragment);
+
+ UriPathSegmentA * pathHead = mUri.pathHead;
+ while (pathHead)
+ {
+ std::string partOfPath;
+ textRangeToString(pathHead->text, partOfPath);
+
+ mPath += '/';
+ mPath += partOfPath;
+
+ pathHead = pathHead->next;
+ }
+}
+
+S32 LLUriParser::normalize()
+{
+ if (!mRes)
+ {
+ mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
+
+ if (!mRes)
+ {
+ S32 chars_required;
+ mRes = uriToStringCharsRequiredA(&mUri, &chars_required);
+
+ if (!mRes)
+ {
+ chars_required++;
+ std::vector<char> label_buf(chars_required);
+ mRes = uriToStringA(&label_buf[0], &mUri, chars_required, NULL);
+
+ if (!mRes)
+ {
+ mNormalizedUri = &label_buf[mTmpScheme ? 7 : 0];
+ }
+ }
+ }
+ }
+
+ return mRes;
+}
+
+void LLUriParser::glue(std::string& uri) const
+{
+ if (mScheme.size())
+ {
+ uri = mScheme;
+ uri += "://";
+ }
+
+ uri += mHost;
+
+ if (mPort.size())
+ {
+ uri += ':';
+ uri += mPort;
+ }
+
+ uri += mPath;
+
+ if (mQuery.size())
+ {
+ uri += '?';
+ uri += mQuery;
+
+ if (mFragment.size())
+ {
+ uri += '#';
+ uri += mFragment;
+ }
+ }
+}
+
+bool LLUriParser::test() const
+{
+ std::string uri;
+ glue(uri);
+
+ return uri == mNormalizedUri;
+}
+
+const char * LLUriParser::normalizedUri() const
+{
+ return mNormalizedUri.c_str();
+}
diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h
new file mode 100644
index 0000000000..719f916837
--- /dev/null
+++ b/indra/llcommon/lluriparser.h
@@ -0,0 +1,84 @@
+/**
+ * @file lluriparser.h
+ * @author Protey
+ * @date 20146-10-07
+ * @brief Declaration of the UriParser class.
+ *
+ * $LicenseInfo:firstyear=2014&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2014, 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_LLURIPARSER_H
+#define LL_LLURIPARSER_H
+
+#include <string>
+#include "uriparser/Uri.h"
+
+class LL_COMMON_API LLUriParser
+{
+public:
+ LLUriParser(const std::string& u);
+ virtual ~LLUriParser();
+
+ const char * scheme() const;
+ void sheme (const std::string& s);
+
+ const char * port() const;
+ void port (const std::string& s);
+
+ const char * host() const;
+ void host (const std::string& s);
+
+ const char * path() const;
+ void path (const std::string& s);
+
+ const char * query() const;
+ void query (const std::string& s);
+
+ const char * fragment() const;
+ void fragment (const std::string& s);
+
+ const char * normalizedUri() const;
+
+ void extractParts();
+ void glue(std::string& uri) const;
+ bool test() const;
+ S32 normalize();
+
+private:
+ S32 parse();
+ void textRangeToString(UriTextRangeA& textRange, std::string& str);
+ std::string mScheme;
+ std::string mHost;
+ std::string mPort;
+ std::string mPath;
+ std::string mQuery;
+ std::string mFragment;
+ std::string mNormalizedUri;
+
+ UriParserStateA mState;
+ UriUriA mUri;
+
+ S32 mRes;
+ bool mTmpScheme;
+};
+
+#endif // LL_LLURIPARSER_H
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index b19df0200d..aa8dd7697c 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -180,18 +180,18 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
domListOfUInts& idx = p->getValue();
domListOfFloats dummy ;
- domListOfFloats& v = pos_source ? pos_source->getFloat_array()->getValue() : dummy ;
- domListOfFloats& tc = tc_source ? tc_source->getFloat_array()->getValue() : dummy ;
- domListOfFloats& n = norm_source ? norm_source->getFloat_array()->getValue() : dummy ;
+ domListOfFloats& v = (pos_source && pos_source->getFloat_array()) ? pos_source->getFloat_array()->getValue() : dummy ;
+ domListOfFloats& tc = (tc_source && tc_source->getFloat_array()) ? tc_source->getFloat_array()->getValue() : dummy ;
+ domListOfFloats& n = (norm_source && norm_source->getFloat_array()) ? norm_source->getFloat_array()->getValue() : dummy ;
LLVolumeFace::VertexMapData::PointMap point_map;
U32 index_count = idx.getCount();
- U32 vertex_count = pos_source ? v.getCount() : 0;
- U32 tc_count = tc_source ? tc.getCount() : 0;
- U32 norm_count = norm_source ? n.getCount() : 0;
+ U32 vertex_count = (pos_source && pos_source->getFloat_array()) ? v.getCount() : 0;
+ U32 tc_count = (tc_source && tc_source->getFloat_array()) ? tc.getCount() : 0;
+ U32 norm_count = (norm_source && norm_source->getFloat_array()) ? n.getCount(): 0;
- if ((vertex_count == 0) || (tc_count == 0))
+ if ((vertex_count == 0))
{
LL_WARNS() << "Unable to process mesh with empty position array; invalid model." << LL_ENDL;
return LLModel::BAD_ELEMENT;
@@ -229,7 +229,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
{
// guard against model data specifiying out of range indices or tcs
//
-
+
if (((i + tc_offset) > index_count)
|| ((idx[i+tc_offset]*2+1) > tc_count))
{
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 24fdc2268d..52738aeb6f 100755
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -12,7 +12,6 @@ include(LLRender)
include(LLWindow)
include(LLVFS)
include(LLXML)
-include(URIPARSER)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -29,7 +28,6 @@ include_directories(
include_directories(SYSTEM
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
${LLXML_SYSTEM_INCLUDE_DIRS}
- ${URIPARSER_INCLUDE_DIRS}
)
set(llui_SOURCE_FILES
@@ -280,7 +278,6 @@ target_link_libraries(llui
${LLXML_LIBRARIES}
${LLMATH_LIBRARIES}
${HUNSPELL_LIBRARY}
- ${URIPARSER_LIBRARIES}
${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender
)
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index fee271b943..09f923e74f 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -38,6 +38,7 @@
#include "lltextutil.h"
#include "lltooltip.h"
#include "lluictrl.h"
+#include "lluriparser.h"
#include "llurlaction.h"
#include "llurlregistry.h"
#include "llview.h"
@@ -2061,11 +2062,9 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
// add icon before url if need
LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted());
- std::string label = match.getLabel();
- LLTextUtil::normalizeUri(label);
-
// output the styled Url
- appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
+ //appendAndHighlightTextImpl(label, part, link_params, match.underlineOnHoverOnly());
+ appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly());
// set the tooltip for the Url label
if (! match.getTooltip().empty())
diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp
index b67daf427b..fff04b34f2 100755
--- a/indra/llui/lltextutil.cpp
+++ b/indra/llui/lltextutil.cpp
@@ -30,8 +30,6 @@
#include "lltextbox.h"
#include "llurlmatch.h"
-#include "uriparser/Uri.h"
-
boost::function<bool(LLUrlMatch*,LLTextBase*)> LLTextUtil::TextHelpers::iconCallbackCreationFunction = 0;
void LLTextUtil::textboxSetHighlightedVal(LLTextBox *txtbox, const LLStyle::Params& normal_style, const std::string& text, const std::string& hl)
@@ -106,93 +104,4 @@ bool LLTextUtil::processUrlMatch(LLUrlMatch* match,LLTextBase* text_base, bool i
return false;
}
-static void textRangeToString(UriTextRangeA& textRange, std::string& str)
-{
- S32 len = textRange.afterLast - textRange.first;
- if (len)
- {
- str = textRange.first;
- str = str.substr(0, len);
- }
-}
-
-S32 LLTextUtil::normalizeUri(std::string& uri_string, Uri * urip/* = NULL*/)
-{
- UriParserStateA state;
- UriUriA uri;
- state.uri = &uri;
-
- S32 res = uriParseUriA(&state, uri_string.c_str());
-
- if (!res)
- {
- S32 len = uri.scheme.afterLast - uri.scheme.first;
-
- if (len > 0)
- {
- res = uriNormalizeSyntaxExA(&uri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
-
- if (!res)
- {
- S32 chars_required;
- res = uriToStringCharsRequiredA(&uri, &chars_required);
-
- if (!res)
- {
- chars_required++;
- std::vector<char> label_buf(chars_required);
- res = uriToStringA(&label_buf[0], &uri, chars_required, NULL);
-
- if (!res)
- {
- uri_string = &label_buf[0];
- }
- }
- }
-
- // fill urip if requested
- if (urip)
- {
- textRangeToString(uri.scheme, urip->scheme);
- textRangeToString(uri.hostText, urip->host);
- textRangeToString(uri.portText, urip->port);
- textRangeToString(uri.query, urip->query);
- textRangeToString(uri.fragment, urip->fragment);
-
- UriPathSegmentA * pathHead = uri.pathHead;
- while (pathHead)
- {
- std::string partOfPath;
- textRangeToString(pathHead->text, partOfPath);
-
- urip->path += '/';
- urip->path += partOfPath;
-
- pathHead = pathHead->next;
- }
- }
- }
- else if (uri_string.find_first_of('.') != std::string::npos)
- {
- static bool recursive_call = false;
-
- // allow only single level recursive call
- if (!recursive_call)
- {
- recursive_call = true;
-
- // force uri to be with scheme and try to normalize
- std::string uri_with_scheme = "http://";
- uri_with_scheme += uri_string;
- normalizeUri(uri_with_scheme, urip);
- uri_string = uri_with_scheme.substr(7);
- recursive_call = false;
- }
- }
- }
-
- uriFreeUriMembersA(&uri);
- return res;
-}
-
// EOF
diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h
index 176b4ba071..1be81ffd62 100755
--- a/indra/llui/lltextutil.h
+++ b/indra/llui/lltextutil.h
@@ -74,25 +74,6 @@ namespace LLTextUtil
*/
bool processUrlMatch(LLUrlMatch* match, LLTextBase* text_base, bool is_content_trusted);
- typedef struct
- {
- std::string scheme;
- std::string host;
- std::string port;
- std::string path;
- std::string query;
- std::string fragment;
- } Uri;
-
- /**
- * Translates uri's host name and scheme to lowercase
- *
- * @param[in, out] uri_string string with original uri
- * @param[out] uri receives parts of uri
- * @return 0 on success, error code otherwise
- */
- S32 normalizeUri(std::string& uri_string, Uri * uri = NULL);
-
class TextHelpers
{
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 3ebf06eefa..c06d6144b9 100755
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -31,14 +31,16 @@
#include "lluri.h"
#include "llurlmatch.h"
#include "llurlregistry.h"
+#include "lluriparser.h"
#include "llavatarnamecache.h"
#include "llcachename.h"
#include "lltrans.h"
-#include "lltextutil.h"
#include "lluicolortable.h"
#include "message.h"
+#include "uriparser/Uri.h"
+
#define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))"
// Utility functions
@@ -346,8 +348,8 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const
// LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link
//
LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL()
-{
- mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com\\S*",
+{
+ mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?(/\\S*)?\\b",
boost::regex::perl|boost::regex::icase);
mIcon = "Hand";
@@ -356,19 +358,14 @@ LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL()
std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
{
- std::string local_url(url);
-
- LLTextUtil::Uri uri;
- LLTextUtil::normalizeUri(local_url, &uri);
-
- return uri.host;
+ LLUriParser up(url);
+ up.extractParts();
+ return up.host();
}
std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const
{
- std::string local_url(url);
- LLTextUtil::normalizeUri(local_url);
- return local_url;
+ return url;
}
//
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index f75d773803..1cb11cdb1c 100755
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -176,9 +176,9 @@ class LLUrlEntrySeconlifeURL : public LLUrlEntryBase
{
public:
LLUrlEntrySeconlifeURL();
- virtual bool isTrusted() const { return true; }
- virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
- virtual std::string getTooltip(const std::string &url) const;
+ bool isTrusted() const { return true; }
+ /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getTooltip(const std::string &url) const;
private:
std::string mLabel;
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 462b3d6979..9e8d8d01f1 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llurlregistry.h"
+#include "lluriparser.h"
#include <boost/regex.hpp>
@@ -207,6 +208,11 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
{
// fill in the LLUrlMatch object and return it
std::string url = text.substr(match_start, match_end - match_start + 1);
+
+ LLUriParser up(url);
+ up.normalize();
+ url = up.normalizedUri();
+
match.setValues(match_start, match_end,
match_entry->getUrl(url),
match_entry->getLabel(url, cb),
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index f3a48625a4..fadbf78ca5 100755
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -39,8 +39,8 @@
#include "llrendersphere.h"
#include "llselectmgr.h"
#include "llglheaders.h"
-
-
+#include "llfontgl.h"
+#include "llhudrender.h"
#include "llxmltree.h"
@@ -497,14 +497,15 @@ void LLHUDEffectLookAt::render()
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLVector3 target = mTargetPos + ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->mHeadp->getWorldPosition();
+ LLVOAvatar* source_avatar = ((LLVOAvatar*)(LLViewerObject*)mSourceObject);
+ LLVector3 target = mTargetPos + source_avatar->mHeadp->getWorldPosition();
gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
gGL.translatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
gGL.scalef(0.3f, 0.3f, 0.3f);
+ LLColor3 color = (*mAttentions)[mTargetType].mColor;
gGL.begin(LLRender::LINES);
{
- LLColor3 color = (*mAttentions)[mTargetType].mColor;
gGL.color3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]);
gGL.vertex3f(-1.f, 0.f, 0.f);
gGL.vertex3f(1.f, 0.f, 0.f);
@@ -516,6 +517,17 @@ void LLHUDEffectLookAt::render()
gGL.vertex3f(0.f, 0.f, 1.f);
} gGL.end();
gGL.popMatrix();
+
+
+ if(!source_avatar->isSelf())
+ {
+ std::string av_name = source_avatar->getFullname();
+ const LLFontGL* big_fontp = LLFontGL::getFontSansSerif();
+ gGL.pushMatrix();
+ hud_render_utf8text(av_name,target+LLVector3(0.f,0.f,0.4f),*big_fontp,LLFontGL::NORMAL,LLFontGL::DROP_SHADOW_SOFT,-0.5*big_fontp->getWidthF32(av_name),3.f,color,FALSE);
+ gGL.popMatrix();
+ }
+
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3cc4858226..ecf5cc2886 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7021,10 +7021,6 @@ void handle_selected_texture_info(void*)
std::string msg;
msg.assign("Texture info for: ");
msg.append(node->mName);
-
- LLSD args;
- args["MESSAGE"] = msg;
- LLNotificationsUtil::add("SystemMessage", args);
U8 te_count = node->getObject()->getNumTEs();
// map from texture ID to list of faces using it
@@ -7048,10 +7044,10 @@ void handle_selected_texture_info(void*)
S32 height = img->getHeight();
S32 width = img->getWidth();
S32 components = img->getComponents();
- msg = llformat("%dx%d %s on face ",
+ msg.append(llformat("\n%dx%d %s on face ",
width,
height,
- (components == 4 ? "alpha" : "opaque"));
+ (components == 4 ? "alpha" : "opaque")));
for (U8 i = 0; i < it->second.size(); ++i)
{
msg.append( llformat("%d ", (S32)(it->second[i])));