diff options
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index dcb7e9e878..e64d297326 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -125,6 +125,8 @@ LLParticipantList::~LLParticipantList() delete mParticipantListMenu; mParticipantListMenu = NULL; } + + mAvatarList->setContextMenu(NULL); } void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible) @@ -430,6 +432,10 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + // Don't show sort options for P2P chat + bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1); + main_menu->setItemVisible("SortByName", is_sort_visible); + main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); main_menu->setItemVisible("Moderator Options", isGroupModerator()); main_menu->arrangeAndClear(); @@ -455,11 +461,6 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } - - // Don't show sort options for P2P chat - bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1); - LLMenuGL::sMenuContainer->childSetVisible("SortByName", is_sort_visible); - LLMenuGL::sMenuContainer->childSetVisible("SortByRecentSpeakers", is_sort_visible); } void LLParticipantList::LLParticipantListMenu::sortParticipantList(const LLSD& userdata) @@ -626,7 +627,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& } else if (item == "can_call") { - return LLVoiceClient::getInstance()->voiceEnabled(); + return LLVoiceClient::getInstance()->voiceEnabled()&&LLVoiceClient::getInstance()->isVoiceWorking(); } return true; |