diff options
author | McCabe Maxsted | 2010-08-10 15:06:04 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-08-10 15:06:04 -0700 |
commit | 463ccc12fa763f70c5392b89a2ec6cd9d68c40a9 (patch) | |
tree | e722266dea733690b7fa759754059161fb77cf2b /linden/indra/newview/llurldispatcher.cpp | |
parent | Added meta7windlight.h file to CMake (diff) | |
download | meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.zip meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.gz meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.bz2 meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.xz |
Applied patch for SNOW-636: parse links to maps.secondlife.com in chat as slurls (viewer2 slurl format)
Diffstat (limited to 'linden/indra/newview/llurldispatcher.cpp')
-rw-r--r-- | linden/indra/newview/llurldispatcher.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/linden/indra/newview/llurldispatcher.cpp b/linden/indra/newview/llurldispatcher.cpp index 7c50bd4..f9b6b39 100644 --- a/linden/indra/newview/llurldispatcher.cpp +++ b/linden/indra/newview/llurldispatcher.cpp | |||
@@ -53,6 +53,7 @@ const std::string SLURL_SL_HELP_PREFIX = "secondlife://app."; | |||
53 | const std::string SLURL_SL_PREFIX = "sl://"; | 53 | const std::string SLURL_SL_PREFIX = "sl://"; |
54 | const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; | 54 | const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; |
55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; | 55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; |
56 | const std::string SLURL_SLURL_ALT_PREFIX = "http://maps.secondlife.com/secondlife/"; | ||
56 | 57 | ||
57 | const std::string SLURL_APP_TOKEN = "app/"; | 58 | const std::string SLURL_APP_TOKEN = "app/"; |
58 | 59 | ||
@@ -117,6 +118,7 @@ bool LLURLDispatcherImpl::isSLURL(const std::string& url) | |||
117 | if (matchPrefix(url, SLURL_SL_PREFIX)) return true; | 118 | if (matchPrefix(url, SLURL_SL_PREFIX)) return true; |
118 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; | 119 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; |
119 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; | 120 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; |
121 | if (matchPrefix(url, SLURL_SLURL_ALT_PREFIX)) return true; | ||
120 | return false; | 122 | return false; |
121 | } | 123 | } |
122 | 124 | ||
@@ -125,7 +127,8 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url) | |||
125 | { | 127 | { |
126 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) | 128 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) |
127 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) | 129 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) |
128 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) ) | 130 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) |
131 | || matchPrefix(url, SLURL_SLURL_ALT_PREFIX + SLURL_APP_TOKEN)) | ||
129 | { | 132 | { |
130 | return true; | 133 | return true; |
131 | } | 134 | } |
@@ -364,6 +367,10 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url) | |||
364 | { | 367 | { |
365 | stripped.erase(0, SLURL_SLURL_PREFIX.length()); | 368 | stripped.erase(0, SLURL_SLURL_PREFIX.length()); |
366 | } | 369 | } |
370 | else if (matchPrefix(stripped, SLURL_SLURL_ALT_PREFIX)) | ||
371 | { | ||
372 | stripped.erase(0, SLURL_SLURL_ALT_PREFIX.length()); | ||
373 | } | ||
367 | return stripped; | 374 | return stripped; |
368 | } | 375 | } |
369 | 376 | ||