summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2012-11-01 20:22:55 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2012-11-01 20:22:55 +0200
commitb9116764a97dfdccf803315c8c3b0d29fa3ce654 (patch)
treeedeeb2af6d1a2bec9ed562edc224f448c0645940 /indra/newview/llimconversation.cpp
parent51cabb2089244f170b307b436e0014a872a145ed (diff)
parent424a80155ac755bc0191ddd44ef125bdbda39fa5 (diff)
merging into latest changes
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r--indra/newview/llimconversation.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index 74bf8cb6fe..b687e18cae 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -116,6 +116,55 @@ LLIMConversation* LLIMConversation::getConversation(const LLUUID& uuid)
return conv;
};
+void LLIMConversation::setVisible(BOOL visible)
+{
+ LLTransientDockableFloater::setVisible(visible);
+
+ if(visible)
+ {
+ LLIMConversation::addToHost(mSessionID);
+ }
+ setFocus(visible);
+}
+
+
+
+void LLIMConversation::addToHost(const LLUUID& session_id)
+{
+ if ((session_id.notNull() && !gIMMgr->hasSession(session_id))
+ || !LLIMConversation::isChatMultiTab())
+ {
+ return;
+ }
+
+ // Get the floater: this will create the instance if it didn't exist
+ LLIMConversation* conversp = LLIMConversation::getConversation(session_id);
+ if (conversp)
+ {
+ LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance();
+
+ // Do not add again existing floaters
+ if (floater_container && !conversp->isHostAttached())
+ {
+ conversp->setHostAttached(true);
+
+ if (!conversp->isNearbyChat()
+ || gSavedSettings.getBOOL("NearbyChatIsNotTornOff"))
+ {
+ floater_container->addFloater(conversp, TRUE, LLTabContainer::END);
+ }
+ else
+ {
+ // setting of the "potential" host for Nearby Chat: this sequence sets
+ // LLFloater::mHostHandle = NULL (a current host), but
+ // LLFloater::mLastHostHandle = floater_container (a "future" host)
+ conversp->setHost(floater_container);
+ conversp->setHost(NULL);
+ }
+
+ }
+ }
+}
BOOL LLIMConversation::postBuild()
{