diff options
author | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-10 15:25:39 +0200 |
---|---|---|
committer | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-11-10 15:25:39 +0200 |
commit | 60a7a1d891b5c019aa6fc0f7d54046976f31a9f3 (patch) | |
tree | b6f5e619f7cb19e907545a4a3480721f3bcffdb8 /indra/newview/llpanelimcontrolpanel.cpp | |
parent | 7dabb3c46e6cdf208ce7dc46b89f431a247d6ba6 (diff) |
Implemented Sub-task EXT-2214-Refactor IM Control Panels
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index c9168670d5..6479f46283 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -86,10 +86,8 @@ void LLPanelChatControlPanel::draw() bool session_initialized = session->mSessionInitialized; bool callback_enabled = session->mCallBackEnabled; - LLViewerRegion* region = gAgent.getRegion(); - BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "") - && session_initialized + BOOL enable_connect = session_initialized && voice_enabled && callback_enabled; childSetEnabled("call_btn", enable_connect); @@ -190,7 +188,8 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str } } -LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id) +LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id): +mParticipantList(NULL) { mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id); } @@ -199,9 +198,6 @@ BOOL LLPanelGroupControlPanel::postBuild() { childSetAction("group_info_btn", boost::bind(&LLPanelGroupControlPanel::onGroupInfoButtonClicked, this)); - mAvatarList = getChild<LLAvatarList>("speakers_list"); - mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList); - return LLPanelChatControlPanel::postBuild(); } @@ -214,6 +210,8 @@ LLPanelGroupControlPanel::~LLPanelGroupControlPanel() // virtual void LLPanelGroupControlPanel::draw() { + //Remove event does not raised until speakerp->mActivityTimer.hasExpired() is false, see LLSpeakerManager::update() + //so we need update it to raise needed event mSpeakerManager->update(true); LLPanelChatControlPanel::draw(); } @@ -241,7 +239,7 @@ void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata) void LLPanelGroupControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { LLPanelChatControlPanel::onVoiceChannelStateChanged(old_state, new_state); - mAvatarList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED); + mParticipantList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED); } void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) @@ -249,6 +247,10 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) LLPanelChatControlPanel::setSessionId(session_id); mGroupID = LLIMModel::getInstance()->getOtherParticipantID(session_id); + + if(!mParticipantList) + mParticipantList = new LLParticipantList(LLIMModel::getInstance()->getSpeakerManager(session_id), + getChild<LLAvatarList>("speakers_list")); } @@ -258,9 +260,7 @@ LLPanelAdHocControlPanel::LLPanelAdHocControlPanel(const LLUUID& session_id):LLP BOOL LLPanelAdHocControlPanel::postBuild() { - mAvatarList = getChild<LLAvatarList>("speakers_list"); - mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList); - + //We don't need LLPanelGroupControlPanel::postBuild() to be executed as there is no group_info_btn at AdHoc chat return LLPanelChatControlPanel::postBuild(); } |