diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-07-29 19:06:13 +0300 | 
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-07-29 19:06:13 +0300 | 
| commit | 8178e51a743f43600798f1251231908025dd11d7 (patch) | |
| tree | 7cb2380de3ad6f6c7551fadc1b6889eca37399ce /indra/llui | |
| parent | 3e85f6a8c9d34c64ab19af03015efcd8d4c93f80 (diff) | |
SL-15690 FIXED Wrong URI determination
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llurlentry.cpp | 18 | ||||
| -rw-r--r-- | indra/llui/llurlentry.h | 11 | ||||
| -rw-r--r-- | indra/llui/llurlregistry.cpp | 2 | 
3 files changed, 30 insertions, 1 deletions
| diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index e43c52c0c2..2d526df7a5 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -976,6 +976,24 @@ std::string LLUrlEntryObjectIM::getLocation(const std::string &url) const  	return LLUrlEntryBase::getLocation(url);  } +// +// LLUrlEntryChat Describes a Second Life chat Url, e.g., +// secondlife:///app/chat/42/This%20Is%20a%20test +// + +LLUrlEntryChat::LLUrlEntryChat() +{ +    mPattern = boost::regex("secondlife:///app/chat/\\d+/\\S+", +        boost::regex::perl|boost::regex::icase); +    mMenuName = "menu_url_slapp.xml"; +    mTooltip = LLTrans::getString("TooltipSLAPP"); +} + +std::string LLUrlEntryChat::getLabel(const std::string &url, const LLUrlLabelCallback &cb) +{ +    return unescapeUrl(url); +} +  // LLUrlEntryParcel statics.  LLUUID	LLUrlEntryParcel::sAgentID(LLUUID::null);  LLUUID	LLUrlEntryParcel::sSessionID(LLUUID::null); diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 4af1ab5096..21206b5852 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -370,6 +370,17 @@ public:  private:  }; +// +// LLUrlEntryChat Describes a Second Life chat Url, e.g., +// secondlife:///app/chat/42/This%20Is%20a%20test +// +class LLUrlEntryChat : public LLUrlEntryBase +{ +public: +    LLUrlEntryChat(); +    /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); +}; +  ///  /// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,  /// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 321a0ec5b9..732691b4a5 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -63,6 +63,7 @@ LLUrlRegistry::LLUrlRegistry()  	// LLUrlEntryAgent*Name must appear before LLUrlEntryAgent since   	// LLUrlEntryAgent is a less specific (catchall for agent urls)  	registerUrl(new LLUrlEntryAgent()); +    registerUrl(new LLUrlEntryChat());  	registerUrl(new LLUrlEntryGroup());  	registerUrl(new LLUrlEntryParcel());  	registerUrl(new LLUrlEntryTeleport()); @@ -71,7 +72,6 @@ LLUrlRegistry::LLUrlRegistry()  	registerUrl(new LLUrlEntryObjectIM());  	registerUrl(new LLUrlEntryPlace());  	registerUrl(new LLUrlEntryInventory()); -	registerUrl(new LLUrlEntryObjectIM());      registerUrl(new LLUrlEntryExperienceProfile());  	//LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,   	//so it should be registered in the end of list | 
