Skip to content
Snippets Groups Projects
Commit ec52db8d authored by Jonathan Yap's avatar Jonathan Yap
Browse files

STORM-1838 Slowly reappling changes to work with CHUI

parent 412d553f
No related branches found
No related tags found
No related merge requests found
...@@ -443,6 +443,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const ...@@ -443,6 +443,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
// static // static
void LLAvatarActions::teleportRequest(const LLUUID& id) void LLAvatarActions::teleportRequest(const LLUUID& id)
{ {
llwarns << "DBG " << llendl;
std::string name; std::string name;
gCacheName->getFullName(id, name); gCacheName->getFullName(id, name);
gCacheName->cleanFullName(name); gCacheName->cleanFullName(name);
......
...@@ -311,6 +311,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata) ...@@ -311,6 +311,7 @@ void LLConversationLogList::onCustomAction(const LLSD& userdata)
} }
else if ("offer_teleport" == command_name) else if ("offer_teleport" == command_name)
{ {
llwarns << "DBG " << llendl;
LLAvatarActions::offerTeleport(selected_conversation_participant_id); LLAvatarActions::offerTeleport(selected_conversation_participant_id);
} }
else if("add_friend" == command_name) else if("add_friend" == command_name)
......
...@@ -132,6 +132,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 ...@@ -132,6 +132,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("view_profile")); items.push_back(std::string("view_profile"));
items.push_back(std::string("im")); items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport")); 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("voice_call"));
items.push_back(std::string("chat_history")); items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history")); items.push_back(std::string("separator_chat_history"));
......
...@@ -1007,6 +1007,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec ...@@ -1007,6 +1007,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
{ {
LLAvatarActions::offerTeleport(selectedIDS); LLAvatarActions::offerTeleport(selectedIDS);
} }
else if ("request_teleport" == command)
{
LLAvatarActions::teleportRequest(selectedIDS.front());
}
else if ("voice_call" == command) else if ("voice_call" == command)
{ {
LLAvatarActions::startCall(userID); LLAvatarActions::startCall(userID);
......
...@@ -74,7 +74,7 @@ LLContextMenu* PeopleContextMenu::createMenu() ...@@ -74,7 +74,7 @@ LLContextMenu* PeopleContextMenu::createMenu()
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id)); registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
registrar.add("Avatar.InviteToGroup", boost::bind(&LLAvatarActions::inviteToGroup, 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)); registrar.add("Avatar.Calllog", boost::bind(&LLAvatarActions::viewChatHistory, id));
enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2));
...@@ -126,6 +126,7 @@ void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) ...@@ -126,6 +126,7 @@ void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
items.push_back(std::string("view_profile")); items.push_back(std::string("view_profile"));
items.push_back(std::string("im")); items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport")); 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("voice_call"));
items.push_back(std::string("chat_history")); items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history")); items.push_back(std::string("separator_chat_history"));
...@@ -256,10 +257,19 @@ bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata) ...@@ -256,10 +257,19 @@ bool PeopleContextMenu::checkContextMenuItem(const LLSD& userdata)
return false; 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() void PeopleContextMenu::offerTeleport()
{ {
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(), // boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper. // so we have to use a wrapper.
llwarns << "DBG " << llendl;
LLAvatarActions::offerTeleport(mUUIDs); LLAvatarActions::offerTeleport(mUUIDs);
} }
...@@ -285,6 +295,7 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) ...@@ -285,6 +295,7 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
items.push_back(std::string("view_profile")); items.push_back(std::string("view_profile"));
items.push_back(std::string("im")); items.push_back(std::string("im"));
items.push_back(std::string("offer_teleport")); 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("voice_call"));
items.push_back(std::string("chat_history")); items.push_back(std::string("chat_history"));
items.push_back(std::string("separator_chat_history")); items.push_back(std::string("separator_chat_history"));
......
...@@ -47,6 +47,7 @@ class PeopleContextMenu : public LLListContextMenu ...@@ -47,6 +47,7 @@ class PeopleContextMenu : public LLListContextMenu
bool enableContextMenuItem(const LLSD& userdata); bool enableContextMenuItem(const LLSD& userdata);
bool checkContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata);
void offerTeleport(); void offerTeleport();
void requestTeleport();
}; };
/** /**
......
...@@ -46,6 +46,15 @@ ...@@ -46,6 +46,15 @@
<on_click function="Avatar.DoToSelected" parameter="offer_teleport"/> <on_click function="Avatar.DoToSelected" parameter="offer_teleport"/>
<on_enable function="Avatar.EnableItem" parameter="can_offer_teleport"/> <on_enable function="Avatar.EnableItem" parameter="can_offer_teleport"/>
</menu_item_call> </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 <menu_item_call
label="Voice call" label="Voice call"
layout="topleft" layout="topleft"
......
...@@ -28,6 +28,15 @@ ...@@ -28,6 +28,15 @@
function="Avatar.EnableItem" function="Avatar.EnableItem"
parameter="can_offer_teleport"/> parameter="can_offer_teleport"/>
</menu_item_call> </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 <menu_item_call
label="Voice call" label="Voice call"
layout="topleft" layout="topleft"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment