summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2009-11-25 09:42:58 -0800
committerPalmer Truelson <palmer@lindenlab.com>2009-11-25 09:42:58 -0800
commitbb614fa887ec7cadc5b370c1dcf412ae5cf662e1 (patch)
tree2ee594428704e0f4774f717d71485ee0bdde8748 /indra/newview/llavataractions.cpp
parent6d66910c6e2fbb25bf8b5c7b90e795f350342104 (diff)
parent57bc7dc44f31ef132a4abec228459c490c425eed (diff)
Merge of viewer 2
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index ee4a9df15f..b08191ce15 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -190,6 +190,19 @@ void LLAvatarActions::startIM(const LLUUID& id)
}
// static
+void LLAvatarActions::endIM(const LLUUID& id)
+{
+ if (id.isNull())
+ return;
+
+ LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id);
+ if (session_id != LLUUID::null)
+ {
+ gIMMgr->leaveSession(session_id);
+ }
+}
+
+// static
void LLAvatarActions::startCall(const LLUUID& id)
{
if (id.isNull())
@@ -284,7 +297,7 @@ void LLAvatarActions::showProfile(const LLUUID& id)
//Show own profile
if(gAgent.getID() == id)
{
- LLSideTray::getInstance()->showPanel("panel_me_profile", params);
+ LLSideTray::getInstance()->showPanel("panel_me", params);
}
//Show other user profile
else
@@ -311,6 +324,27 @@ void LLAvatarActions::pay(const LLUUID& id)
}
}
+//static
+void LLAvatarActions::share(const LLUUID& id)
+{
+ LLSD key;
+ LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
+
+
+ LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,id);
+
+ if (!gIMMgr->hasSession(session_id))
+ {
+ startIM(id);
+ }
+
+ if (gIMMgr->hasSession(session_id))
+ {
+ // we should always get here, but check to verify anyways
+ LLIMModel::getInstance()->addMessage(session_id, SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
+ }
+}
+
// static
void LLAvatarActions::toggleBlock(const LLUUID& id)
{
@@ -334,9 +368,9 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id)
LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(id));
if (widget)
{
- widget->removeNoneOption();
widget->center();
widget->setPowersMask(GP_MEMBER_INVITE);
+ widget->removeNoneOption();
widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id));
}
}