diff options
-rw-r--r-- | indra/llui/lltexteditor.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llavataractions.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llavataractions.h | 5 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_attachment_other.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_avatar_other.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml | 2 |
9 files changed, 33 insertions, 4 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index f2c3879a6c..ae34b0a042 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2040,6 +2040,19 @@ void LLTextEditor::showContextMenu(S32 x, S32 y) LLMenuHolderGL::child_registry_t::instance()); } + // Route menu to this class + // previously this was done in ::handleRightMoseDown: + //if(hasTabStop()) + // setFocus(TRUE) - why? weird... + // and then inside setFocus + // .... + // gEditMenuHandler = this; + // .... + // but this didn't work in all cases and just weird... + //why not hear? + + gEditMenuHandler = this; + S32 screen_x, screen_y; localPointToScreen(x, y, &screen_x, &screen_y); mContextMenu->show(screen_x, screen_y); diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index bb14c41cec..7eed2e7b9a 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -250,17 +250,20 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) make_ui_sound("UISndStartIM"); } +/* AD *TODO: Is this function needed any more? + I fixed it a bit(added check for canCall), but it appears that it is not used + anywhere. Maybe it should be removed? // static bool LLAvatarActions::isCalling(const LLUUID &id) { - if (id.isNull()) + if (id.isNull() || !canCall()) { return false; } LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL, id); return (LLIMModel::getInstance()->findIMSession(session_id) != NULL); -} +}*/ //static bool LLAvatarActions::canCall() diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index ebfd40b796..c751661acf 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -126,7 +126,10 @@ public: /** * Return true if the avatar is in a P2P voice call with a given user */ - static bool isCalling(const LLUUID &id); + /* AD *TODO: Is this function needed any more? + I fixed it a bit(added check for canCall), but it appears that it is not used + anywhere. Maybe it should be removed? + static bool isCalling(const LLUUID &id);*/ /** * @return true if call to the resident can be made diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 4b0539337b..3a41aebf28 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -229,6 +229,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); + mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall)); mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this)); mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this)); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index c0302eee9e..f83f3eba96 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -628,7 +628,9 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& } else if (item == "can_call") { - return LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); + bool not_agent = mUUIDs.front() != gAgentID; + bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + return can_call; } return true; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5ff5b82a17..54de693222 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7959,6 +7959,7 @@ void initialize_menus() commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); + enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index 5b94645b60..c5b31c7f63 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -30,6 +30,8 @@ name="Call"> <menu_item_call.on_click function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableCall" /> </menu_item_call> <menu_item_call label="Invite to Group" diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index 0ad41546d2..ac9101cfd9 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -30,6 +30,8 @@ name="Call"> <menu_item_call.on_click function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableCall" /> </menu_item_call> <menu_item_call label="Invite to Group" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index dde92f23b6..85ec174829 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -32,6 +32,8 @@ name="call"> <menu_item_call.on_click function="InspectAvatar.Call"/> + <menu_item_call.on_enable + function="InspectAvatar.Gear.EnableCall"/> </menu_item_call> <menu_item_call label="Teleport" |