diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-01-09 12:10:32 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-01-09 12:10:32 +0200 |
commit | bf5145422384386cdb31429ad01d79f7719161a5 (patch) | |
tree | 3a2d3c2406a053f7dee41562442b27c3c8a1702b /indra/llui | |
parent | 21c61014453042247d83b22024ed6d4b7e22635c (diff) |
MAINT-4169 FIXED grey out all but domain name in SL-links, same as it's done for non-Linden URLs
Diffstat (limited to 'indra/llui')
-rwxr-xr-x | indra/llui/lltextbase.cpp | 2 | ||||
-rwxr-xr-x | indra/llui/llurlentry.cpp | 12 | ||||
-rwxr-xr-x | indra/llui/llurlentry.h | 1 |
3 files changed, 8 insertions, 7 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 38abb0ffb1..3193300ebb 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2065,7 +2065,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // output the styled Url appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); - // show query part of url with gray color if enabled in global settings in "HTTPNoProtocolShowGreyQuery" + // show query part of url with gray color if enabled in global settings in "ShowGreyQueryInUrls" // and only for LLUrlEntryHTTP and LLUrlEntryHTTPNoProtocol url entries std::string label = match.getQuery(); if (label.size()) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index adf010cd5d..acc8fdacfb 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -49,7 +49,7 @@ std::string localize_slapp_label(const std::string& url, const std::string& full LLUrlEntryBase::LLUrlEntryBase() { - mGreyQuery = LLUI::sSettingGroups["config"]->getBOOL("HTTPNoProtocolShowGreyQuery"); + mGreyQuery = LLUI::sSettingGroups["config"]->getBOOL("ShowGreyQueryInUrls"); } LLUrlEntryBase::~LLUrlEntryBase() @@ -503,12 +503,12 @@ LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL() std::string LLUrlEntrySecondlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - LLUriParser up(url); - up.extractParts(); + return urlToLabelWithGreyQuery(url); +} - std::string label; - up.glueFirst(label); - return label; +std::string LLUrlEntrySecondlifeURL::getQuery(const std::string &url) const +{ + return urlToGreyQuery(url); } std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 1e82adcd94..57e374f5bd 100755 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -202,6 +202,7 @@ public: LLUrlEntrySecondlifeURL(); bool isTrusted() const { return true; } /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getQuery(const std::string &url) const; /*virtual*/ std::string getTooltip(const std::string &url) const; /*virtual*/ std::string getUrl(const std::string &string) const; }; |