summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4d4ad1c022..cb1be5fabc 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6252,25 +6252,20 @@ class LLAvatarSendIM : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
if(avatar)
{
- std::string name("IM");
- LLNameValue *first = avatar->getNVPair("FirstName");
- LLNameValue *last = avatar->getNVPair("LastName");
- if (first && last)
- {
- name.assign( first->getString() );
- name.append(" ");
- name.append( last->getString() );
- }
+ LLAvatarActions::startIM(avatar->getID());
+ }
+ return true;
+ }
+};
- //EInstantMessage type = have_agent_callingcard(gLastHitObjectID)
- // ? IM_SESSION_ADD : IM_SESSION_CARDLESS_START;
- LLUUID session_id = gIMMgr->addSession(name,
- IM_NOTHING_SPECIAL,
- avatar->getID());
- if (session_id != LLUUID::null)
- {
- LLIMFloater::show(session_id);
- }
+class LLAvatarCall : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ LLAvatarActions::startCall(avatar->getID());
}
return true;
}
@@ -7941,6 +7936,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard");
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, 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");
view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend");