From 1c38d016d563f8ac3a484e5bc7ac5982349ebc2e Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sun, 14 Aug 2011 02:33:57 -0500 Subject: [PATCH] Removed old RLV code. Plugged holes with RLVa. --- indra/newview/llfloateravatarlist.cpp | 40 ++++++------------ indra/newview/llfloaterteleporthistory.cpp | 12 +++--- indra/newview/llinventorybridge.cpp | 11 ++--- indra/newview/llnetmap.cpp | 41 +++++++----------- indra/newview/llstartup.cpp | 3 -- indra/newview/lltoolbar.cpp | 5 --- indra/newview/llviewermenu.cpp | 8 ---- indra/newview/llviewermessage.cpp | 48 ++++++++++------------ 8 files changed, 60 insertions(+), 108 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index a568b88e9..c3bfe87c7 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -59,6 +59,10 @@ #include "llviewermenu.h" // +// [RLVa:KB] +#include "rlvhandler.h" +// [/RLVa:KB] + /** * @brief How long to keep people who are gone in the list and in memory. */ @@ -237,18 +241,14 @@ void LLFloaterAvatarList::createInstance(bool visible) //static void LLFloaterAvatarList::toggle(void*) { -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShownames) - { - if (sInstance && sInstance->getVisible()) - { - sInstance->close(false); - } - } -#endif //mk if (sInstance) { - if (sInstance->getVisible()) + if (sInstance->getVisible() +// [RLVa:KB] + || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) +// [/RLVa:KB] + ) + { sInstance->close(false); } @@ -266,12 +266,10 @@ void LLFloaterAvatarList::toggle(void*) //static void LLFloaterAvatarList::showInstance() { -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShownames) - { +// [RLVa:KB] + if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) return; - } -#endif //mk +// [/RLVa:KB] if (sInstance) { if (!sInstance->getVisible()) @@ -457,12 +455,6 @@ void LLFloaterAvatarList::updateAvatarList() continue; } } -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShownames) - { - name = gAgent.mRRInterface.getDummyName(name); - } -#endif //mk if (avid.isNull()) { @@ -501,12 +493,6 @@ void LLFloaterAvatarList::updateAvatarList() //name = gCacheName->getDefaultName(); continue; //prevent (Loading...) } -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShownames) - { - name = gAgent.mRRInterface.getDummyName(name); - } -#endif //mk if (mAvatars.count(avid) > 0) { diff --git a/indra/newview/llfloaterteleporthistory.cpp b/indra/newview/llfloaterteleporthistory.cpp index 9547bf0b6..2998f74e2 100644 --- a/indra/newview/llfloaterteleporthistory.cpp +++ b/indra/newview/llfloaterteleporthistory.cpp @@ -52,6 +52,9 @@ #include "llviewerwindow.h" #include "llweb.h" #include "llsdserialize.h" +// [RLVa:KB] +#include "rlvhandler.h" +// [/RLVa:KB] LLFloaterTeleportHistory::LLFloaterTeleportHistory(const LLSD& seed) : LLFloater(std::string("teleporthistory")), @@ -103,12 +106,11 @@ BOOL LLFloaterTeleportHistory::postBuild() void LLFloaterTeleportHistory::addPendingEntry(std::string regionName, S16 x, S16 y, S16 z) { -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShowloc) - { +// [RLVa:KB] + if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) return; - } -#endif //mk +// [/RLVa:KB] + // Set pending entry timestamp U32 utc_time; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8ae7f8523..a7788044d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4119,13 +4119,10 @@ void LLObjectBridge::openItem() } if (avatar->isWearingAttachment(mUUID)) { -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && !gAgent.mRRInterface.canDetach(avatar->getWornAttachment(mUUID))) - { - return; - } -#endif //mk - performAction(NULL, NULL, "detach"); +// [RLVa:KB] + if ( !(rlv_handler_t::isEnabled()) || (gRlvAttachmentLocks.canDetach(getItem()))) + performAction(NULL, NULL, "detach"); +// [/RLVa:KB] } else { diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 614d6d39c..02964a038 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -638,33 +638,22 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec } else { -#ifdef LL_RRINTERFACE_H //MK - if (gRRenabled && gAgent.mRRInterface.mContainsShownames) + if (LLAvatarNameCache::useDisplayNames()) { - fullname = gAgent.mRRInterface.getDummyName(fullname); - } - else - { -#endif //mk - if (LLAvatarNameCache::useDisplayNames()) - { - LLAvatarName avatar_name; - if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name)) - { - static const LLCachedControl phoenix_name_system("PhoenixNameSystem", 0); - if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault)) - { - fullname = avatar_name.mDisplayName; - } - else - { - fullname = avatar_name.getCompleteName(true); - } - } - } -#ifdef LL_RRINTERFACE_H //MK - } -#endif //mk + LLAvatarName avatar_name; + if (LLAvatarNameCache::get(mClosestAgentToCursor, &avatar_name)) + { + static const LLCachedControl phoenix_name_system("PhoenixNameSystem", 0); + if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault)) + { + fullname = avatar_name.mDisplayName; + } + else + { + fullname = avatar_name.getCompleteName(true); + } + } + } msg.append(fullname); } // [/Ansariel: Display name support] diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b854358c9..acfd99089 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2646,9 +2646,6 @@ bool idle_startup() gForegroundTime.reset(); if (gSavedSettings.getBOOL("FetchInventoryOnLogin") -#ifdef LL_RRINTERFACE_H //MK - || gRRenabled -#endif //mk ) { // Fetch inventory in the background diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 8b1325ea2..d3a8ea928 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -477,11 +477,6 @@ void LLToolBar::onClickAppearance(void*) void LLToolBar::onClickRadarList(void*) { LLFloaterAvatarList::toggle(0); - bool vis = false; - if(LLFloaterAvatarList::getInstance()) - { - vis = (bool)LLFloaterAvatarList::getInstance()->getVisible(); - } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index dc5587615..002955008 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2773,9 +2773,6 @@ bool handle_go_to() std::string val; LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; if (gSavedSettings.getBOOL("DoubleClickTeleport") -#ifdef LL_RRINTERFACE_H //MK - && !(gRRenabled && gAgent.mRRInterface.contains ("tploc")) -#endif //mk ) { LLVector3d hips_offset(0.0f, 0.0f, 1.2f); @@ -5637,11 +5634,6 @@ class LLViewToggleRadar: public view_listener_t bool handleEvent(LLPointer event, const LLSD& userdata) { LLFloaterAvatarList::toggle(0); - bool vis = false; - if(LLFloaterAvatarList::getInstance()) - { - vis = (bool)LLFloaterAvatarList::getInstance()->getVisible(); - } return true; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d7a7566bd..8442d924c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3113,18 +3113,20 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) U32 links_for_chatting_objects = gSavedSettings.getU32("LinksForChattingObjects"); if (links_for_chatting_objects != 0 && chatter && chat.mSourceType == CHAT_SOURCE_OBJECT && -#ifdef LL_RRINTERFACE_H //MK - (!gRRenabled || !gAgent.mRRInterface.mContainsShownames) && -#endif //mk - (!is_owned_by_me || links_for_chatting_objects == 2)) + (!is_owned_by_me || links_for_chatting_objects == 2) +// [RLVa:KB] + && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) +// [/RLVa:KB] + ) { LLSD query_string; query_string["name"] = from_name; query_string["owner"] = owner_id; -#ifdef LL_RRINTERFACE_H //MK - if (!gRRenabled || !gAgent.mRRInterface.mContainsShowloc) + +// [RLVa:KB] + if( !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) ) +// [/RLVa:KB] { -#endif //mk // Compute the object SLURL. LLVector3 pos = chatter->getPositionRegion(); S32 x = llround((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS)); @@ -3133,9 +3135,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) std::ostringstream location; location << chatter->getRegion()->getName() << "/" << x << "/" << y << "/" << z; query_string["slurl"] = location.str(); -#ifdef LL_RRINTERFACE_H //MK } -#endif //mk + std::ostringstream link; link << "secondlife:///app/objectim/" << from_id << LLURI::mapToQueryString(query_string); chat.mURL = link.str(); @@ -3199,30 +3200,23 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // [Ansariel/Henri: Display name support] if (chatter && chatter->isAvatar()) { -#ifdef LL_RRINTERFACE_H //MK - if (!gRRenabled || !gAgent.mRRInterface.mContainsShownames) + if (LLAvatarNameCache::useDisplayNames()) { -#endif //mk - if (LLAvatarNameCache::useDisplayNames()) + LLAvatarName avatar_name; + if (LLAvatarNameCache::get(from_id, &avatar_name)) { - LLAvatarName avatar_name; - if (LLAvatarNameCache::get(from_id, &avatar_name)) + static const LLCachedControl phoenix_name_system("PhoenixNameSystem", 0); + if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault)) { - static const LLCachedControl phoenix_name_system("PhoenixNameSystem", 0); - if (phoenix_name_system == 2 || (phoenix_name_system == 1 && avatar_name.mIsDisplayNameDefault)) - { - from_name = avatar_name.mDisplayName; - } - else - { - from_name = avatar_name.getCompleteName(); - } + from_name = avatar_name.mDisplayName; + } + else + { + from_name = avatar_name.getCompleteName(); } - chat.mFromName = from_name; } -#ifdef LL_RRINTERFACE_H //MK + chat.mFromName = from_name; } -#endif //mk } // [/Ansariel/Henri: Display name support]