summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp52
1 files changed, 18 insertions, 34 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index ba034609e9..2f248f3596 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -93,7 +93,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
LLIconCtrl* icon = 0;
- if(gAgent.isInGroup(session_id))
+ if(gAgent.isInGroup(session_id, TRUE))
{
LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>();
icon_params.group_id = session_id;
@@ -110,8 +110,8 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
icon_params.avatar_id = avatar_id;
icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params);
- mSessions[avatar_id] = floaterp;
- floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id));
+ mSessions[session_id] = floaterp;
+ floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id));
}
mTabContainer->setTabImage(floaterp, icon);
}
@@ -121,39 +121,9 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id)
mSessions.erase(id);
}
-void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type)
-{
- if (APT_PROPERTIES == type)
- {
- LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data);
- if (avatar_data)
- {
- LLUUID avatar_id = avatar_data->avatar_id;
- LLUUID* cached_avatarId = LLAvatarIconIDCache::getInstance()->get(avatar_id);
- if(cached_avatarId && cached_avatarId->notNull() && avatar_data->image_id != *cached_avatarId)
- {
- LLAvatarIconIDCache::getInstance()->add(avatar_id,avatar_data->image_id);
- mTabContainer->setTabImage(get_ptr_in_map(mSessions, avatar_id), avatar_data->image_id);
- }
- }
- }
-}
-
-void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc)
-{
- if (GC_PROPERTIES == gc)
- {
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id);
- if (group_data && group_data->mInsigniaID.notNull())
- {
- mTabContainer->setTabImage(get_ptr_in_map(mSessions, group_id), group_data->mInsigniaID);
- }
- }
-}
-
void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)
{
- LLUUID session_id = data["from_id"].asUUID();
+ LLUUID session_id = data["session_id"].asUUID();
LLFloater* floaterp = get_ptr_in_map(mSessions, session_id);
LLFloater* current_floater = LLMultiFloater::getActiveFloater();
@@ -175,4 +145,18 @@ LLIMFloaterContainer* LLIMFloaterContainer::getInstance()
return LLFloaterReg::getTypedInstance<LLIMFloaterContainer>("im_container");
}
+void LLIMFloaterContainer::setMinimized(BOOL b)
+{
+ if (isMinimized() == b) return;
+
+ LLMultiFloater::setMinimized(b);
+
+ if (isMinimized()) return;
+
+ if (getActiveFloater())
+ {
+ getActiveFloater()->setVisible(TRUE);
+ }
+}
+
// EOF