summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-11-23 17:47:40 +0200
committerMike Antipov <mantipov@productengine.com>2009-11-23 17:47:40 +0200
commitfb3b6145a880119999b66312275b1448da8a7e14 (patch)
treee2b80e830fbed3092f74a9d570437d26de62d42a /indra/newview
parent11ef9f3d41a2e628e1ded8dcb0a306fe328ae0ce (diff)
Work on normal task EXT-2640 (Create a tabbed IM multifloater)
- disable adding torn off IM Floaters into container when chiclet is clicked --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimfloater.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index d789139aa8..38a9fec192 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -326,7 +326,11 @@ void LLIMFloater::onSlide()
//static
LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
{
-#ifndef USE_IM_CONTAINER
+#ifdef USE_IM_CONTAINER
+ LLIMFloater* target_floater = findInstance(session_id);
+ bool not_existed = NULL == target_floater;
+
+#else
//hide all
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("impanel");
for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin();
@@ -346,14 +350,16 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
floater->mInputEditor->setFocus(TRUE);
#ifdef USE_IM_CONTAINER
+ // do not add existed floaters to avoid adding torn off instances
+ if (not_existed)
+ {
+ // LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
+ // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists
+ LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END;
-// LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END;
- // TODO: mantipov: use LLTabContainer::RIGHT_OF_CURRENT if it exists
- LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END;
-
- // *TODO: mantipov: validate if floater was torn off. In this case it's no necessary to show container
- LLIMFloaterContainer* floater_container = LLFloaterReg::showTypedInstance<LLIMFloaterContainer>("im_container");
- floater_container->addFloater(floater, TRUE, i_pt);
+ LLIMFloaterContainer* floater_container = LLFloaterReg::showTypedInstance<LLIMFloaterContainer>("im_container");
+ floater_container->addFloater(floater, TRUE, i_pt);
+ }
#else
if (floater->getDockControl() == NULL)
{