diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-21 04:58:23 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-21 04:58:23 +0000 |
commit | 6f41747bc4d8afcb2b19ac02295575031bcf9021 (patch) | |
tree | 1e83d8fcf7af6b9416b49bb46cb9e7cf15abffbc /indra/newview/llimfloater.cpp | |
parent | 57fca109cae3105b6bc1319e9886c16631bc7374 (diff) |
Merging revisions 2112-2128 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry
* Bugs: EXT-1605 EXT-1506 EXT-1663 EXT-1616 EXT-1599 EXT-1587
* Dev: EXT-748 EXT-1447
* IM Cleanup
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 452943007d..8f0186ce24 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -83,13 +83,20 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) } } +void LLIMFloater::onFocusLost() +{ + LLIMModel::getInstance()->resetActiveSessionID(); +} + +void LLIMFloater::onFocusReceived() +{ + LLIMModel::getInstance()->setActiveSessionID(mSessionID); +} + // virtual void LLIMFloater::onClose(bool app_quitting) { - LLIMModel::instance().sendLeaveSession(mSessionID, mOtherParticipantUUID); - - //*TODO - move to the IMModel::sendLeaveSession() for the integrity (IB) - gIMMgr->removeSession(mSessionID); + gIMMgr->leaveSession(mSessionID); } /* static */ @@ -114,6 +121,23 @@ void LLIMFloater::newIMCallback(const LLSD& data){ } } +void LLIMFloater::onVisibilityChange(const LLSD& new_visibility) +{ + bool visible = new_visibility.asBoolean(); + + LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID); + + if (visible && voice_channel && + voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED) + { + LLFloaterReg::showInstance("voice_call", mSessionID); + } + else + { + LLFloaterReg::hideInstance("voice_call", mSessionID); + } +} + void LLIMFloater::onSendMsg( LLUICtrl* ctrl, void* userdata ) { LLIMFloater* self = (LLIMFloater*) userdata; |