Fixed normal bug EXT-1509 "Going into mouselook while in a private call

ruins the call floater.":
- Made callfloater a single instance floater.
- Updated floater IM panel visibility change logic.
- Added NULL checks for voice client pointers in LLFloaterIMPanel.

--HG--
branch : product-engine
meow-7.2.2
Sergei Litovchuk 2009-11-06 22:13:59 +02:00
parent 591d9d5c2b
commit 9c55ff9390
1 changed files with 10 additions and 4 deletions

View File

@ -321,6 +321,9 @@ void LLFloaterIMPanel::draw()
// hide/show start call and end call buttons
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
if (!voice_channel)
return;
childSetVisible("end_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED);
childSetVisible("start_call_btn", LLVoiceClient::voiceEnabled() && voice_channel->getState() < LLVoiceChannel::STATE_CALL_STARTED);
childSetEnabled("start_call_btn", enable_connect);
@ -770,10 +773,13 @@ void LLFloaterIMPanel::onVisibilityChange(const LLSD& new_visibility)
}
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionUUID);
if (new_visibility.asBoolean() && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
LLFloaterReg::showInstance("voice_call", mSessionUUID);
else
LLFloaterReg::hideInstance("voice_call", mSessionUUID);
if (voice_channel && voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
{
if (new_visibility.asBoolean())
LLFloaterReg::showInstance("voice_call", mSessionUUID);
else
LLFloaterReg::hideInstance("voice_call", mSessionUUID);
}
}
void LLFloaterIMPanel::sendMsg()