diff options
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 913e46e05e..d401943020 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -55,8 +55,21 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mUserName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; + mNotification = p.notification; - mReplyBtn->setClickedCallback(boost::bind(&LLToastIMPanel::onClickReplyBtn, this)); + // if message comes from the system - there shouldn't be a reply btn + if(p.from == "Second Life") + { + mReplyBtn->setVisible(FALSE); + S32 btn_height = mReplyBtn->getRect().getHeight(); + LLRect msg_rect = mMessage->getRect(); + msg_rect.setLeftTopAndSize(msg_rect.mLeft, msg_rect.mTop, msg_rect.getWidth(), msg_rect.getHeight() + btn_height); + mMessage->setRect(msg_rect); + } + else + { + mReplyBtn->setClickedCallback(boost::bind(&LLToastIMPanel::onClickReplyBtn, this)); + } S32 maxLinesCount; std::istringstream ss( getString("message_max_lines_count") ); @@ -75,7 +88,9 @@ LLToastIMPanel::~LLToastIMPanel() //-------------------------------------------------------------------------- void LLToastIMPanel::onClickReplyBtn() { - LLIMFloater::toggle(mSessionID); + LLSD response = mNotification->getResponseTemplate(); + response["respondbutton"] = true; + mNotification->respond(response); } //-------------------------------------------------------------------------- |