summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorEugene Kondrashev <ekondrashev@productengine.com>2009-11-02 21:27:37 +0200
committerEugene Kondrashev <ekondrashev@productengine.com>2009-11-02 21:27:37 +0200
commitd4a3ccc52cf0c9113428c71280a9e4d28f781bfd (patch)
tree5c0be9bb43bdb614ad0324657826fd0c1157f3a3 /indra
parenta3f90362cc37dcbb4197d0a1f07127241cf63861 (diff)
Fixed normal bug EXT-957-IM Verb button missing
--HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp21
-rw-r--r--indra/newview/llpanelimcontrolpanel.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_im_control_panel.xml10
4 files changed, 32 insertions, 11 deletions
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<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 =
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">
<layout_stack follows="left|top|right|bottom"
- height="255"
+ height="305"
width="365"
layout="topleft"
orientation="horizontal"
@@ -29,11 +29,11 @@
layout="topleft"
top_delta="-3"
width="146"
- height="255"
+ height="305"
follows="left"
label="IM Control Panel"
user_resize="false" />
- <layout_panel height="255"
+ <layout_panel height="305"
width="200"
left_delta="146"
top="0"
@@ -56,7 +56,7 @@
length="1"
follows="left|top|right|bottom"
font="SansSerif"
- height="205"
+ height="255"
layout="topleft"
name="chat_history"
parse_highlights="true"
diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
index c4cdaa41f9..a9396661e0 100644
--- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
+++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel name="panel_im_control_panel"
width="125"
- height="248"
+ height="298"
border="false">
<avatar_icon name="avatar_icon"
@@ -39,9 +39,17 @@
height="20"
visible="false"/>
+ <button name="teleport_btn"
+ label="Teleport"
+ width="125"
+ height="20" />
<button name="share_btn"
label="Share"
width="125"
height="20" />
+ <button name="pay_btn"
+ label="Pay"
+ width="125"
+ height="20" />
</panel>