diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/panelradar.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp index cfaffde..ce91da2 100644 --- a/linden/indra/newview/panelradar.cpp +++ b/linden/indra/newview/panelradar.cpp | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include "panelradar.h" | 30 | #include "panelradar.h" |
31 | 31 | ||
32 | #include "hippoLimits.h" | ||
33 | #include "llagent.h" | 32 | #include "llagent.h" |
34 | #include "llchat.h" | 33 | #include "llchat.h" |
35 | #include "llfloateravatarinfo.h" | 34 | #include "llfloateravatarinfo.h" |
@@ -46,7 +45,6 @@ | |||
46 | #include "llregionposition.h" | 45 | #include "llregionposition.h" |
47 | #include "roles_constants.h" | 46 | #include "roles_constants.h" |
48 | #include "llscrolllistctrl.h" | 47 | #include "llscrolllistctrl.h" |
49 | #include "llspinctrl.h" | ||
50 | #include "lltracker.h" | 48 | #include "lltracker.h" |
51 | #include "lluictrlfactory.h" | 49 | #include "lluictrlfactory.h" |
52 | #include "llviewercontrol.h" | 50 | #include "llviewercontrol.h" |
@@ -79,11 +77,6 @@ BOOL PanelRadar::postBuild() | |||
79 | childSetCommitCallback("RadarList", onUseRadarList, this); | 77 | childSetCommitCallback("RadarList", onUseRadarList, this); |
80 | mRadarList->setDoubleClickCallback(onClickIM); | 78 | mRadarList->setDoubleClickCallback(onClickIM); |
81 | 79 | ||
82 | childSetCommitCallback("simwide_checkbox", onCheckSimWide, this); | ||
83 | |||
84 | // Set max range to max height | ||
85 | getChild<LLSpinCtrl>("near_me_range")->setMaxValue(gHippoLimits->getMaxHeight()); | ||
86 | |||
87 | childSetAction("im_btn", onClickIM, this); | 80 | childSetAction("im_btn", onClickIM, this); |
88 | childSetAction("profile_btn", onClickProfile, this); | 81 | childSetAction("profile_btn", onClickProfile, this); |
89 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); | 82 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); |
@@ -223,6 +216,8 @@ void PanelRadar::updateRadarDisplay() | |||
223 | F32 range = gSavedSettings.getF32("NearMeRange"); | 216 | F32 range = gSavedSettings.getF32("NearMeRange"); |
224 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); | 217 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); |
225 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); | 218 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); |
219 | // We show avatars outside the estate even if you can't manage it in case griefers are lying on the border | ||
220 | bool is_manager = gAgent.getRegion()->canManageEstate(); | ||
226 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | 221 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 |
227 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | 222 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) |
228 | { | 223 | { |
@@ -291,7 +286,7 @@ void PanelRadar::updateRadarDisplay() | |||
291 | } | 286 | } |
292 | 287 | ||
293 | // Only display avatars in range | 288 | // Only display avatars in range |
294 | if (mSimWide || entry->getDistance() <= range) | 289 | if (is_manager || entry->getDistance() <= range) |
295 | { | 290 | { |
296 | // Append typing string | 291 | // Append typing string |
297 | std::string typing = ""; | 292 | std::string typing = ""; |
@@ -554,28 +549,6 @@ void PanelRadar::onUseRadarList(LLUICtrl* ctrl, void* user_data) | |||
554 | } | 549 | } |
555 | 550 | ||
556 | 551 | ||
557 | // static | ||
558 | void PanelRadar::onCheckSimWide(LLUICtrl* ctrl, void* user_data) | ||
559 | { | ||
560 | PanelRadar* self = (PanelRadar*)user_data; | ||
561 | if (self) | ||
562 | { | ||
563 | self->updateRangeControls(); | ||
564 | } | ||
565 | } | ||
566 | |||
567 | |||
568 | void PanelRadar::updateRangeControls() | ||
569 | { | ||
570 | LLSpinCtrl* near_me = getChild<LLSpinCtrl>("near_me_range"); | ||
571 | if (near_me) | ||
572 | { | ||
573 | near_me->setEnabled(!gSavedSettings.getBOOL("RadarSimWide")); | ||
574 | } | ||
575 | mSimWide = gSavedSettings.getBOOL("RadarSimWide"); | ||
576 | } | ||
577 | |||
578 | |||
579 | bool PanelRadar::visibleItemsSelected() const | 552 | bool PanelRadar::visibleItemsSelected() const |
580 | { | 553 | { |
581 | return (mRadarList->getFirstSelectedIndex() >= 0); | 554 | return (mRadarList->getFirstSelectedIndex() >= 0); |