summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-03 20:44:00 -0700
committerMerov Linden <merov@lindenlab.com>2012-11-03 20:44:00 -0700
commit7c7cc56b037f05f148a7215d0c5f567989a0c012 (patch)
tree11afb3864d36de63ccd2b1dffa7ba2daebd82e9f /indra/newview/llimconversation.cpp
parentb6ad7db0d61033425a4f65270731023afe74ecce (diff)
parent3b39ec165aa837d02bf1bf57ff8f3aab3229659c (diff)
Pull merge from richard/viewer-chui
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 a6a246a01e..920666ef90 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -119,6 +119,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()
{