From f49d47b3041c6b36b36a23b67eec609e95494acc Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Mon, 10 Dec 2012 17:22:56 +0200 Subject: CHUI-394 (Group moderation tools missing in right click menus) --- indra/newview/llconversationmodel.cpp | 14 ++++---- indra/newview/llconversationmodel.h | 2 ++ indra/newview/llfloaterimcontainer.cpp | 38 +++++++++++++--------- .../skins/default/xui/en/menu_conversation.xml | 13 ++------ 4 files changed, 36 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 99dd35a9e8..d03ad92fbc 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -46,7 +46,8 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& u mUUID(uuid), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), - mLastActiveTime(0.0) + mLastActiveTime(0.0), + mDisplayModeratorOptions(false) { } @@ -56,7 +57,8 @@ LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInte mUUID(uuid), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), - mLastActiveTime(0.0) + mLastActiveTime(0.0), + mDisplayModeratorOptions(false) { } @@ -66,7 +68,8 @@ LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_mod mUUID(), mNeedsRefresh(true), mConvType(CONV_UNKNOWN), - mLastActiveTime(0.0) + mLastActiveTime(0.0), + mDisplayModeratorOptions(false) { } @@ -117,14 +120,13 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items) items.push_back(std::string("block_unblock")); items.push_back(std::string("MuteText")); - if(this->getType() != CONV_SESSION_1_ON_1) + if(this->getType() != CONV_SESSION_1_ON_1 && mDisplayModeratorOptions) { items.push_back(std::string("Moderator Options Separator")); items.push_back(std::string("Moderator Options")); items.push_back(std::string("AllowTextChat")); items.push_back(std::string("moderate_voice_separator")); - items.push_back(std::string("ModerateVoiceMuteSelected")); - items.push_back(std::string("ModerateVoiceUnMuteSelected")); + items.push_back(std::string("ModerateVoiceToggleMuteSelected")); items.push_back(std::string("ModerateVoiceMute")); items.push_back(std::string("ModerateVoiceUnmute")); } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index dd849210a8..7177d3a414 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -138,6 +138,7 @@ protected: EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item F64 mLastActiveTime; + bool mDisplayModeratorOptions; }; class LLConversationItemSession : public LLConversationItem @@ -198,6 +199,7 @@ public: LLConversationItemSession* getParentSession(); void dumpDebugData(); + void setModeratorOptionsVisible(bool visible) { mDisplayModeratorOptions = visible; } private: void onAvatarNameCache(const LLAvatarName& av_name); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index c36128b0bd..e900f583b3 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -509,6 +509,22 @@ void LLFloaterIMContainer::draw() // still needs the conversation list. Simply collapse the message pane in that case. collapseMessagesPane(true); } + + //Update moderator options visibility + const LLConversationItem *current_session = getCurSelectedViewModelItem(); + if (current_session) + { + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin(); + LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd(); + while (current_participant_model != end_participant_model) + { + LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); + participant_model->setModeratorOptionsVisible(isGroupModerator() && participant_model->getUUID() != gAgentID); + + current_participant_model++; + } + } + LLFloater::draw(); } @@ -1156,7 +1172,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v { return LLAvatarActions::canOfferTeleport(uuids); } - else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute" == item) || ("can_unmute" == item)) + else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute_unmute" == item)) { // *TODO : get that out of here... return enableModerateContextMenuItem(item); @@ -1246,11 +1262,11 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool } } - // Set the focus on the selected floater - if (!session_floater->hasFocus()) - { - session_floater->setFocus(TRUE); - } + // Set the focus on the selected floater + if (!session_floater->hasFocus()) + { + session_floater->setFocus(TRUE); + } return handled; } @@ -1463,18 +1479,10 @@ bool LLFloaterIMContainer::enableModerateContextMenuItem(const std::string& user bool voice_channel = speakerp->isInVoiceChannel(); - if ("can_moderate_voice" == userdata) + if ("can_moderate_voice" == userdata || "can_mute_unmute" == userdata) { return voice_channel; } - else if ("can_mute" == userdata) - { - return voice_channel && !isMuted(getCurSelectedViewModelItem()->getUUID()); - } - else if ("can_unmute" == userdata) - { - return voice_channel && isMuted(getCurSelectedViewModelItem()->getUUID()); - } // The last invoke is used to check whether the "can_allow_text_chat" will enabled return LLVoiceClient::getInstance()->isParticipantAvatar(getCurSelectedViewModelItem()->getUUID()); diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index 01ef8ebdb5..e0edf384d6 100644 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -156,18 +156,11 @@ + name="ModerateVoiceToggleMuteSelected"> - - - - - + Date: Tue, 11 Dec 2012 15:20:46 +0200 Subject: CHUI-587 FIXED Disable menu item if "KeepConversationLogTranscripts" is false. --- indra/newview/llfloaterimcontainer.cpp | 5 +++++ indra/newview/llfloaterimcontainer.h | 1 + indra/newview/llviewermenu.cpp | 2 ++ indra/newview/skins/default/xui/en/menu_viewer.xml | 2 ++ 4 files changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a76714950d..cc053ca658 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1696,6 +1696,11 @@ void LLFloaterIMContainer::updateSpeakBtnState() mSpeakBtn->setEnabled(LLAgent::isActionAllowed("speak")); } +bool LLFloaterIMContainer::isConversationLoggingAllowed() +{ + return gSavedSettings.getBOOL("KeepConversationLogTranscripts"); +} + void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes) { //Finds the conversation line item to flash using the session_id diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 92985c036a..3818645037 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -174,6 +174,7 @@ public: void setNearbyDistances(); void reSelectConversation(); void updateSpeakBtnState(); + static bool isConversationLoggingAllowed(); void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes); private: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7ae717cb42..fe9c00cc27 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -59,6 +59,7 @@ #include "llbuycurrencyhtml.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" +#include "llfloaterimcontainer.h" #include "llfloaterland.h" #include "llfloaterpathfindingcharacters.h" #include "llfloaterpathfindinglinksets.h" @@ -8238,6 +8239,7 @@ void initialize_menus() commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory)); + enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index b1e3a2d41f..3e7329c0b5 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -261,6 +261,8 @@ + -- cgit v1.2.3 From 13956ab25d76ef3373d2a06795b92b24364f63cf Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Tue, 11 Dec 2012 17:16:32 +0200 Subject: CHUI-572 FIXED Changed initial position for floaters according to screenshot. --- indra/newview/skins/default/xui/en/floater_camera.xml | 4 ++-- indra/newview/skins/default/xui/en/floater_destinations.xml | 3 +-- indra/newview/skins/default/xui/en/floater_im_container.xml | 3 ++- indra/newview/skins/default/xui/en/floater_moveview.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 4b4821a383..521389d7b3 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -1,8 +1,8 @@ Date: Wed, 12 Dec 2012 03:05:32 +0200 Subject: CHUI-557 (Cannot expand conversation from minimized state by clicking on selected conversation) --- indra/newview/llconversationview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index f088a8c084..527c0ad233 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -223,10 +223,11 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) //This node (conversation) was selected and a child (participant) was not if(result && getRoot()->getCurSelectedItem() == this) - { - (LLFloaterReg::getTypedInstance("im_container"))-> - selectConversationPair(session_id, false); - } + { + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance("im_container"); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } return result; } -- cgit v1.2.3