diff options
author | Jacek Antonelli | 2009-02-12 02:06:41 -0600 |
---|---|---|
committer | Jacek Antonelli | 2009-02-12 02:06:45 -0600 |
commit | 61f97b33f9850d21965d397b947a298c16ba576d (patch) | |
tree | a2edff0a7fbc83e2259eda952511b0fbdbea290b /linden/indra/newview/llfloateractivespeakers.cpp | |
parent | Second Life viewer sources 1.22.7-RC (diff) | |
download | meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.zip meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.gz meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.bz2 meta-impy-61f97b33f9850d21965d397b947a298c16ba576d.tar.xz |
Second Life viewer sources 1.22.8-RC
Diffstat (limited to 'linden/indra/newview/llfloateractivespeakers.cpp')
-rw-r--r-- | linden/indra/newview/llfloateractivespeakers.cpp | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index be0e88f..0a19fb2 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp | |||
@@ -547,7 +547,8 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
547 | && gVoiceClient->getVoiceEnabled(selected_id) | 547 | && gVoiceClient->getVoiceEnabled(selected_id) |
548 | && selected_id.notNull() | 548 | && selected_id.notNull() |
549 | && selected_id != gAgent.getID() | 549 | && selected_id != gAgent.getID() |
550 | && (selected_speakerp.notNull() && selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT)); | 550 | && (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL))); |
551 | |||
551 | } | 552 | } |
552 | if (mMuteTextCtrl) | 553 | if (mMuteTextCtrl) |
553 | { | 554 | { |
@@ -555,6 +556,7 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
555 | mMuteTextCtrl->setEnabled(selected_id.notNull() | 556 | mMuteTextCtrl->setEnabled(selected_id.notNull() |
556 | && selected_id != gAgent.getID() | 557 | && selected_id != gAgent.getID() |
557 | && selected_speakerp.notNull() | 558 | && selected_speakerp.notNull() |
559 | && selected_speakerp->mType != LLSpeaker::SPEAKER_EXTERNAL | ||
558 | && !LLMuteList::getInstance()->isLinden(selected_speakerp->mDisplayName)); | 560 | && !LLMuteList::getInstance()->isLinden(selected_speakerp->mDisplayName)); |
559 | } | 561 | } |
560 | childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id)); | 562 | childSetValue("speaker_volume", gVoiceClient->getUserVolume(selected_id)); |
@@ -562,7 +564,7 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
562 | && gVoiceClient->getVoiceEnabled(selected_id) | 564 | && gVoiceClient->getVoiceEnabled(selected_id) |
563 | && selected_id.notNull() | 565 | && selected_id.notNull() |
564 | && selected_id != gAgent.getID() | 566 | && selected_id != gAgent.getID() |
565 | && (selected_speakerp.notNull() && selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT)); | 567 | && (selected_speakerp.notNull() && (selected_speakerp->mType == LLSpeaker::SPEAKER_AGENT || selected_speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL))); |
566 | 568 | ||
567 | childSetEnabled( | 569 | childSetEnabled( |
568 | "moderator_controls_label", | 570 | "moderator_controls_label", |
@@ -580,7 +582,7 @@ void LLPanelActiveSpeakers::refreshSpeakers() | |||
580 | 582 | ||
581 | if (mProfileBtn) | 583 | if (mProfileBtn) |
582 | { | 584 | { |
583 | mProfileBtn->setEnabled(selected_id.notNull()); | 585 | mProfileBtn->setEnabled(selected_id.notNull() && (selected_speakerp.notNull() && selected_speakerp->mType != LLSpeaker::SPEAKER_EXTERNAL) ); |
584 | } | 586 | } |
585 | 587 | ||
586 | // show selected user name in large font | 588 | // show selected user name in large font |
@@ -1034,9 +1036,17 @@ void LLSpeakerMgr::update(BOOL resort_ok) | |||
1034 | // speaker no longer registered in voice channel, demote to text only | 1036 | // speaker no longer registered in voice channel, demote to text only |
1035 | else if (speakerp->mStatus != LLSpeaker::STATUS_NOT_IN_CHANNEL) | 1037 | else if (speakerp->mStatus != LLSpeaker::STATUS_NOT_IN_CHANNEL) |
1036 | { | 1038 | { |
1037 | speakerp->mStatus = LLSpeaker::STATUS_TEXT_ONLY; | 1039 | if(speakerp->mType == LLSpeaker::SPEAKER_EXTERNAL) |
1038 | speakerp->mSpeechVolume = 0.f; | 1040 | { |
1039 | speakerp->mDotColor = ACTIVE_COLOR; | 1041 | // external speakers should be timed out when they leave the voice channel (since they only exist via SLVoice) |
1042 | speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; | ||
1043 | } | ||
1044 | else | ||
1045 | { | ||
1046 | speakerp->mStatus = LLSpeaker::STATUS_TEXT_ONLY; | ||
1047 | speakerp->mSpeechVolume = 0.f; | ||
1048 | speakerp->mDotColor = ACTIVE_COLOR; | ||
1049 | } | ||
1040 | } | 1050 | } |
1041 | } | 1051 | } |
1042 | 1052 | ||
@@ -1088,13 +1098,16 @@ void LLSpeakerMgr::updateSpeakerList() | |||
1088 | if ((!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) | 1098 | if ((!mVoiceChannel && gVoiceClient->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) |
1089 | { | 1099 | { |
1090 | LLVoiceClient::participantMap* participants = gVoiceClient->getParticipantList(); | 1100 | LLVoiceClient::participantMap* participants = gVoiceClient->getParticipantList(); |
1091 | LLVoiceClient::participantMap::iterator participant_it; | 1101 | if(participants) |
1092 | |||
1093 | // add new participants to our list of known speakers | ||
1094 | for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it) | ||
1095 | { | 1102 | { |
1096 | LLVoiceClient::participantState* participantp = participant_it->second; | 1103 | LLVoiceClient::participantMap::iterator participant_it; |
1097 | setSpeaker(participantp->mAvatarID, LLStringUtil::null, LLSpeaker::STATUS_VOICE_ACTIVE); | 1104 | |
1105 | // add new participants to our list of known speakers | ||
1106 | for (participant_it = participants->begin(); participant_it != participants->end(); ++participant_it) | ||
1107 | { | ||
1108 | LLVoiceClient::participantState* participantp = participant_it->second; | ||
1109 | setSpeaker(participantp->mAvatarID, participantp->mDisplayName, LLSpeaker::STATUS_VOICE_ACTIVE, (participantp->mAvatarIDValid?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL)); | ||
1110 | } | ||
1098 | } | 1111 | } |
1099 | } | 1112 | } |
1100 | } | 1113 | } |
@@ -1167,6 +1180,10 @@ void LLIMSpeakerMgr::updateSpeakerList() | |||
1167 | { | 1180 | { |
1168 | // don't do normal updates which are pulled from voice channel | 1181 | // don't do normal updates which are pulled from voice channel |
1169 | // rely on user list reported by sim | 1182 | // rely on user list reported by sim |
1183 | |||
1184 | // We need to do this to allow PSTN callers into group chats to show in the list. | ||
1185 | LLSpeakerMgr::updateSpeakerList(); | ||
1186 | |||
1170 | return; | 1187 | return; |
1171 | } | 1188 | } |
1172 | 1189 | ||