summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llviewermenu.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_other.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_object.xml6
3 files changed, 34 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));
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index 0ad41546d2..78f057a7d7 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -93,4 +93,10 @@
<menu_item_call.on_enable
function="EnablePayAvatar" />
</menu_item_call>
+ <menu_item_call
+ label="Offer Teleport"
+ name="teleport">
+ <menu_item_call.on_click
+ function="Avatar.Teleport"/>
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 62500c5116..35518cd13b 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -57,6 +57,12 @@
<menu_item_call.on_enable
function="Object.EnableInspect" />
</menu_item_call>
+ <menu_item_call
+ label="Zoom In"
+ name="Zoom In">
+ <menu_item_call.on_click
+ function="Object.ZoomIn" />
+ </menu_item_call>
<menu_item_separator layout="topleft" />
<context_menu
label="Put On &gt;"