aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatermap.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloatermap.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp
index 3be891e..6d23ab4 100644
--- a/linden/indra/newview/llfloatermap.cpp
+++ b/linden/indra/newview/llfloatermap.cpp
@@ -240,6 +240,13 @@ void LLFloaterMap::populateRadar()
240 std::string fullname = getSelectedName(avatar_ids[i]); 240 std::string fullname = getSelectedName(avatar_ids[i]);
241 if (!fullname.empty()) 241 if (!fullname.empty())
242 { 242 {
243// [RLVa:KB] - Alternate: Imprudence-1.2.0
244 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
245 {
246 fullname = gRlvHandler.getAnonym(fullname);
247 }
248// [/RLVa:KB]
249
243 std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : ""; 250 std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("muted") : "";
244 element["id"] = avatar_ids[i]; 251 element["id"] = avatar_ids[i];
245 element["columns"][0]["column"] = "avatar_name"; 252 element["columns"][0]["column"] = "avatar_name";
@@ -290,12 +297,14 @@ void LLFloaterMap::toggleButtons()
290 BOOL enable_unmute = FALSE; 297 BOOL enable_unmute = FALSE;
291 BOOL enable_track = FALSE; 298 BOOL enable_track = FALSE;
292 BOOL enable_estate = FALSE; 299 BOOL enable_estate = FALSE;
300 BOOL enable_friend = FALSE;
293 if (childHasFocus("RadarPanel")) 301 if (childHasFocus("RadarPanel"))
294 { 302 {
295 enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE; 303 enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE;
296 enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; 304 enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE;
297 enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar); 305 enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar);
298 enable_estate = getKickable(mSelectedAvatar); 306 enable_estate = getKickable(mSelectedAvatar);
307 enable_friend = !is_agent_friend(mSelectedAvatar);
299 } 308 }
300 else 309 else
301 { 310 {
@@ -314,6 +323,33 @@ void LLFloaterMap::toggleButtons()
314 childSetEnabled("unmute_btn", enable_unmute); 323 childSetEnabled("unmute_btn", enable_unmute);
315 childSetEnabled("ar_btn", enable); 324 childSetEnabled("ar_btn", enable);
316 childSetEnabled("estate_eject_btn", enable_estate); 325 childSetEnabled("estate_eject_btn", enable_estate);
326
327// [RLVa:KB] - Imprudence-1.2.0
328 // Bit clumsy, but this way the RLV stuff is in its own separate block and keeps the code above clean - Kitty
329 if ( (rlv_handler_t::isEnabled()) && (mSelectedAvatar.notNull()) )
330 {
331 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
332 {
333 childSetEnabled("im_btn", FALSE);
334 childSetEnabled("profile_btn", FALSE);
335 childSetEnabled("invite_btn", FALSE);
336 childSetEnabled("add_btn", FALSE);
337 childSetEnabled("mute_btn", FALSE);
338 childSetEnabled("unmute_btn", FALSE);
339 }
340
341 // Even though the avie is in the same sim (so they already know where we are) the tp would just get blocked by different code
342 // so it's actually less confusing to the user if we just disable the teleport button here so they'll at least have a visual cue
343 BOOL rlv_enable_tp = (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, mSelectedAvatar));
344 if ( (rlv_enable_tp) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
345 {
346 const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(mSelectedAvatar);
347 if ( ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) )
348 rlv_enable_tp = FALSE;
349 }
350 childSetEnabled("offer_teleport_btn", rlv_enable_tp);
351 }
352// [/RLVa:KB]
317} 353}
318 354
319BOOL LLFloaterMap::getKickable(const LLUUID &agent_id) 355BOOL LLFloaterMap::getKickable(const LLUUID &agent_id)