From 90c174d87667b2fc106d8d88a063f9ecf8aaff8d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 7 Feb 2012 14:25:59 -0800 Subject: Adding functionality to better handle the cause where the capability service does not exist to the linksets floater. --- indra/newview/llfloaterpathfindinglinksets.cpp | 9 ++++++++- indra/newview/llfloaterpathfindinglinksets.h | 3 ++- .../skins/default/xui/en/floater_pathfinding_linksets.xml | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 4d3581fc60..5c7f288226 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -285,7 +285,7 @@ void LLFloaterPathfindingLinksets::sendNavMeshDataGetRequest() std::string navMeshDataURL = getCapabilityURL(); if (navMeshDataURL.empty()) { - setMessagingState(kMessagingComplete); + setMessagingState(kMessagingServiceNotAvailable); llwarns << "cannot query object navmesh properties from current region '" << getRegionName() << "'" << llendl; } else @@ -300,13 +300,16 @@ void LLFloaterPathfindingLinksets::sendNavMeshDataPutRequest(const LLSD& pPostDa { if (!isMessagingInProgress()) { + setMessagingState(kMessagingModifyStarting); std::string navMeshDataURL = getCapabilityURL(); if (navMeshDataURL.empty()) { + setMessagingState(kMessagingServiceNotAvailable); llwarns << "cannot put object navmesh properties for current region '" << getRegionName() << "'" << llendl; } else { + setMessagingState(kMessagingModifyRequestSent); LLHTTPClient::put(navMeshDataURL, pPostData, new NavMeshDataPutResponder(navMeshDataURL, mSelfHandle)); } } @@ -602,6 +605,10 @@ void LLFloaterPathfindingLinksets::updateLinksetsStatusMessage() statusText = getString("linksets_messaging_complete_available", string_args); } break; + case kMessagingServiceNotAvailable : + statusText = getString("linksets_messaging_service_not_available"); + styleParams.color = warningColor; + break; default: statusText = getString("linksets_messaging_initial"); llassert(0); diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index 250625c72a..ce266b1706 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -62,7 +62,8 @@ public: kMessagingModifyRequestSent, kMessagingModifyReceived, kMessagingModifyError, - kMessagingComplete + kMessagingComplete, + kMessagingServiceNotAvailable } EMessagingState; virtual BOOL postBuild(); diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index 9aea89ece7..ec720b55ca 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -26,6 +26,7 @@ Error detected while modifying for pathfinding linksets No pathfinding linksets [NUM_SELECTED] linksets selected out of [NUM_TOTAL] + Required capability is not available in current region Walkable Obstacle Ignored -- cgit v1.2.3