diff options
author | Richard Linden <none@none> | 2011-03-03 19:52:21 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2011-03-03 19:52:21 -0800 |
commit | 5e0b45ad6cac39476f78ffa8d486f06eee53797b (patch) | |
tree | 4c30112e58ecf83e230f7f1babd22e37ae5857e3 | |
parent | 0d9fa286b87c41c4be75c3011f35cb86145d8def (diff) |
SOCIAL-629 FIX Search Floater accessible from typing a search term in location bar
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/app_settings/settings_minimal.xml | 11 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 19 |
3 files changed, 32 insertions, 9 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a2459890a1..3dedf0ddd7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12476,5 +12476,16 @@ <key>Value</key> <integer>1</integer> </map> + <key>SearchFromAddressBar</key> + <map> + <key>Comment</key> + <string>Can enter search queries into navigation address bar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index d505d59ec9..73c865bc9f 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -292,5 +292,16 @@ <key>Value</key> <integer>0</integer> </map> + <key>SearchFromAddressBar</key> + <map> + <key>Comment</key> + <string>Can enter search queries into navigation address bar</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e4f83ce6b9..3b160ddc8e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -636,18 +636,19 @@ void LLNavigationBar::onRegionNameResponse( U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) { // Invalid location? - if (!region_handle) + if (region_handle) + { + // Teleport to the location. + LLVector3d region_pos = from_region_handle(region_handle); + LLVector3d global_pos = region_pos + (LLVector3d) local_coords; + + llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; + gAgent.teleportViaLocation(global_pos); + } + else if (gSavedSettings.getBOOL("SearchFromAddressBar")) { invokeSearch(typed_location); - return; } - - // Teleport to the location. - LLVector3d region_pos = from_region_handle(region_handle); - LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - - llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; - gAgent.teleportViaLocation(global_pos); } void LLNavigationBar::showTeleportHistoryMenu(LLUICtrl* btn_ctrl) |