diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-04-19 17:21:16 +0300 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-04-19 17:21:16 +0300 |
commit | d57e8ecc7e119ca6930499ee270f438fc5ec415a (patch) | |
tree | 16e50c507e0adac9b046309d3241b3f87510f740 /indra/newview/lltoast.cpp | |
parent | eddb964e701d43e6d5135fd82e8c065a43e4a0e5 (diff) |
fixed EXT-6848 Avoid creation of dummy objects in LLOnlineStatusToast and LLPanelGenericTip classes.
* decoupled tip toast panel related logic from class LLTast;
* moved documentation comment of LLPanelGenericTip constructor from .cpp to .h file;
* corrected name attribute in panel_generic_tip.xml;
reviewed by Mike Antipov and Vadim Savchuk at https://codereview.productengine.com/secondlife/r/230/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r-- | indra/newview/lltoast.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 911ed6ade7..22b12ee132 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -119,30 +119,10 @@ BOOL LLToast::postBuild() mTimer->stop(); } - if (mIsTip) - { - mTextEditor = mPanel->getChild<LLTextEditor>("text_editor_box"); - - if (mTextEditor) - { - mTextEditor->setMouseUpCallback(boost::bind(&LLToast::hide,this)); - mPanel->setMouseUpCallback(boost::bind(&LLToast::handleTipToastClick, this, _2, _3, _4)); - } - } - return TRUE; } //-------------------------------------------------------------------------- -void LLToast::handleTipToastClick(S32 x, S32 y, MASK mask) -{ - if (!mTextEditor->getRect().pointInRect(x, y)) - { - hide(); - } -} - -//-------------------------------------------------------------------------- void LLToast::setHideButtonEnabled(bool enabled) { if(mHideBtn) @@ -421,4 +401,13 @@ bool LLToast::isNotificationValid() //-------------------------------------------------------------------------- +S32 LLToast::notifyParent(const LLSD& info) +{ + if (info.has("action") && "hide_toast" == info["action"].asString()) + { + hide(); + return 1; + } + return LLModalDialog::notifyParent(info); +} |