diff options
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 16 | ||||
-rw-r--r-- | indra/newview/lltoastimpanel.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_instant_message.xml | 11 |
3 files changed, 5 insertions, 25 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()); } diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index af21b07a3d..23f08ef610 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -61,7 +61,7 @@ public: private: static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; - void onClickReplyBtn(); + void onClickToastIM(); LLNotificationPtr mNotification; LLUUID mSessionID; @@ -69,7 +69,6 @@ private: LLTextBox* mUserName; LLTextBox* mTime; LLTextBox* mMessage; - LLButton* mReplyBtn; }; #endif // LLTOASTIMPANEL_H_ diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index 1e570bf207..ccd754ac5e 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" - height="175" + height="152" label="im_panel" layout="topleft" left="0" @@ -83,13 +83,4 @@ width="285" word_wrap="true" max_length="350" /> - <button - follows="bottom" - height="23" - label="Reply" - layout="topleft" - left="100" - name="reply" - top="144" - width="100" /> </panel> |