Skip to content
Snippets Groups Projects
Commit 81487c2a authored by Paul Guslisty's avatar Paul Guslisty
Browse files

Fxed normal bug EXT - 4106 (Tabbed IM floater isn't highlighting labels when new IMs are received)

--HG--
branch : product-engine
parent 61609d93
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,7 @@ LLIMFloaterContainer::~LLIMFloaterContainer(){} ...@@ -52,6 +52,7 @@ LLIMFloaterContainer::~LLIMFloaterContainer(){}
BOOL LLIMFloaterContainer::postBuild() 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 // 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() // mTabContainer will be initialized in LLMultiFloater::addChild()
return TRUE; return TRUE;
...@@ -162,6 +163,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID id) ...@@ -162,6 +163,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID id)
{ {
LLAvatarPropertiesProcessor::instance().removeObserver(id, this); LLAvatarPropertiesProcessor::instance().removeObserver(id, this);
LLGroupMgr::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() LLIMFloaterContainer* LLIMFloaterContainer::findInstance()
......
...@@ -66,10 +66,12 @@ class LLIMFloaterContainer : public LLMultiFloater, public LLAvatarPropertiesObs ...@@ -66,10 +66,12 @@ class LLIMFloaterContainer : public LLMultiFloater, public LLAvatarPropertiesObs
static LLIMFloaterContainer* getInstance(); static LLIMFloaterContainer* getInstance();
private: private:
typedef std::map<LLUUID,LLPanel*> avatarID_panel_map_t; typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions; avatarID_panel_map_t mSessions;
void onCloseFloater(LLUUID avatar_id); void onCloseFloater(LLUUID avatar_id);
void onNewMessageReceived(const LLSD& data);
}; };
#endif // LL_LLIMFLOATERCONTAINER_H #endif // LL_LLIMFLOATERCONTAINER_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment