diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-11 09:19:20 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-11 09:19:20 +0000 |
commit | 1b1dd127a4329cc7fed9d36608f4fc04ff056843 (patch) | |
tree | 7c998ab7f4037aee8446817293bedafffd7958c2 /indra/newview/llimfloatercontainer.cpp | |
parent | 6d738f25d9be0f4b576c8a55e9091ced589daf71 (diff) | |
parent | a618a3913af506878adf59a2c5b5fb12e665e35b (diff) |
merge.
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index d518318b0e..9eb11a6ac4 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -96,8 +96,29 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLUUID session_id = floaterp->getKey(); - floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - mSessions[session_id] = floaterp; + LLIconCtrl* icon = 0; + + if(gAgent.isInGroup(session_id, TRUE)) + { + LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); + icon_params.group_id = session_id; + icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params); + + mSessions[session_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); + } + else + { + LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id); + + LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>(); + icon_params.avatar_id = avatar_id; + icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params); + + mSessions[session_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); + } + mTabContainer->setTabImage(floaterp, icon); } void LLIMFloaterContainer::onCloseFloater(LLUUID& id) @@ -134,6 +155,8 @@ void LLIMFloaterContainer::setMinimized(BOOL b) if (isMinimized() == b) return; LLMultiFloater::setMinimized(b); + // Hide minimized floater (see EXT-5315) + setVisible(!b); if (isMinimized()) return; |