From d4a3ccc52cf0c9113428c71280a9e4d28f781bfd Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Mon, 2 Nov 2009 21:27:37 +0200 Subject: Fixed normal bug EXT-957-IM Verb button missing --HG-- branch : product-engine --- indra/newview/llpanelimcontrolpanel.cpp | 21 ++++++++++++++++----- indra/newview/llpanelimcontrolpanel.h | 2 ++ .../skins/default/xui/en/floater_im_session.xml | 10 +++++----- .../skins/default/xui/en/panel_im_control_panel.xml | 10 +++++++++- 4 files changed, 32 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index b54975b76b..b5e0cdccc0 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("avatar_icon")->getAvatarId())); return LLPanelChatControlPanel::postBuild(); } +void LLPanelIMControlPanel::onTeleportButtonClicked() +{ + LLAvatarActions::offerTeleport(mAvatarID); +} +void LLPanelIMControlPanel::onPayButtonClicked() +{ + LLAvatarActions::pay(mAvatarID); +} + void LLPanelIMControlPanel::onViewProfileButtonClicked() { - LLAvatarActions::showProfile(getChild("avatar_icon")->getAvatarId()); + LLAvatarActions::showProfile(mAvatarID); } void LLPanelIMControlPanel::onAddFriendButtonClicked() { LLAvatarIconCtrl* avatar_icon = getChild("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("avatar_icon")->setValue(avatar_id); + getChild("avatar_icon")->setValue(mAvatarID); // Disable profile button if participant is not realy SL avatar LLIMModel::LLIMSession* im_session = diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index d25f33935a..b60ddc1d8d 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -73,6 +73,8 @@ private: void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); void onShareButtonClicked(); + void onTeleportButtonClicked(); + void onPayButtonClicked(); LLUUID mAvatarID; }; diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 26d2f4e497..c314fce42d 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -3,7 +3,7 @@ legacy_header_height="18" background_visible="true" follows="left|top|right|bottom" - height="270" + height="330" layout="topleft" left="0" name="panel_im" @@ -17,7 +17,7 @@ min_width="200" min_height="150"> - +