From 078612e292fa8b66a8b7a68b7e1fe9b5049c3deb Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 14 Jul 2015 04:39:20 +0300 Subject: MAINT-5019 FIXED Additional cases --- indra/newview/skins/default/xui/en/strings.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/skins/default/xui/en/strings.xml') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 5e58360158..8c58ebc359 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -271,6 +271,7 @@ Please try logging in again in a minute. Click to view this location on a map Click to run the secondlife:// command + Click to compose an email Teleport to -- cgit v1.3 From 4ab4c6da02948521dc1c36ca581bb8e225d4e454 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 10 Aug 2015 11:15:50 +0300 Subject: MAINT-5463 FIXED Add hovertext to the official link badge in chat/IM, etc. --- indra/llui/lltextbase.cpp | 47 ++++++++++++++++++-------- indra/llui/lltextbase.h | 8 +++++ indra/newview/skins/default/xui/en/strings.xml | 1 + 3 files changed, 42 insertions(+), 14 deletions(-) (limited to 'indra/newview/skins/default/xui/en/strings.xml') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 031db31729..bf660849c4 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -37,6 +37,7 @@ #include "lltextparser.h" #include "lltextutil.h" #include "lltooltip.h" +#include "lltrans.h" #include "lluictrl.h" #include "llurlaction.h" #include "llurlregistry.h" @@ -2060,6 +2061,10 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // add icon before url if need LLTextUtil::processUrlMatch(&match, this, isContentTrusted() || match.isTrusted()); + if ((isContentTrusted() || match.isTrusted()) && !match.getIcon().empty() ) + { + setLastSegmentToolTip(LLTrans::getString("TooltipSLIcon")); + } // output the styled Url appendAndHighlightTextImpl(match.getLabel(), part, link_params, match.underlineOnHoverOnly()); @@ -2068,16 +2073,9 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // set the tooltip for the Url label if (tooltip_required) { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) - { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); - } + setLastSegmentToolTip(match.getTooltip()); } - - // show query part of url with gray color only for LLUrlEntryHTTP url entries std::string label = match.getQuery(); if (label.size()) @@ -2089,12 +2087,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // set the tooltip for the query part of url if (tooltip_required) { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) - { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); - } + setLastSegmentToolTip(match.getTooltip()); } } @@ -2121,6 +2114,16 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para } } +void LLTextBase::setLastSegmentToolTip(const std::string &tooltip) +{ + segment_set_t::iterator it = getSegIterContaining(getLength()-1); + if (it != mSegments.end()) + { + LLTextSegmentPtr segment = *it; + segment->setToolTip(tooltip); + } +} + static LLTrace::BlockTimerStatHandle FTM_APPEND_TEXT("Append Text"); void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params) @@ -3571,6 +3574,22 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin return 0; } +BOOL LLImageTextSegment::handleToolTip(S32 x, S32 y, MASK mask) +{ + if (!mTooltip.empty()) + { + LLToolTipMgr::instance().show(mTooltip); + return TRUE; + } + + return FALSE; +} + +void LLImageTextSegment::setToolTip(const std::string& tooltip) +{ + mTooltip = tooltip; +} + F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { if ( (start >= 0) && (end <= mEnd - mStart)) diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index dfc10923f3..87809aa8fb 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -241,9 +241,15 @@ public: S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect); + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); + /*virtual*/ void setToolTip(const std::string& tooltip); + private: class LLTextBase& mEditor; LLStyleConstSP mStyle; + +protected: + std::string mTooltip; }; typedef LLPointer LLTextSegmentPtr; @@ -392,6 +398,8 @@ public: const std::string& getLabel() { return mLabel.getString(); } const LLWString& getWlabel() { return mLabel.getWString();} + void setLastSegmentToolTip(const std::string &tooltip); + /** * If label is set, draws text label (which is LLLabelTextSegment) * that is visible when no user text provided diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 32bd82baff..4eb6e2462d 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -238,6 +238,7 @@ Please try logging in again in a minute. Only a single item can be dragged here You can't wear a folder containing more than [AMOUNT] items. You can change this limit in Advanced > Show Debug Settings > WearFolderLimit. + This links to a page on the official SecondLife.com or LindenLab.com domain. You can't rez items from the Marketplace Listings folder You can't put items you are wearing in the Marketplace Listings folder -- cgit v1.3 From 0bbb17226cc7e6d86c61d8e1cc34291343282d1f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 18 Aug 2015 21:51:04 +0300 Subject: Clearing out duplicated strings --- indra/newview/skins/default/xui/en/strings.xml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/skins/default/xui/en/strings.xml') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index bc91028f3b..4eb6e2462d 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2320,22 +2320,6 @@ This feature is currently in Beta. Please add your name to this [http://goo.gl/f : Warning: version folder must contain at least 1 item : Warning: stock folder must contain at least 1 item - - stock folder must be contained by a version folder - : Error: all items in a stock folder must be no-copy and of the same type - : Error: stock folder cannot contain subfolders - : Warning: folder doesn't contain any items - : Warning: creating stock folder - : Warning: creating version folder - : Warning : moving items - : Warning: folder content transfered to stock folder, removing empty folder - : Error: no-copy items must be contained by a stock folder - : Warning: items must be contained by a version folder - : Error: - : Warning: - : Warning: version folder must contain at least 1 item - : Warning: stock folder must contain at least 1 item - No errors or warnings to report No errors Error: -- cgit v1.3