diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-18 17:41:01 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-18 17:41:01 +0200 |
commit | 5dfc8d4c84d2f3d14b08988f2af4e5b14fc47a72 (patch) | |
tree | 3d757eca2107a93db7ad6d87b9b5068d90d566d9 /indra/newview/llsyswellwindow.cpp | |
parent | f7fadaa807a0652df1da41ac69ab069273605965 (diff) | |
parent | a09c2ba7ac798386b462745774d01c75102beaaf (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 3769ddb1cc..1aeafaea5a 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -350,6 +350,8 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } // Initialize chiclet. + mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2)); + mChiclet->enableCounterControl(true); mChiclet->setCounter(chicletCounter); mChiclet->setSessionId(sessionId); mChiclet->setIMSessionName(name); @@ -364,6 +366,16 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } //--------------------------------------------------------------------------------- +void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) +{ + LLTextBox* text = getChild<LLTextBox>("contact_name"); + S32 new_text_left = mChiclet->getRect().mRight + CHICLET_HPAD; + LLRect text_rect = text->getRect(); + text_rect.mLeft = new_text_left; + text->setRect(text_rect); +} + +//--------------------------------------------------------------------------------- LLIMWellWindow::RowPanel::~RowPanel() { } @@ -610,6 +622,23 @@ void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) } } +void LLNotificationWellWindow::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector<LLPanel*> items; + mMessageList->getItems(items); + for (std::vector<LLPanel*>::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLSysWellItem* sys_well_item = dynamic_cast<LLSysWellItem*>(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } +} + ////////////////////////////////////////////////////////////////////////// // PRIVATE METHODS void LLNotificationWellWindow::initChannel() |