summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeoplemenus.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-02-24 16:19:30 -0800
committerLeyla Farazha <leyla@lindenlab.com>2010-02-24 16:19:30 -0800
commitfadbd33b52b6deb465a49a4c0857ed8078277b15 (patch)
tree57d07406dde9741d13a763e3a66a7a08088e4ae7 /indra/newview/llpanelpeoplemenus.cpp
parent66d2bd3de30b77301d200c7449d33bb5b81b94ec (diff)
parent4729019189a1e7c54c08f8974f7f008968fd686d (diff)
Merge
Diffstat (limited to 'indra/newview/llpanelpeoplemenus.cpp')
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 900d28adca..854651cd01 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -39,6 +39,7 @@
#include "llpanelpeoplemenus.h"
// newview
+#include "llagent.h"
#include "llagentdata.h" // for gAgentID
#include "llavataractions.h"
#include "llviewermenu.h" // for gMenuHolder
@@ -125,7 +126,7 @@ LLContextMenu* NearbyMenu::createMenu()
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id));
registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
- registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
+ registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id));
registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id));
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
@@ -218,6 +219,13 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
{
return LLAvatarActions::canCall();
}
+ else if (item == std::string("can_show_on_map"))
+ {
+ const LLUUID& id = mUUIDs.front();
+
+ return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id))
+ || gAgent.isGodlike();
+ }
return false;
}