summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavataractions.cpp17
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp8
-rw-r--r--indra/newview/llpanelpeople.cpp2
3 files changed, 18 insertions, 9 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index a2beb6af93..89a774fd2b 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -327,7 +327,22 @@ void LLAvatarActions::pay(const LLUUID& id)
//static
void LLAvatarActions::share(const LLUUID& id)
{
- // TODO: share items with selected avatar
+ 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
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 40319d949d..fa6d16cfb1 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -160,13 +160,7 @@ void LLPanelIMControlPanel::onAddFriendButtonClicked()
void LLPanelIMControlPanel::onShareButtonClicked()
{
- LLSD key;
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
-
- if (gIMMgr->hasSession(getSessionId()))
- {
- LLIMModel::getInstance()->addMessage(getSessionId(), SYSTEM_FROM, LLUUID::null, LLTrans::getString("share_alert"), false);
- }
+ LLAvatarActions::share(mAvatarID);
}
void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index d11ea69d78..c332776010 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1211,7 +1211,7 @@ void LLPanelPeople::onTeleportButtonClicked()
void LLPanelPeople::onShareButtonClicked()
{
- // *TODO: not implemented yet
+ LLAvatarActions::share(getCurrentItemID());
}
void LLPanelPeople::onMoreButtonClicked()