From 81487c2a4c05042b35da114037068f478035a76a Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 2 Feb 2010 14:33:38 +0200 Subject: Fxed normal bug EXT - 4106 (Tabbed IM floater isn't highlighting labels when new IMs are received) --HG-- branch : product-engine --- indra/newview/llimfloatercontainer.cpp | 16 ++++++++++++++++ indra/newview/llimfloatercontainer.h | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 784c2eaaf9..22eb9a51d2 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -52,6 +52,7 @@ LLIMFloaterContainer::~LLIMFloaterContainer(){} BOOL LLIMFloaterContainer::postBuild() { + LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1)); // Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button // mTabContainer will be initialized in LLMultiFloater::addChild() return TRUE; @@ -162,6 +163,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID id) { LLAvatarPropertiesProcessor::instance().removeObserver(id, this); LLGroupMgr::instance().removeObserver(id, this); + +} + +void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) +{ + LLUUID session_id = data["from_id"].asUUID(); + LLFloater* floaterp = get_ptr_in_map(mSessions, session_id); + LLFloater* current_floater = LLMultiFloater::getActiveFloater(); + + if(floaterp && current_floater && floaterp != current_floater) + { + if(LLMultiFloater::isFloaterFlashing(floaterp)) + LLMultiFloater::setFloaterFlashing(floaterp, FALSE); + LLMultiFloater::setFloaterFlashing(floaterp, TRUE); + } } LLIMFloaterContainer* LLIMFloaterContainer::findInstance() diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index e4a32dbe1d..bc06f0cbd3 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -66,10 +66,12 @@ public: static LLIMFloaterContainer* getInstance(); private: - typedef std::map avatarID_panel_map_t; + typedef std::map avatarID_panel_map_t; avatarID_panel_map_t mSessions; void onCloseFloater(LLUUID avatar_id); + + void onNewMessageReceived(const LLSD& data); }; #endif // LL_LLIMFLOATERCONTAINER_H -- cgit v1.2.3