summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-01-04 14:04:20 -0800
committerLeyla Farazha <leyla@lindenlab.com>2010-01-04 14:04:20 -0800
commitfbac3aaf0c43de4892ab0b95540f86c2b7c7a0de (patch)
tree0a43aa882504a4ca96ea28a60e5f076279dae4b3 /indra/newview/llviewermenu.cpp
parent0d14e65c2deb7b99d1459a75ee080f786850ceb0 (diff)
EXT-2481 [BSI] Add "Zoom in" to 3D Object context menu and inspector Gear menu
EXT-3388 [BSI] "Teleport" option missing dropdown when right clicking on friends list
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2a9c738c97..a28aef6ddd 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3017,6 +3017,26 @@ bool callback_eject(const LLSD& notification, const LLSD& response)
return false;
}
+void handle_avatar_teleport(const LLSD& avatar_id)
+{
+ // Use avatar_id if available, otherwise default to right-click avatar
+ LLVOAvatar* avatar = NULL;
+ if (avatar_id.asUUID().notNull())
+ {
+ avatar = find_avatar_from_object(avatar_id.asUUID());
+ }
+ else
+ {
+ avatar = find_avatar_from_object(
+ LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
+ }
+
+ if( avatar )
+ {
+ LLAvatarActions::offerTeleport(avatar->getID());
+ }
+}
+
void handle_avatar_eject(const LLSD& avatar_id)
{
// Use avatar_id if available, otherwise default to right-click avatar
@@ -7913,6 +7933,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD()));
+ commit.add("Avatar.Teleport", boost::bind(&handle_avatar_teleport, LLSD()));
view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
@@ -7952,8 +7973,8 @@ void initialize_menus()
enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute));
enable.add("Object.EnableMute", boost::bind(&enable_object_mute));
-
enable.add("Object.EnableBuy", boost::bind(&enable_buy_object));
+ commit.add("Object.ZoomIn", boost::bind(&handle_look_at_selection, "zoom"));
// Attachment pie menu
enable.add("Attachment.Label", boost::bind(&onEnableAttachmentLabel, _1, _2));