summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastimpanel.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2009-12-04 14:51:58 +0200
committerAndrew Dyukov <adyukov@productengine.com>2009-12-04 14:51:58 +0200
commitfc0679cd834b4580d9d87023376f146fa6988d5f (patch)
treef54f5d1a4910515c3b60c24848e49b2202ab58e9 /indra/newview/lltoastimpanel.cpp
parent61d45146121532e4055e4f6f4409ff24a69f22f9 (diff)
Implemented normal task EXT-3082 (Remove Reply button from IM toasts
and open IM window just by click on IM toast). --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r--indra/newview/lltoastimpanel.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index f928b5f243..7beba59c83 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -40,8 +40,7 @@ const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
//--------------------------------------------------------------------------
LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification),
mAvatar(NULL), mUserName(NULL),
- mTime(NULL), mMessage(NULL),
- mReplyBtn(NULL)
+ mTime(NULL), mMessage(NULL)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml");
@@ -50,7 +49,6 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mUserName = getChild<LLTextBox>("user_name");
mTime = getChild<LLTextBox>("time_box");
mMessage = getChild<LLTextBox>("message");
- mReplyBtn = getChild<LLButton>("reply");
LLStyle::Params style_params;
style_params.font.name(LLFontGL::nameFromFont(style_params.font));
@@ -76,18 +74,10 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mSessionID = p.session_id;
mNotification = p.notification;
- // if message comes from the system - there shouldn't be a reply btn
if(p.from == SYSTEM_FROM)
{
mAvatar->setVisible(FALSE);
sys_msg_icon->setVisible(TRUE);
-
- mReplyBtn->setVisible(FALSE);
- S32 btn_height = mReplyBtn->getRect().getHeight();
- LLRect msg_rect = mMessage->getRect();
- mMessage->reshape(msg_rect.getWidth(), msg_rect.getHeight() + btn_height);
- msg_rect.setLeftTopAndSize(msg_rect.mLeft, msg_rect.mTop, msg_rect.getWidth(), msg_rect.getHeight() + btn_height);
- mMessage->setRect(msg_rect);
}
else
{
@@ -95,7 +85,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
sys_msg_icon->setVisible(FALSE);
mAvatar->setValue(p.avatar_id);
- mReplyBtn->setClickedCallback(boost::bind(&LLToastIMPanel::onClickReplyBtn, this));
+ setMouseDownCallback(boost::bind(&LLToastIMPanel::onClickToastIM, this));
}
S32 maxLinesCount;
@@ -113,7 +103,7 @@ LLToastIMPanel::~LLToastIMPanel()
}
//--------------------------------------------------------------------------
-void LLToastIMPanel::onClickReplyBtn()
+void LLToastIMPanel::onClickToastIM()
{
mNotification->respond(mNotification->getResponseTemplate());
}