diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp index 40c4c8a15..83b17125d 100644 --- a/indra/newview/lfsimfeaturehandler.cpp +++ b/indra/newview/lfsimfeaturehandler.cpp @@ -84,6 +84,11 @@ void LFSimFeatureHandler::setSupportedFeatures() has_feature_or_default(mDestinationGuideURL, extras, "destination-guide-url"); mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : ""; has_feature_or_default(mSearchURL, extras, "search-server-url"); + if (extras.has("GridName")) + { + const std::string& grid_name(extras["GridName"]); + mGridName = gHippoGridManager->getConnectedGrid()->getGridName() != grid_name ? grid_name : ""; + } } has_feature_or_default(mSayRange, extras, "say-range"); has_feature_or_default(mShoutRange, extras, "shout-range"); @@ -97,6 +102,7 @@ void LFSimFeatureHandler::setSupportedFeatures() mDestinationGuideURL.reset(); mMapServerURL = ""; mSearchURL.reset(); + mGridName.reset(); } mSayRange.reset(); mShoutRange.reset(); diff --git a/indra/newview/lfsimfeaturehandler.h b/indra/newview/lfsimfeaturehandler.h index 72b75a9c2..893edb5a0 100644 --- a/indra/newview/lfsimfeaturehandler.h +++ b/indra/newview/lfsimfeaturehandler.h @@ -41,6 +41,7 @@ public: return *this; } operator Type() const { return mValue; } + const Type& ref() const { return mValue; } void reset() { *this = mDefaultValue; } const Type& getDefault() const { return mDefaultValue; } @@ -73,6 +74,7 @@ public: std::string destinationGuideURL() const { return mDestinationGuideURL; } std::string mapServerURL() const { return mMapServerURL; } std::string searchURL() const { return mSearchURL; } + const std::string& gridName() const { return mGridName.ref(); } U32 sayRange() const { return mSayRange; } U32 shoutRange() const { return mShoutRange; } U32 whisperRange() const { return mWhisperRange; } @@ -84,6 +86,7 @@ private: SignaledType mDestinationGuideURL; std::string mMapServerURL; SignaledType mSearchURL; + SignaledType mGridName; SignaledType mSayRange; SignaledType mShoutRange; SignaledType mWhisperRange; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b36de1028..2d76ba707 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -92,6 +92,7 @@ #include #include "hippogridmanager.h" +#include "lfsimfeaturehandler.h" // [RLVa:KB] #include "rlvactions.h" @@ -541,7 +542,10 @@ void LLStatusBar::refresh() // [/RLVa:KB] if (!LLAgentUI::buildLocationString(location_name, LLAgentUI::LOCATION_FORMAT_FULL)) location_name = "???"; + else { + const std::string& grid(LFSimFeatureHandler::instance().gridName()); + if (!grid.empty()) location_name += ", " + grid; } static const LLCachedControl show_channel("ShowSimChannel");