Skip to content
Snippets Groups Projects
Commit 88a6cbda authored by Andrew Dyukov's avatar Andrew Dyukov
Browse files

Workaround for EXT-4725(Viewer crashes if try to call from 'Nearby voice' floater).

- Enabling/disabling 'Call'menu item is moved to createMenu(). Some way to properly enable/disable it in
 enableContextMenuItem() should be found.

--HG--
branch : product-engine
parent e33483a7
Branches
Tags
No related merge requests found
...@@ -433,6 +433,12 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() ...@@ -433,6 +433,12 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); "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 // Don't show sort options for P2P chat
bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1); bool is_sort_visible = (mParent.mAvatarList && mParent.mAvatarList->size() > 1);
main_menu->setItemVisible("SortByName", is_sort_visible); main_menu->setItemVisible("SortByName", is_sort_visible);
......
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
name="Call"> name="Call">
<menu_item_call.on_click <menu_item_call.on_click
function="Avatar.Call" /> function="Avatar.Call" />
<menu_item_call.on_enable
function="ParticipantList.EnableItem"
parameter="can_call" />
</menu_item_call> </menu_item_call>
<menu_item_call <menu_item_call
enabled="true" enabled="true"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment