CHUI-520: Now when have a P2P conversation torn off a voice indicator icon will be displayed allowing the user to adjust the voice volume when clicked. Also did a code cleanup on conversationview.h/cpp which was showing the speaking indicator icon too soon when joining another voice session. This was due to calling switchIndicator(..) directly inside ::onCurrentVoiceSessionChanged. The proper solution is to wait for SpeeakingIndicatorManager::switchSpeakerIndicators() call switchIndicators().
parent
177737fa34
commit
68b61bdec6
|
|
@ -341,14 +341,6 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi
|
|||
if (vmi)
|
||||
{
|
||||
bool is_active = vmi->getUUID() == session_id;
|
||||
bool is_nearby = vmi->getType() == LLConversationItem::CONV_SESSION_NEARBY;
|
||||
|
||||
if (is_nearby)
|
||||
{
|
||||
mSpeakingIndicator->setSpeakerId(is_active ? gAgentID : LLUUID::null);
|
||||
}
|
||||
|
||||
mSpeakingIndicator->switchIndicator(is_active);
|
||||
mCallIconLayoutPanel->setVisible(is_active);
|
||||
}
|
||||
}
|
||||
|
|
@ -409,7 +401,6 @@ BOOL LLConversationViewParticipant::postBuild()
|
|||
mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this));
|
||||
mInfoBtn->setVisible(false);
|
||||
|
||||
mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewParticipant::onCurrentVoiceSessionChanged, this, _1));
|
||||
mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
|
||||
|
||||
if (!sStaticInitialized)
|
||||
|
|
@ -479,21 +470,6 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
|
|||
return arranged;
|
||||
}
|
||||
|
||||
void LLConversationViewParticipant::onCurrentVoiceSessionChanged(const LLUUID& session_id)
|
||||
{
|
||||
LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem());
|
||||
|
||||
if (participant_model)
|
||||
{
|
||||
LLConversationItemSession* parent_session = participant_model->getParentSession();
|
||||
if (parent_session)
|
||||
{
|
||||
bool is_active = (parent_session->getUUID() == session_id);
|
||||
mSpeakingIndicator->switchIndicator(is_active);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLConversationViewParticipant::refresh()
|
||||
{
|
||||
// Refresh the participant view from its model data
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ protected:
|
|||
void onInfoBtnClick();
|
||||
|
||||
private:
|
||||
void onCurrentVoiceSessionChanged(const LLUUID& session_id);
|
||||
|
||||
LLAvatarIconCtrl* mAvatarIcon;
|
||||
LLButton * mInfoBtn;
|
||||
|
|
|
|||
|
|
@ -101,6 +101,24 @@ void LLFloaterIMSession::refresh()
|
|||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterIMSession::onTearOffClicked()
|
||||
{
|
||||
LLFloaterIMSessionTab::onTearOffClicked();
|
||||
|
||||
if(mIsP2PChat)
|
||||
{
|
||||
if(isTornOff())
|
||||
{
|
||||
mSpeakingIndicator->setSpeakerId(mOtherParticipantUUID, mSessionID);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSpeakingIndicator->setSpeakerId(LLUUID::null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterIMSession::onClickCloseBtn()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ private:
|
|||
|
||||
/*virtual*/ void refresh();
|
||||
|
||||
/*virtual*/ void onTearOffClicked();
|
||||
/*virtual*/ void onClickCloseBtn();
|
||||
|
||||
// Update the window title and input field help text
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
|
|||
, mSessionID(session_id.asUUID())
|
||||
, mConversationsRoot(NULL)
|
||||
, mScroller(NULL)
|
||||
, mSpeakingIndicator(NULL)
|
||||
, mChatHistory(NULL)
|
||||
, mInputEditor(NULL)
|
||||
, mInputEditorTopPad(0)
|
||||
|
|
@ -206,6 +207,8 @@ BOOL LLFloaterIMSessionTab::postBuild()
|
|||
mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
|
||||
mScroller->setFollowsAll();
|
||||
|
||||
mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
|
||||
|
||||
// Insert that scroller into the panel widgets hierarchy
|
||||
mParticipantListPanel->addChild(mScroller);
|
||||
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ protected:
|
|||
LLFolderView* mConversationsRoot;
|
||||
LLScrollContainer* mScroller;
|
||||
|
||||
LLOutputMonitorCtrl* mSpeakingIndicator;
|
||||
LLChatHistory* mChatHistory;
|
||||
LLChatEntry* mInputEditor;
|
||||
int mInputEditorTopPad; // padding between input field and chat history
|
||||
|
|
|
|||
|
|
@ -260,6 +260,8 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s
|
|||
if (speaker_id.isNull() && mSpeakerId.notNull())
|
||||
{
|
||||
LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
|
||||
switchIndicator(false);
|
||||
mSpeakerId = speaker_id;
|
||||
}
|
||||
|
||||
if (speaker_id.isNull() || (speaker_id == mSpeakerId))
|
||||
|
|
|
|||
|
|
@ -106,6 +106,18 @@
|
|||
name="voice_call_btn"
|
||||
tool_tip="Open voice connection"
|
||||
width="31"/>
|
||||
<output_monitor
|
||||
auto_update="true"
|
||||
follows="top|left"
|
||||
draw_border="false"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
top="10"
|
||||
left_pad="10"
|
||||
mouse_opaque="true"
|
||||
name="speaking_indicator"
|
||||
visible="false"
|
||||
width="20" />
|
||||
<button
|
||||
follows="right|top"
|
||||
height="25"
|
||||
|
|
|
|||
Loading…
Reference in New Issue