summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-05 01:05:39 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-05 01:05:39 +0000
commit85f940092705281f1040081ca5ebc207c3cb4a5b (patch)
treec3ba20351cd7ce83dcf09d65b5a8c5998625d2cc /indra/newview/llviewermenu.cpp
parent7447454e7e733699f57f545bac13f46a72b916b7 (diff)
EXT-316 Enable the Viewer to generate calling cards for any agent
Added code to store agent ID in the description field of calling cards so that we can use them to store user generated contacts. Currently enabled as a context menu for avatars (just for initial testing). reviewed by richard
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c7df1d9d70..cbaee2ac70 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5373,6 +5373,19 @@ class LLAvatarAddFriend : public view_listener_t
}
};
+class LLAvatarAddContact : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ create_inventory_callingcard(avatar->getID());
+ }
+ return true;
+ }
+};
+
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -7931,6 +7944,7 @@ void initialize_menus()
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
+ view_listener_t::addMenu(new LLAvatarAddContact(), "Avatar.AddContact");
view_listener_t::addMenu(new LLAvatarFreeze(), "Avatar.Freeze");
view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug");
view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");