summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llavataractions.cpp1
-rw-r--r--indra/newview/llconversationloglist.cpp1
-rw-r--r--indra/newview/llconversationmodel.cpp1
-rw-r--r--indra/newview/llfloaterimcontainer.cpp4
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp13
-rw-r--r--indra/newview/llpanelpeoplemenus.h1
-rw-r--r--indra/newview/skins/default/xui/en/menu_conversation.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby.xml9
8 files changed, 38 insertions, 1 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 45992b8c83..285e70c8ea 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -443,6 +443,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
// static
void LLAvatarActions::teleportRequest(const LLUUID& id)
{
+llwarns << "DBG " << llendl;
std::string name;
gCacheName->getFullName(id, name);
gCacheName->cleanFullName(name);
diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp
index 5ab108b39f..cf9c9b3415 100644
--- a/indra/newview/llconversationloglist.cpp
+++ b/indra/newview/llconversationloglist.cpp
@@ -311,6 +311,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
}
else if ("offer_teleport" == command_name)
{
+llwarns << "DBG " << llendl;
LLAvatarActions::offerTeleport(selected_conversation_participant_id);
}
else if("add_friend" == command_name)
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index c74ce24872..b0aaa21ec9 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -132,6 +132,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("view_profile"));
items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("request_teleport"));
items.push_back(std::string("voice_call"));
items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history"));
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5e0cd8ef78..65155041f0 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1007,6 +1007,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
{
LLAvatarActions::offerTeleport(selectedIDS);
}
+ else if ("request_teleport" == command)
+ {
+ LLAvatarActions::teleportRequest(selectedIDS.front());
+ }
else if ("voice_call" == command)
{
LLAvatarActions::startCall(userID);
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index a68772a35d..ddc92f439b 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -74,7 +74,7 @@ LLContextMenu* PeopleContextMenu::createMenu()
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, id));
- registrar.add("Avatar.TeleportRequest", boost::bind(&LLAvatarActions::teleportRequest, id));
+ registrar.add("Avatar.TeleportRequest", boost::bind(&PeopleContextMenu::requestTeleport, this));
registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id));
enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2));
@@ -126,6 +126,7 @@ void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
items.push_back(std::string("view_profile"));
items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("request_teleport"));
items.push_back(std::string("voice_call"));
items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history"));
@@ -256,10 +257,19 @@ bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata)
return false;
}
+void PeopleContextMenu::requestTeleport()
+{
+ // boost::bind cannot recognize overloaded method LLAvatarActions::teleportRequest(),
+ // so we have to use a wrapper.
+llwarns << "DBG " << llendl;
+ LLAvatarActions::teleportRequest(mUUIDs.front());
+}
+
void PeopleContextMenu::offerTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper.
+llwarns << "DBG " << llendl;
LLAvatarActions::offerTeleport(mUUIDs);
}
@@ -285,6 +295,7 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
items.push_back(std::string("view_profile"));
items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("request_teleport"));
items.push_back(std::string("voice_call"));
items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history"));
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index 0a1dcef303..abf5fa05e4 100644
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -47,6 +47,7 @@ private:
bool enableContextMenuItem(const LLSD& userdata);
bool checkContextMenuItem(const LLSD& userdata);
void offerTeleport();
+ void requestTeleport();
};
/**
diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml
index 5a13ef0a59..c2c15023c5 100644
--- a/indra/newview/skins/default/xui/en/menu_conversation.xml
+++ b/indra/newview/skins/default/xui/en/menu_conversation.xml
@@ -46,6 +46,15 @@
<on_click function="Avatar.DoToSelected" parameter="offer_teleport"/>
<on_enable function="Avatar.EnableItem" parameter="can_offer_teleport"/>
</menu_item_call>
+
+ <menu_item_call
+ label="Request teleport"
+ layout="topleft"
+ name="request_teleport">
+ <on_click function="Avatar.DoToSelected" parameter="request_teleport"/>
+ <on_enable function="Avatar.EnableItem" parameter="can_offer_teleport"/>
+ </menu_item_call>
+
<menu_item_call
label="Voice call"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 25b100bc94..80e8e59076 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -29,6 +29,15 @@
parameter="can_offer_teleport"/>
</menu_item_call>
<menu_item_call
+ label="Request Teleport"
+ name="request_teleport">
+ <menu_item_call.on_click
+ function="Avatar.TeleportRequest"/>
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_offer_teleport"/>
+ </menu_item_call>
+ <menu_item_call
label="Voice call"
layout="topleft"
name="voice_call">