diff options
author | James Cook <james@lindenlab.com> | 2009-12-18 10:50:29 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-12-18 10:50:29 -0800 |
commit | eb501f3231aacb2fd97d8428bb2d25b818b26263 (patch) | |
tree | 85a58ed7942c2b96b3e03c9e4dbd8237423e7696 /indra/newview/llchiclet.cpp | |
parent | b0fd284fbf72ef3a38ea64a61f8d5fe3e2e314b7 (diff) | |
parent | ad6d0e3bb766c737b1e9bbd9d006391cc8bcc085 (diff) |
Merge, pulling in viewer-2-0
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c7f77810df..c6fe076911 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -250,8 +250,7 @@ LLIMWellChiclet::~LLIMWellChiclet() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages(); - setCounter(total_unread); + setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); } /************************************************************************/ @@ -1529,6 +1528,21 @@ bool LLChicletPanel::isAnyIMFloaterDoked() return res; } +S32 LLChicletPanel::getTotalUnreadIMCount() +{ + S32 count = 0; + chiclet_list_t::const_iterator it = mChicletList.begin(); + for( ; mChicletList.end() != it; ++it) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); + if(chiclet) + { + count += chiclet->getCounter(); + } + } + return count; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// |