summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-09-28 19:40:17 +0300
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-09-28 19:40:17 +0300
commit507b66aeb1614a1293890ffacbab53ccecc25e20 (patch)
treeec0719316d47312aec2dedf1388abfcc615d4386 /indra/newview/llimfloater.cpp
parent4a41aa8fad7f4a0c1daab5d159920745a03a5950 (diff)
CHUI-349 (Crash when clicking on nearby chat toast):
removed a faulty method LLIMFloater::addToIMContainer; replaced it's calls to calls of its correct twin - LLIMFloater::addToHost
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp47
1 files changed, 17 insertions, 30 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 43adfdfd08..d11504d312 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -582,13 +582,14 @@ void LLIMFloater::onParticipantsListChanged(LLUICtrl* ctrl)
build_names_string(temp_uuids, ui_title);
updateSessionName(ui_title, ui_title);
}
- }
+}
-//static
-LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id)
+void LLIMFloater::addToHost(const LLUUID& session_id, const bool force)
{
- if (!gIMMgr->hasSession(session_id))
- return NULL;
+ if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id))
+ {
+ return;
+ }
// Test the existence of the floater before we try to create it
bool exist = findInstance(session_id);
@@ -612,19 +613,22 @@ LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id)
}
}
- if (floater_container && floater_container->getVisible())
+ if (force)
{
- floater->openFloater(floater->getKey());
- floater->setVisible(TRUE);
- }
- else
- {
- floater->setVisible(FALSE);
+ if (floater_container && floater_container->getVisible())
+ {
+ floater->openFloater(floater->getKey());
+ floater->setVisible(TRUE);
+ }
+ else
+ {
+ floater->setVisible(FALSE);
+ }
}
}
- return floater;
}
+
//static
LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
{
@@ -1323,23 +1327,6 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id )
{
LLIMFloater::addToHost(session_id);
}
-void LLIMFloater::addToHost(const LLUUID& session_id)
- {
- if (LLIMConversation::isChatMultiTab())
-{
- LLIMFloaterContainer* im_box = LLIMFloaterContainer::findInstance();
- if (!im_box)
- {
- im_box = LLIMFloaterContainer::getInstance();
- }
-
- if (im_box && !LLIMFloater::findInstance(session_id))
- {
- LLIMFloater* new_tab = LLIMFloater::getInstance(session_id);
- im_box->addFloater(new_tab, FALSE, LLTabContainer::END);
- }
- }
-}
boost::signals2::connection LLIMFloater::setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb)
{