diff options
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index b54975b76b..21e88b6d07 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -112,21 +112,32 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this)); childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this)); + childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this)); + childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); return LLPanelChatControlPanel::postBuild(); } +void LLPanelIMControlPanel::onTeleportButtonClicked() +{ + LLAvatarActions::offerTeleport(mAvatarID); +} +void LLPanelIMControlPanel::onPayButtonClicked() +{ + LLAvatarActions::pay(mAvatarID); +} + void LLPanelIMControlPanel::onViewProfileButtonClicked() { - LLAvatarActions::showProfile(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()); + LLAvatarActions::showProfile(mAvatarID); } void LLPanelIMControlPanel::onAddFriendButtonClicked() { LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon"); std::string full_name = avatar_icon->getFirstName() + " " + avatar_icon->getLastName(); - LLAvatarActions::requestFriendshipDialog(avatar_icon->getAvatarId(), full_name); + LLAvatarActions::requestFriendshipDialog(mAvatarID, full_name); } void LLPanelIMControlPanel::onShareButtonClicked() @@ -140,12 +151,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) LLIMModel& im_model = LLIMModel::instance(); - LLUUID avatar_id = im_model.getOtherParticipantID(session_id); + mAvatarID = im_model.getOtherParticipantID(session_id); // Disable "Add friend" button for friends. - childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(avatar_id)); + childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID)); - getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(avatar_id); + getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID); // Disable profile button if participant is not realy SL avatar LLIMModel::LLIMSession* im_session = @@ -188,6 +199,20 @@ void LLPanelGroupControlPanel::onGroupInfoButtonClicked() LLGroupActions::show(mGroupID); } +void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata) +{ + // TODO: Check this code when when sort order menu will be added. (EM) + if (false && !mParticipantList) + return; + + std::string chosen_item = userdata.asString(); + + if (chosen_item == "sort_name") + { + mParticipantList->setSortOrder(LLParticipantList::E_SORT_BY_NAME); + } + +} void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) { |