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.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 480f964939..faca92e662 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
@@ -66,6 +67,8 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
LLIMFloaterContainer::~LLIMFloaterContainer()
{
+ gIdleCallbacks.deleteFunction(idle, this);
+
mNewMessageConnection.disconnect();
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
@@ -150,6 +153,10 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsPane->handleReshape(list_size, TRUE);
}
mInitialized = true;
+
+ // Add callback: we'll take care of view updates on idle
+ gIdleCallbacks.addFunction(idle, this);
+
return TRUE;
}
@@ -301,6 +308,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
@@ -356,6 +370,8 @@ void LLIMFloaterContainer::draw()
}
}
+ repositioningWidgets();
+
if (mTabContainer->getTabCount() == 0)
{
// Do not close the container when every conversation is torn off because the user
@@ -363,8 +379,6 @@ void LLIMFloaterContainer::draw()
collapseMessagesPane(true);
}
LLFloater::draw();
-
- repositioningWidgets();
}
void LLIMFloaterContainer::tabClose()
@@ -600,7 +614,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?
@@ -623,7 +637,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);