diff options
author | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:54 -0500 |
commit | b2afb8800bb033a04bb3ecdf0363068d56648ef1 (patch) | |
tree | 3568129b5bbddb47cd39d622b4137a8fbff4abaf /linden/indra/newview/llfloatermap.cpp | |
parent | Second Life viewer sources 1.14.0.1 (diff) | |
download | meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.zip meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.gz meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.bz2 meta-impy-b2afb8800bb033a04bb3ecdf0363068d56648ef1.tar.xz |
Second Life viewer sources 1.15.0.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloatermap.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 2d549db..97d0041 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -216,3 +217,47 @@ void LLFloaterMap::toggle(void*) | |||
216 | } | 217 | } |
217 | } | 218 | } |
218 | } | 219 | } |
220 | |||
221 | |||
222 | BOOL process_secondlife_url(LLString url) | ||
223 | { | ||
224 | S32 strpos, strpos2; | ||
225 | |||
226 | LLString slurlID = "slurl.com/secondlife/"; | ||
227 | strpos = url.find(slurlID); | ||
228 | |||
229 | if (strpos < 0) | ||
230 | { | ||
231 | slurlID="secondlife://"; | ||
232 | strpos = url.find(slurlID); | ||
233 | } | ||
234 | |||
235 | if (strpos >= 0) | ||
236 | { | ||
237 | LLString simname; | ||
238 | |||
239 | strpos+=slurlID.length(); | ||
240 | strpos2=url.find("/",strpos); | ||
241 | if (strpos2 < strpos) strpos2=url.length(); | ||
242 | simname="secondlife://" + url.substr(strpos,url.length() - strpos); | ||
243 | |||
244 | LLURLSimString::setString( simname ); | ||
245 | LLURLSimString::parse(); | ||
246 | |||
247 | // if there is a world map | ||
248 | if ( gFloaterWorldMap ) | ||
249 | { | ||
250 | // mark where the destination is | ||
251 | gFloaterWorldMap->trackURL( LLURLSimString::sInstance.mSimName.c_str(), | ||
252 | LLURLSimString::sInstance.mX, | ||
253 | LLURLSimString::sInstance.mY, | ||
254 | LLURLSimString::sInstance.mZ ); | ||
255 | |||
256 | // display map | ||
257 | LLFloaterWorldMap::show( NULL, TRUE ); | ||
258 | }; | ||
259 | |||
260 | return TRUE; | ||
261 | } | ||
262 | return FALSE; | ||
263 | } | ||