diff options
Diffstat (limited to 'indra/newview/llparticipantlist.h')
-rw-r--r-- | indra/newview/llparticipantlist.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index b85d4c9bc4..21eda86edd 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -34,6 +34,7 @@ #include "llevent.h" #include "llpanelpeoplemenus.h" #include "llimview.h" +#include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator class LLSpeakerMgr; class LLAvatarList; @@ -49,12 +50,14 @@ class LLParticipantList typedef enum e_participant_sort_oder { E_SORT_BY_NAME = 0, + E_SORT_BY_RECENT_SPEAKERS = 1, } EParticipantSortOrder; /** * Set and sort Avatarlist by given order */ void setSortOrder(EParticipantSortOrder order = E_SORT_BY_NAME); + EParticipantSortOrder getSortOrder(); /** * Refreshes participants to display ones not in voice as disabled. @@ -139,6 +142,7 @@ class LLParticipantList bool enableContextMenuItem(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); @@ -195,6 +199,21 @@ class LLParticipantList void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); }; + /** + * 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(LLAvatarList* list); void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); @@ -240,4 +259,6 @@ class LLParticipantList boost::signals2::connection mAvatarListDoubleClickConnection; boost::signals2::connection mAvatarListRefreshConnection; boost::signals2::connection mAvatarListReturnConnection; + + LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; }; |