EXT-829 share button in profile inactive
refactored share code to all call LLAvatarActions::share. Function opens an IM window if one doesn't already exist and prints an appropriate message, as well as opening the inventory sidepanel. Verified working in IM window, people tab, and individual's profile. Will be post-reviewed before push. --HG-- branch : avatar-pipelinemeow-7.2.2
parent
ef63c80766
commit
24dbd81763
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1211,7 +1211,7 @@ void LLPanelPeople::onTeleportButtonClicked()
|
|||
|
||||
void LLPanelPeople::onShareButtonClicked()
|
||||
{
|
||||
// *TODO: not implemented yet
|
||||
LLAvatarActions::share(getCurrentItemID());
|
||||
}
|
||||
|
||||
void LLPanelPeople::onMoreButtonClicked()
|
||||
|
|
|
|||
Loading…
Reference in New Issue