From 850fe0bc544aa05b51632ffc00cca8913fda6da3 Mon Sep 17 00:00:00 2001 From: Kitty Barnett <develop@catznip.com> Date: Mon, 24 Feb 2014 20:08:34 +0100 Subject: [PATCH] - fixed : region name and global coordinates are shown on the About floater when @showloc restricted --HG-- branch : RLVa --- indra/newview/llfloaterabout.cpp | 18 +++++++++++++----- indra/newview/rlvactions.cpp | 6 ++++++ indra/newview/rlvactions.h | 5 +++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index f95cfa7acb..fa2c6c37e2 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -45,8 +45,9 @@ #include "llviewerregion.h" #include "llversioninfo.h" #include "llweb.h" -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0a) -#include "rlvhandler.h" +// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0) +#include "rlvactions.h" +#include "rlvhelper.h" // [/RLVa:KB] // Linden library includes @@ -283,8 +284,8 @@ LLSD LLFloaterAbout::getInfo() } #endif -// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0a) | Added: RLVa-1.2.0e - info["RLV_VERSION"] = (rlv_handler_t::isEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)"; +// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0) + info["RLV_VERSION"] = (RlvActions::isRlvEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)"; // [/RLVa:KB] info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); info["LIBCURL_VERSION"] = LLCurl::getVersionString(); @@ -429,7 +430,14 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) support << getString("AboutHeader", args); if (info.has("REGION")) { - support << "\n\n" << getString("AboutPosition", args); +// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10) + support << "\n\n"; + if (RlvActions::canShowLocation()) + support << getString("AboutPosition", args); + else + support << RlvStrings::getString(RLV_STRING_HIDDEN_REGION); +// [/RLVa:KB] +// support << "\n\n" << getString("AboutPosition", args); } support << "\n\n" << getString("AboutSystem", args); support << "\n"; diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 289e6172a1..a7b8d566c6 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -91,6 +91,12 @@ bool RlvActions::canStand() return (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())); } +// Checked: 2014-02-24 (RLVa-1.4.10) +bool RlvActions::canShowLocation() +{ + return !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC); +} + // Checked: 2013-05-10 (RLVa-1.4.9) bool RlvActions::hasBehaviour(ERlvBehaviour eBhvr) { diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h index 9b77ed4b6a..58d90780a0 100644 --- a/indra/newview/rlvactions.h +++ b/indra/newview/rlvactions.h @@ -79,6 +79,11 @@ public: */ static bool canStand(); + /* + * Returns true if the user can see their in-world location + */ + static bool canShowLocation(); + // ================ // Helper functions // ================ -- GitLab