diff options
author | Samuel Kolb <skolb@lindenlab.com> | 2009-12-11 10:08:37 -0800 |
---|---|---|
committer | Samuel Kolb <skolb@lindenlab.com> | 2009-12-11 10:08:37 -0800 |
commit | 941497dd30c409a2f352b0bfc1c48bfaca5ea76e (patch) | |
tree | ed7bdc596ee0a856f9739864239f75c64db85f50 /indra/newview/lltoastimpanel.cpp | |
parent | 4b710367a1ac986e8be731bc391c0b375424148f (diff) | |
parent | 0a8d9fa5b5d044bed7d4c38ec51d87bc90f3b3a6 (diff) |
merge
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 16 |
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()); } |