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.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 56648d09b5..fa0750c39c 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -45,6 +45,7 @@
#include "lltransientfloatermgr.h"
#include "llviewercontrol.h"
#include "llconversationview.h"
+#include "llcallbacklist.h"
//
// LLIMFloaterContainer
@@ -65,6 +66,8 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
LLIMFloaterContainer::~LLIMFloaterContainer()
{
+ gIdleCallbacks.deleteFunction(idle, this);
+
mNewMessageConnection.disconnect();
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
@@ -139,6 +142,9 @@ BOOL LLIMFloaterContainer::postBuild()
LLAvatarNameCache::addUseDisplayNamesCallback(
boost::bind(&LLIMConversation::processChatHistoryStyleUpdate));
+ // Add callback: we'll take care of view updates on idle
+ gIdleCallbacks.addFunction(idle, this);
+
return TRUE;
}
@@ -290,6 +296,13 @@ void LLIMFloaterContainer::setMinimized(BOOL b)
}
}
+//static
+void LLIMFloaterContainer::idle(void* user_data)
+{
+ LLIMFloaterContainer* panel = (LLIMFloaterContainer*)user_data;
+ panel->mConversationsRoot->update();
+}
+
void LLIMFloaterContainer::draw()
{
// CHUI Notes
@@ -579,7 +592,7 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
}
if (!item)
{
- llinfos << "Merov debug : Couldn't create conversation session item : " << display_name << llendl;
+ llwarns << "Couldn't create conversation session item : " << display_name << llendl;
return;
}
// *TODO: Should we flag LLConversationItemSession with a mIsNearbyChat?
@@ -602,7 +615,6 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
// Note: usually, we do not get an updated avatar list at that point
LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = item->getChildrenBegin();
LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = item->getChildrenEnd();
- llinfos << "Merov debug : create participant, children size = " << item->getChildrenCount() << llendl;
while (current_participant_model != end_participant_model)
{
LLConversationItem* participant_model = dynamic_cast<LLConversationItem*>(*current_participant_model);