diff options
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 23 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_participant_view.xml | 5 |
2 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 39cd16acfa..c1a5c9ceeb 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1022,16 +1022,21 @@ void LLFloaterIMContainer::doToSelectedGroup(const LLSD& userdata) bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) { - std::string item = userdata.asString(); + const std::string& item = userdata.asString(); uuid_vec_t uuids; getParticipantUUIDs(uuids); - if(item == std::string("can_activate_group")) + if("can_activate_group" == item) { LLUUID selected_group_id = getCurSelectedViewModelItem()->getUUID(); return gAgent.getGroupID() != selected_group_id; } + if("conversation_log" == item) + { + return gSavedSettings.getBOOL("KeepConversationLogTranscripts"); + } + if(uuids.size() <= 0) { return false; @@ -1040,12 +1045,12 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) // Note: can_block and can_delete is used only for one person selected menu // so we don't need to go over all uuids. - if (item == std::string("can_block")) + if ("can_block" == item) { const LLUUID& id = uuids.front(); return LLAvatarActions::canBlock(id); } - else if (item == std::string("can_add")) + else if ("can_add" == item) { // We can add friends if: // - there are selected people @@ -1074,7 +1079,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) return result; } - else if (item == std::string("can_delete")) + else if ("can_delete" == item) { // We can remove friends if: // - there are selected people @@ -1097,18 +1102,18 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) return result; } - else if (item == std::string("can_call")) + else if ("can_call" == item) { return LLAvatarActions::canCall(); } - else if (item == std::string("can_show_on_map")) + else if ("can_show_on_map" == item) { const LLUUID& id = uuids.front(); return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id)) || gAgent.isGodlike(); } - else if(item == std::string("can_offer_teleport")) + else if("can_offer_teleport" == item) { return LLAvatarActions::canOfferTeleport(uuids); } @@ -1117,7 +1122,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) return enableModerateContextMenuItem(item); } - return false; + return false; } bool LLFloaterIMContainer::checkContextMenuItem(const LLSD& userdata) diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 523ce7b35b..33d7bd7c01 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -85,5 +85,8 @@ <menu_item_check.on_click function="Floater.Toggle" parameter="conversation" /> - </menu_item_check> + <menu_item_check.on_enable + function="Avatar.EnableItem" + parameter="conversation_log" /> + </menu_item_check> </toggleable_menu> |