summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-02-07 14:25:59 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-02-07 14:25:59 -0800
commit90c174d87667b2fc106d8d88a063f9ecf8aaff8d (patch)
tree5a432b0edea7abfdaa111def52a0eb6e70484214
parentfa46459cdb6d63fea6a76d8c11eee5503edf5bb1 (diff)
Adding functionality to better handle the cause where the capability service does not exist to the linksets floater.
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp9
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h3
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml1
3 files changed, 11 insertions, 2 deletions
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 @@
<floater.string name="linksets_messaging_modify_error">Error detected while modifying for pathfinding linksets</floater.string>
<floater.string name="linksets_messaging_complete_none_found">No pathfinding linksets</floater.string>
<floater.string name="linksets_messaging_complete_available">[NUM_SELECTED] linksets selected out of [NUM_TOTAL]</floater.string>
+ <floater.string name="linksets_messaging_service_not_available">Required capability is not available in current region</floater.string>
<floater.string name="linkset_path_state_walkable">Walkable</floater.string>
<floater.string name="linkset_path_state_obstacle">Obstacle</floater.string>
<floater.string name="linkset_path_state_ignored">Ignored</floater.string>