From a45eefaf26ad24fdc9f2fa4f55be1a10c8e0a09f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 9 Apr 2010 15:11:58 +0300 Subject: Replace gVoiceClient with LLVoiceClient::getInstance() due to gVoiceClient is being removed soon. Trivial changes, not reviewed. --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index bed5c01d7a..1c6857b75c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -189,7 +189,7 @@ void LLCallFloater::draw() // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) // onChange(); - bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); + bool is_moderator_muted = LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID); if (mIsModeratorMutedVoice != is_moderator_muted) { @@ -470,7 +470,7 @@ void LLCallFloater::updateAgentModeratorState() static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) { // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList(); + LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList(); if (voice_map) { for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); @@ -725,7 +725,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { // check is voice operational and if it doesn't work hide VCP (EXT-4397) - if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking()) { updateState(new_state); } -- cgit v1.3 From 7e76f26407c6760464b5928b7c6cb8c800a5883f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 12 Apr 2010 15:38:01 +0300 Subject: Fixed normal bug EXT-6660 (Just logged on resident is displayed as connected to group voice chat in the VCP) Reason. VCP floater stores voice states of its participants. If invited in group voice chat avatar goes offline and then online LLAvatarListItem representing it will display it as JOINED. Fix: added force setting of voice state in VCP for added participants. Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/218/ --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 1c6857b75c..0b58c8f476 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -601,10 +601,13 @@ void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item) } } break; - case STATE_INVITED: case STATE_LEFT: // nothing to do. These states should not be changed. break; + case STATE_INVITED: + // If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap + // If it goes online it will be rendered as JOINED via LAvatarListItem. + // Lets update its visual representation. See EXT-6660 case STATE_UNKNOWN: // If an avatarID is not found in a speakers list from VoiceClient and // a panel with this ID has an UNKNOWN status this means that this person -- cgit v1.3 From ab246784b069913363e544ab3c9a9fb615e0c71d Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 13 Apr 2010 13:32:39 +0300 Subject: Fixed normal bug EXT-6034 (Need "View People Icons" option for group IM window) - added new menu item to participant list menu for group and ad-hoc chats. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/225/. --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcallfloater.cpp | 2 +- indra/newview/llparticipantlist.cpp | 12 +++++++++++- indra/newview/llparticipantlist.h | 3 ++- .../skins/default/xui/en/menu_participant_list.xml | 17 +++++++++++++++-- 5 files changed, 40 insertions(+), 5 deletions(-) (limited to 'indra/newview/llcallfloater.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 00c29477ce..2dda853f73 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5395,6 +5395,17 @@ Value 1 + ParticipantListShowIcons + + Comment + Show/hide people icons in participant list + Persist + 1 + Type + Boolean + Value + 1 + PerAccountSettingsFile Comment diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 0b58c8f476..d15c5f9bf4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -334,7 +334,7 @@ void LLCallFloater::refreshParticipantList() if (!non_avatar_caller) { - mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT); + mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index dbb8e962bd..026be882ed 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -39,6 +39,7 @@ #include "llparticipantlist.h" #include "llspeakers.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llvoiceclient.h" @@ -50,7 +51,7 @@ static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/, - bool exclude_agent /*= true*/): + bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), mSortOrder(E_SORT_BY_NAME) @@ -87,6 +88,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->setContextMenu(NULL); } + if (use_context_menu && can_toggle_icons) + { + mAvatarList->setShowIcons("ParticipantListShowIcons"); + mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); + } + //Lets fill avatarList with existing speakers LLSpeakerMgr::speaker_list_t speaker_list; mSpeakerMgr->getSpeakerList(&speaker_list, true); @@ -113,6 +120,7 @@ LLParticipantList::~LLParticipantList() mAvatarListDoubleClickConnection.disconnect(); mAvatarListRefreshConnection.disconnect(); mAvatarListReturnConnection.disconnect(); + mAvatarListToggleIconsConnection.disconnect(); // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() // See ticket EXT-3427 @@ -440,6 +448,8 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() main_menu->setItemVisible("SortByName", is_sort_visible); main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); main_menu->setItemVisible("Moderator Options", isGroupModerator()); + main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected()); + main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected()); main_menu->arrangeAndClear(); return main_menu; diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index d9ca4230a9..953dff4551 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -46,7 +46,7 @@ class LLParticipantList typedef boost::function validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true); + LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); ~LLParticipantList(); void setSpeakingIndicatorsVisible(BOOL visible); @@ -268,6 +268,7 @@ class LLParticipantList boost::signals2::connection mAvatarListDoubleClickConnection; boost::signals2::connection mAvatarListRefreshConnection; boost::signals2::connection mAvatarListReturnConnection; + boost::signals2::connection mAvatarListToggleIconsConnection; LLPointer mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index d03a7e3d41..59c7f4ed85 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -82,8 +82,21 @@ function="ParticipantList.EnableItem" parameter="can_pay" /> - + + + + + +