diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 8f54a4e4d..3447b521a 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -315,7 +315,8 @@ namespace { bool handleEvent(LLPointer event, const LLSD& userdata) { - LLFloaterAvatarList::instance().onClickFocus(); + const LLUUID get_focused_list_id_selected(); + LLFloaterAvatarList::instance().setFocusAvatar(get_focused_list_id_selected()); return true; } }; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 9b3887395..1b4c0b8f8 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -33,8 +33,10 @@ #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llspeakers.h" +#include "lluictrlfactory.h" // Edit: For menu duality +#include "llviewermenu.h" // Edit: For menu duality #include "llviewerwindow.h" -#include "llvoiceclient.h" +#include "llvoicechannel.h" // Edit: For menu duality #include "llworld.h" // Edit: For ghost detection // [RLVa:KB] #include "rlvhandler.h" @@ -70,6 +72,16 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, //mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator"); } +void LLParticipantList::setupContextMenu() +{ + if (mSpeakerMgr->getVoiceChannel() == LLVoiceChannelProximal::getInstance()) + { + static LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_local_avs.xml", gMenuHolder); + mAvatarList->setContextMenu(menu); + } + else mAvatarList->setContextMenu(0); +} + BOOL LLParticipantList::postBuild() { mAvatarList = getChild("speakers_list"); @@ -97,6 +109,7 @@ BOOL LLParticipantList::postBuild() // update speaker UI handleSpeakerSelect(); + setupContextMenu(); return true; } @@ -387,6 +400,7 @@ bool LLParticipantList::onRemoveItemEvent(LLPointer event, bool LLParticipantList::onClearListEvent(LLPointer event, const LLSD& userdata) { mAvatarList->clearRows(); + setupContextMenu(); return true; } diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 0c9c292e5..29772cf25 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -203,6 +203,7 @@ protected: private: void onAvatarListDoubleClicked(); + void setupContextMenu(); /** * Adjusts passed participant to work properly. diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index b0edaa9ab..ced6d48ee 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -1021,10 +1021,11 @@ LLActiveSpeakerMgr::LLActiveSpeakerMgr() : LLSpeakerMgr(NULL) void LLActiveSpeakerMgr::updateSpeakerList() { // point to whatever the current voice channel is + const auto old_channel = mVoiceChannel; mVoiceChannel = LLVoiceChannel::getCurrentVoiceChannel(); // always populate from active voice channel - if (LLVoiceChannel::getCurrentVoiceChannel() != mVoiceChannel) //MA: seems this is always false + if (mVoiceChannel != old_channel) //Singu Note: Don't let this always be false. { LL_DEBUGS("Speakers") << "Removed all speakers" << LL_ENDL; fireEvent(new LLSpeakerListChangeEvent(this, LLUUID::null), "clear"); diff --git a/indra/newview/skins/default/xui/en-us/menu_local_avs.xml b/indra/newview/skins/default/xui/en-us/menu_local_avs.xml new file mode 100644 index 000000000..2db0e2275 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/menu_local_avs.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +