From fd62242dd6e5fa464db07e0b8ebf3ab54a6067a2 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 24 Aug 2012 17:31:12 -0700 Subject: CHUI-280 : Make LLParticipantList derives from LLConversationItemSession --- indra/newview/llparticipantlist.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 53966c15fe..f8165aa292 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -31,13 +31,14 @@ #include "llevent.h" #include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator #include "lllistcontextmenu.h" +#include "llconversationmodel.h" class LLSpeakerMgr; class LLAvatarList; class LLUICtrl; class LLAvalineUpdater; -class LLParticipantList +class LLParticipantList : public LLConversationItemSession { LOG_CLASS(LLParticipantList); public: @@ -46,6 +47,7 @@ public: LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, + LLFolderViewModelInterface& root_view_model, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); -- cgit v1.2.3 From f5fc2a9c3af23cc1aaf74e432eb3690d8d376d89 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 19 Sep 2012 17:59:37 -0700 Subject: CHUI-340 : WIP : Update time stamp for IM and voice utterance --- indra/newview/llparticipantlist.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index f8165aa292..acee68873c 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -95,6 +95,7 @@ protected: bool onRemoveItemEvent(LLPointer event, const LLSD& userdata); bool onClearListEvent(LLPointer event, const LLSD& userdata); bool onModeratorUpdateEvent(LLPointer event, const LLSD& userdata); + bool onSpeakerUpdateEvent(LLPointer event, const LLSD& userdata); bool onSpeakerMuteEvent(LLPointer event, const LLSD& userdata); /** @@ -136,6 +137,13 @@ protected: /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); }; + class SpeakerUpdateListener : public BaseSpeakerListener + { + public: + SpeakerUpdateListener(LLParticipantList& parent) : BaseSpeakerListener(parent) {} + /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); + }; + class SpeakerModeratorUpdateListener : public BaseSpeakerListener { public: @@ -264,6 +272,7 @@ private: LLPointer mSpeakerAddListener; LLPointer mSpeakerRemoveListener; LLPointer mSpeakerClearListener; + LLPointer mSpeakerUpdateListener; LLPointer mSpeakerModeratorListener; LLPointer mSpeakerMuteListener; -- cgit v1.2.3 From 1251f45e6246d81658cf4fe6f2654472c772e94b Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 17 Oct 2012 00:16:18 +0300 Subject: CHUI-394 FIXED Group moderation tools missing in right click menus --- indra/newview/llparticipantlist.h | 75 --------------------------------------- 1 file changed, 75 deletions(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index acee68873c..aaf1e070a5 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -159,79 +159,6 @@ protected: /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); }; - /** - * Menu used in the participant list. - */ - class LLParticipantListMenu : public LLListContextMenu - { - public: - LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; - /*virtual*/ LLContextMenu* createMenu(); - /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); - protected: - LLParticipantList& mParent; - private: - bool enableContextMenuItem(const LLSD& userdata); - bool enableModerateContextMenuItem(const LLSD& userdata); - bool checkContextMenuItem(const LLSD& userdata); - - void sortParticipantList(const LLSD& userdata); - void toggleAllowTextChat(const LLSD& userdata); - void toggleMute(const LLSD& userdata, U32 flags); - void toggleMuteText(const LLSD& userdata); - void toggleMuteVoice(const LLSD& userdata); - - /** - * Return true if Agent is group moderator(and moderator of group call). - */ - bool isGroupModerator(); - - // Voice moderation support - /** - * Check whether specified by argument avatar is muted for group chat or not. - */ - bool isMuted(const LLUUID& avatar_id); - - /** - * Processes Voice moderation menu items. - * - * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on - * passed parameter. - * - * @param userdata can be "selected" or "others". - * - * @see moderateVoiceParticipant() - * @see moderateVoiceAllParticipants() - */ - void moderateVoice(const LLSD& userdata); - - /** - * Mutes/Unmutes avatar for current group voice chat. - * - * It only marks avatar as muted for session and does not use local Agent's Block list. - * It does not mute Agent itself. - * - * @param[in] avatar_id UUID of avatar to be processed - * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. - * - * @see moderateVoiceAllParticipants() - */ - void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); - - /** - * Mutes/Unmutes all avatars for current group voice chat. - * - * It only marks avatars as muted for session and does not use local Agent's Block list. - * - * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. - * - * @see moderateVoiceParticipant() - */ - void moderateVoiceAllParticipants(bool unmute); - - static void confirmMuteAllCallback(const LLSD& notification, const LLSD& response); - }; - /** * Comparator for comparing avatar items by last spoken time */ @@ -276,8 +203,6 @@ private: LLPointer mSpeakerModeratorListener; LLPointer mSpeakerMuteListener; - LLParticipantListMenu* mParticipantListMenu; - /** * This field manages an adding a new avatar_id in the mAvatarList * If true, then agent_id wont be added into mAvatarList -- cgit v1.2.3 From 2d9d44e31643214c80bde5ffee03f9b6af6af9d0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 5 Nov 2012 18:33:39 -0800 Subject: CHUI-468 : WIP : Taking LLAvatarList and related out of LLParticipantList --- indra/newview/llparticipantlist.h | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index aaf1e070a5..97e06dcfea 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -1,6 +1,6 @@ /** * @file llparticipantlist.h - * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages + * @brief LLParticipantList widgets of a conversation list * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -29,12 +29,10 @@ #include "llviewerprecompiledheaders.h" #include "llevent.h" -#include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator #include "lllistcontextmenu.h" #include "llconversationmodel.h" class LLSpeakerMgr; -class LLAvatarList; class LLUICtrl; class LLAvalineUpdater; @@ -46,13 +44,12 @@ public: typedef boost::function validate_speaker_callback_t; LLParticipantList(LLSpeakerMgr* data_source, - LLAvatarList* avatar_list, LLFolderViewModelInterface& root_view_model, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); ~LLParticipantList(); - void setSpeakingIndicatorsVisible(BOOL visible); +// void setSpeakingIndicatorsVisible(BOOL visible); enum EParticipantSortOrder { @@ -70,8 +67,8 @@ public: /** * Set and sort Avatarlist by given order */ - void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); - const EParticipantSortOrder getSortOrder() const; + //void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); + //const EParticipantSortOrder getSortOrder() const; /** * Refreshes the participant list. @@ -101,7 +98,7 @@ protected: /** * Sorts the Avatarlist by stored order */ - void sort(); + //void sort(); /** * List of listeners implementing LLOldEvents::LLSimpleListener. @@ -159,24 +156,9 @@ protected: /*virtual*/ bool handleEvent(LLPointer event, const LLSD& userdata); }; - /** - * Comparator for comparing avatar items by last spoken time - */ - class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator, public LLRefCount - { - LOG_CLASS(LLAvatarItemRecentSpeakerComparator); - public: - LLAvatarItemRecentSpeakerComparator(LLParticipantList& parent):mParent(parent){}; - virtual ~LLAvatarItemRecentSpeakerComparator() {}; - protected: - virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; - private: - LLParticipantList& mParent; - }; - private: - void onAvatarListDoubleClicked(LLUICtrl* ctrl); - void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); +// void onAvatarListDoubleClicked(LLUICtrl* ctrl); +// void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); void onAvalineCallerFound(const LLUUID& participant_id); void onAvalineCallerRemoved(const LLUUID& participant_id); @@ -188,10 +170,7 @@ private: */ void adjustParticipant(const LLUUID& speaker_id); - bool isHovered(); - LLSpeakerMgr* mSpeakerMgr; - LLAvatarList* mAvatarList; std::set mModeratorList; std::set mModeratorToRemoveList; @@ -216,7 +195,7 @@ private: boost::signals2::connection mAvatarListReturnConnection; boost::signals2::connection mAvatarListToggleIconsConnection; - LLPointer mSortByRecentSpeakers; +// LLPointer mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; LLAvalineUpdater* mAvalineUpdater; }; -- cgit v1.2.3 From 8c64fbf1b76e46fa3f5a8f8c6baba30d4583b7ec Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 6 Nov 2012 18:32:45 -0800 Subject: CHUI-468 : WIP : More cleanup and fix of the participants sorting in LLIMConversation --- indra/newview/llparticipantlist.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 97e06dcfea..f4469b03f4 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -49,7 +49,6 @@ public: bool exclude_agent = true, bool can_toggle_icons = true); ~LLParticipantList(); -// void setSpeakingIndicatorsVisible(BOOL visible); enum EParticipantSortOrder { -- cgit v1.2.3 From 626d07daa1219e6834bf371547cc8c4852840fb9 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 7 Nov 2012 15:36:16 -0800 Subject: CHUI-468 : WIP : Clean up LLAvatarList and all sorting code left over in LLParticipantList --- indra/newview/llparticipantlist.h | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index f4469b03f4..9332634c31 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -43,19 +43,9 @@ public: typedef boost::function validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, - LLFolderViewModelInterface& root_view_model, - bool use_context_menu = true, - bool exclude_agent = true, - bool can_toggle_icons = true); + LLParticipantList(LLSpeakerMgr* data_source, LLFolderViewModelInterface& root_view_model); ~LLParticipantList(); - enum EParticipantSortOrder - { - E_SORT_BY_NAME = 0, - E_SORT_BY_RECENT_SPEAKERS = 1, - }; - /** * Adds specified avatar ID to the existing list if it is not Agent's ID * @@ -63,12 +53,6 @@ public: */ void addAvatarIDExceptAgent(const LLUUID& avatar_id); - /** - * Set and sort Avatarlist by given order - */ - //void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); - //const EParticipantSortOrder getSortOrder() const; - /** * Refreshes the participant list. */ @@ -94,11 +78,6 @@ protected: bool onSpeakerUpdateEvent(LLPointer event, const LLSD& userdata); bool onSpeakerMuteEvent(LLPointer event, const LLSD& userdata); - /** - * Sorts the Avatarlist by stored order - */ - //void sort(); - /** * List of listeners implementing LLOldEvents::LLSimpleListener. * There is no way to handle all the events in one listener as LLSpeakerMgr registers @@ -181,20 +160,6 @@ private: LLPointer mSpeakerModeratorListener; LLPointer mSpeakerMuteListener; - /** - * This field manages an adding a new avatar_id in the mAvatarList - * If true, then agent_id wont be added into mAvatarList - * Also by default this field is controlling a sort procedure, @c sort() - */ - bool mExcludeAgent; - - // boost::connections - boost::signals2::connection mAvatarListDoubleClickConnection; - boost::signals2::connection mAvatarListRefreshConnection; - boost::signals2::connection mAvatarListReturnConnection; - boost::signals2::connection mAvatarListToggleIconsConnection; - -// LLPointer mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; LLAvalineUpdater* mAvalineUpdater; }; -- cgit v1.2.3 From 87c94625d39a72ce8b19b2c295c3824fb45717a3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 7 Nov 2012 16:49:03 -0800 Subject: CHUI-468 : Fixed. Final clean up of LLParticipantList, including dependencies. --- indra/newview/llparticipantlist.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'indra/newview/llparticipantlist.h') diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 9332634c31..3a3ae76604 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -1,6 +1,6 @@ /** * @file llparticipantlist.h - * @brief LLParticipantList widgets of a conversation list + * @brief LLParticipantList : model of a conversation session with added speaker events handling * * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,8 +28,6 @@ #define LL_PARTICIPANTLIST_H #include "llviewerprecompiledheaders.h" -#include "llevent.h" -#include "lllistcontextmenu.h" #include "llconversationmodel.h" class LLSpeakerMgr; @@ -135,9 +133,6 @@ protected: }; private: -// void onAvatarListDoubleClicked(LLUICtrl* ctrl); -// void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); - void onAvalineCallerFound(const LLUUID& participant_id); void onAvalineCallerRemoved(const LLUUID& participant_id); -- cgit v1.2.3