diff options
| author | Lynx Linden <lynx@lindenlab.com> | 2009-12-21 15:49:52 +0000 | 
|---|---|---|
| committer | Lynx Linden <lynx@lindenlab.com> | 2009-12-21 15:49:52 +0000 | 
| commit | bf7494017f5d90624243e5069dea9342c6b1869c (patch) | |
| tree | f81a823c2cb344f95d06cba115c93677ffde7dc8 /indra/newview | |
| parent | d1eb2948f8a65e6f7631d836b2367ebe435e1efa (diff) | |
EXT-3486: Support SLapps and URLs in the nav bar.
If the user enters a string into the navigation bar that is not
recognized as an SL location, the behavior is now:
- handle any secondlife:// SLapps, or
- open any http: or https: URLs in the media browser, or
- otherwise, send the text to the search floater
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llnavigationbar.cpp | 18 | 
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 6210151d1b..71dc0f9011 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -51,6 +51,8 @@  #include "llsidetray.h"  #include "llslurl.h"  #include "llurlsimstring.h" +#include "llurlregistry.h" +#include "llurldispatcher.h"  #include "llviewerinventory.h"  #include "llviewermenu.h"  #include "llviewerparcelmgr.h" @@ -58,6 +60,7 @@  #include "llappviewer.h"  #include "llviewercontrol.h"  #include "llfloatermediabrowser.h" +#include "llweb.h"  #include "llinventorymodel.h"  #include "lllandmarkactions.h" @@ -543,7 +546,20 @@ void LLNavigationBar::onRegionNameResponse(  	// Invalid location?  	if (!region_handle)  	{ -		invokeSearch(typed_location); +		// handle any secondlife:// SLapps, or +		// display http:// URLs in the media browser, or +		// anything else is sent to the search floater +		if (LLUrlRegistry::instance().isUrl(typed_location)) +		{ +			if (! LLURLDispatcher::dispatchFromTextEditor(typed_location)) +			{ +				LLWeb::loadURL(typed_location); +			} +		} +		else +		{ +			invokeSearch(typed_location); +		}  		return;  	}  | 
