diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-24 20:08:36 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-24 20:08:36 -0700 |
commit | b5d76c2b55666083279580f383e5a7b139517504 (patch) | |
tree | cb3c27bf3ce0ec48d628a8f08f65c6cfb0c4d48a /indra | |
parent | 853826efccfea704eb22276dd63c9155a3f77ac1 (diff) |
CHUI-441 : WIP : Fix the initial attach code so to allow creation of the conversation item before the dialog
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimfloater.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 9 |
2 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 9f7b3cd50b..8fbf691897 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -586,13 +586,9 @@ void LLIMFloater::addToHost(const LLUUID& session_id, const bool force) { if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id)) { - llinfos << "Merov debug : addToHost, not added! multitab = " << LLIMConversation::isChatMultiTab() << ", has session = " << gIMMgr->hasSession(session_id) << llendl; return; } - // Test the existence of the floater before we try to create it - bool exist = findInstance(session_id); - // Get the floater: this will create the instance if it didn't exist LLIMFloater* floater = getInstance(session_id); if (floater) @@ -600,10 +596,8 @@ void LLIMFloater::addToHost(const LLUUID& session_id, const bool force) LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); - llinfos << "Merov debug : addToHost, done! exist = " << exist << llendl; - - // Do not add again existing floaters - if (!exist) + // Do not attach to the IM container if it's already attached + if (!getFloaterHost()) { // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 9d9d49f497..11d8b29884 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -98,10 +98,10 @@ LLIMFloaterContainer::~LLIMFloaterContainer() void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - llinfos << "Merov debug : sessionAdded, adding LLIMFloater, id = " << session_id << llendl; - LLIMFloater::addToHost(session_id, true); llinfos << "Merov debug : sessionAdded, adding conversation item, id = " << session_id << llendl; addConversationListItem(session_id, true); + llinfos << "Merov debug : sessionAdded, adding LLIMFloater, id = " << session_id << llendl; + LLIMFloater::addToHost(session_id, true); } void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) @@ -111,10 +111,10 @@ void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std: void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) { - llinfos << "Merov debug : sessionVoiceOrIMStarted, adding LLIMFloater, id = " << session_id << llendl; - LLIMFloater::addToHost(session_id, true); llinfos << "Merov debug : sessionVoiceOrIMStarted, adding conversation item, id = " << session_id << llendl; addConversationListItem(session_id, true); + llinfos << "Merov debug : sessionVoiceOrIMStarted, adding LLIMFloater, id = " << session_id << llendl; + LLIMFloater::addToHost(session_id, true); } void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) @@ -1195,7 +1195,6 @@ LLConversationItem* LLIMFloaterContainer::addConversationListItem(const LLUUID& } 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 NULL; } |