SOCIAL-629 FIX Search Floater accessible from typing a search term in location bar

master
Richard Linden 2011-03-03 19:52:21 -08:00
parent 0d9fa286b8
commit 5e0b45ad6c
3 changed files with 32 additions and 9 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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)