diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 1e713dade8b411d880c40d5b3f89c39516ec9dc1..f62fd44bc06df85be868102c9669383d62fb9e06 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -163,6 +163,8 @@ BOOL LLCallFloater::postBuild() //chrome="true" hides floater caption if (mDragHandle) mDragHandle->setTitleVisible(TRUE); + + updateSession(); return TRUE; } @@ -246,7 +248,7 @@ void LLCallFloater::updateSession() } } - const LLUUID& session_id = voice_channel->getSessionID(); + const LLUUID& session_id = voice_channel ? voice_channel->getSessionID() : LLUUID::null; lldebugs << "Set speaker manager for session: " << session_id << llendl; LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f83f3eba968a4215ea8f021f6fa5ac3bbbdfca2e..d54cbfe20317458cfc313fc2a3df8559fd567c3a 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -433,6 +433,12 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + // AD *TODO: This is workaround for EXT-4725- way to properly enable/disable "Call" menu item in + // enableContextMenuItem() should be found. + bool not_agent = mUUIDs.front() != gAgentID; + bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + main_menu->setItemEnabled("Call", can_call); + // 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); 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 805ffbae6688f1a0f6622e5fdeca6224c9d02829..04e02d0f6cc6e3500a322f572f46b5423720952f 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -57,9 +57,6 @@ name="Call"> <menu_item_call.on_click function="Avatar.Call" /> - <menu_item_call.on_enable - function="ParticipantList.EnableItem" - parameter="can_call" /> </menu_item_call> <menu_item_call enabled="true"