From 25855962a86331a337c4baff2754c63850605aea Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 6 Aug 2012 18:07:56 -0700 Subject: CHUI-98 : Isolate LLConversationItem and LLConversationViewModel in their own file --- indra/newview/llconversationmodel.h | 202 ++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 indra/newview/llconversationmodel.h (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h new file mode 100644 index 0000000000..85760eb1a8 --- /dev/null +++ b/indra/newview/llconversationmodel.h @@ -0,0 +1,202 @@ +/** + * @file llconversationmodel.h + * @brief Implementation of conversations list + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLCONVERSATIONMODEL_H +#define LL_LLCONVERSATIONMODEL_H + +//#include +//#include + +#include "llfolderviewitem.h" +#include "llfolderviewmodel.h" + +class LLButton; +class LLFloater; +class LLLayoutPanel; +class LLLayoutStack; +class LLTabContainer; +class LLIMFloaterContainer; + +// Implementation of conversations list + +class LLConversationItem; + +typedef std::map conversations_items_map; +typedef std::map conversations_widgets_map; + +// Conversation items: we hold a list of those and create an LLFolderViewItem widget for each +// that we tuck into the mConversationsListPanel. +class LLConversationItem : public LLFolderViewModelItemCommon +{ +public: + LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp); + LLConversationItem(LLIMFloaterContainer* containerp); + virtual ~LLConversationItem() {} + + // Stub those things we won't really be using in this conversation context + virtual const std::string& getName() const { return mName; } + virtual const std::string& getDisplayName() const { return mName; } + virtual const std::string& getSearchableName() const { return mName; } + virtual const LLUUID& getUUID() const { return mUUID; } + virtual time_t getCreationDate() const { return 0; } + virtual LLPointer getIcon() const { return NULL; } + virtual LLPointer getOpenIcon() const { return getIcon(); } + virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } + virtual std::string getLabelSuffix() const { return LLStringUtil::null; } + virtual BOOL isItemRenameable() const { return FALSE; } + virtual BOOL renameItem(const std::string& new_name) { return FALSE; } + virtual BOOL isItemMovable( void ) const { return FALSE; } + virtual BOOL isItemRemovable( void ) const { return FALSE; } + virtual BOOL isItemInTrash( void) const { return FALSE; } + virtual BOOL removeItem() { return FALSE; } + virtual void removeBatch(std::vector& batch) { } + virtual void move( LLFolderViewModelItem* parent_listener ) { } + virtual BOOL isItemCopyable() const { return FALSE; } + virtual BOOL copyToClipboard() const { return FALSE; } + virtual BOOL cutToClipboard() const { return FALSE; } + virtual BOOL isClipboardPasteable() const { return FALSE; } + virtual void pasteFromClipboard() { } + virtual void pasteLinkFromClipboard() { } + virtual void buildContextMenu(LLMenuGL& menu, U32 flags) { } + virtual BOOL isUpToDate() const { return TRUE; } + virtual bool hasChildren() const { return FALSE; } + + virtual bool potentiallyVisible() { return true; } + virtual bool filter( LLFolderViewFilter& filter) { return false; } + virtual bool descendantsPassedFilter(S32 filter_generation = -1) { return true; } + virtual void setPassedFilter(bool passed, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0) { } + virtual bool passedFilter(S32 filter_generation = -1) { return true; } + + // The action callbacks + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void openItem( void ); + virtual void closeItem( void ); + virtual void previewItem( void ); + virtual void selectItem(void); + virtual void showProperties(void); + + void setVisibleIfDetached(BOOL visible); + + // This method will be called to determine if a drop can be + // performed, and will set drop to TRUE if a drop is + // requested. + // Returns TRUE if a drop is possible/happened, FALSE otherwise. + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg) { return FALSE; } + + bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } + bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } +private: + std::string mName; + const LLUUID mUUID; + LLFloater* mFloater; + LLIMFloaterContainer* mContainer; +}; + +// We don't want to ever filter conversations but we need to declare that class to create a conversation view model. +// We just stubb everything for the moment. +class LLConversationFilter : public LLFolderViewFilter +{ +public: + + enum ESortOrderType + { + SO_NAME = 0, // Sort inventory by name + SO_DATE = 0x1, // Sort inventory by date + }; + + LLConversationFilter() { mEmpty = ""; } + ~LLConversationFilter() {} + + bool check(const LLFolderViewModelItem* item) { return true; } + bool checkFolder(const LLFolderViewModelItem* folder) const { return true; } + void setEmptyLookupMessage(const std::string& message) { } + std::string getEmptyLookupMessage() const { return mEmpty; } + bool showAllResults() const { return true; } + std::string::size_type getStringMatchOffset(LLFolderViewModelItem* item) const { return std::string::npos; } + std::string::size_type getFilterStringSize() const { return 0; } + + bool isActive() const { return false; } + bool isModified() const { return false; } + void clearModified() { } + const std::string& getName() const { return mEmpty; } + const std::string& getFilterText() { return mEmpty; } + void setModified(EFilterModified behavior = FILTER_RESTART) { } + + void setFilterCount(S32 count) { } + S32 getFilterCount() const { return 0; } + void decrementFilterCount() { } + + bool isDefault() const { return true; } + bool isNotDefault() const { return false; } + void markDefault() { } + void resetDefault() { } + + S32 getCurrentGeneration() const { return 0; } + S32 getFirstSuccessGeneration() const { return 0; } + S32 getFirstRequiredGeneration() const { return 0; } +private: + std::string mEmpty; +}; + +class LLConversationSort +{ +public: + LLConversationSort(U32 order = 0) + : mSortOrder(order), + mByDate(false), + mByName(false) + { + mByDate = (order & LLConversationFilter::SO_DATE); + mByName = (order & LLConversationFilter::SO_NAME); + } + + bool isByDate() const { return mByDate; } + U32 getSortOrder() const { return mSortOrder; } + + bool operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const; +private: + U32 mSortOrder; + bool mByDate; + bool mByName; +}; + +class LLConversationViewModel +: public LLFolderViewModel +{ +public: + typedef LLFolderViewModel base_t; + + void sort(LLFolderViewFolder* folder) { } // *TODO : implement conversation sort + bool contentsReady() { return true; } // *TODO : we need to check that participants names are available somewhat + bool startDrag(std::vector& items) { return false; } // We do not allow drag of conversation items + +private: +}; + +#endif // LL_LLCONVERSATIONMODEL_H -- cgit v1.2.3 From 6cf49a4a715c9f498d4b063f8d74e295be1f418c Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 9 Aug 2012 16:48:33 +0300 Subject: CHUI-171 WIP (Conversation not automatically readded to conversation window listing when open) - removal of the dependence between items of the conversations list and conversation's floaters. --- indra/newview/llconversationmodel.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 85760eb1a8..56a5b73c15 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -44,15 +44,15 @@ class LLIMFloaterContainer; class LLConversationItem; -typedef std::map conversations_items_map; -typedef std::map conversations_widgets_map; +typedef std::map conversations_items_map; +typedef std::map conversations_widgets_map; // Conversation items: we hold a list of those and create an LLFolderViewItem widget for each // that we tuck into the mConversationsListPanel. class LLConversationItem : public LLFolderViewModelItemCommon { public: - LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp); + LLConversationItem(std::string display_name, const LLUUID& uuid, LLIMFloaterContainer* containerp); LLConversationItem(LLIMFloaterContainer* containerp); virtual ~LLConversationItem() {} @@ -109,12 +109,11 @@ public: void* cargo_data, std::string& tooltip_msg) { return FALSE; } - bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } +// bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } private: std::string mName; const LLUUID mUUID; - LLFloater* mFloater; LLIMFloaterContainer* mContainer; }; -- cgit v1.2.3 From 2cf5307c9211b813689f0e441b9f56bc21f63348 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Aug 2012 19:29:22 -0700 Subject: CHUI-282 : WIP : Isolated llconversationview classes and suppressed the dependency of model to widgets --- indra/newview/llconversationmodel.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 56a5b73c15..2f7124aec5 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -52,8 +52,8 @@ typedef std::map conversations_widgets_map; class LLConversationItem : public LLFolderViewModelItemCommon { public: - LLConversationItem(std::string display_name, const LLUUID& uuid, LLIMFloaterContainer* containerp); - LLConversationItem(LLIMFloaterContainer* containerp); + LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItem() {} // Stub those things we won't really be using in this conversation context @@ -95,7 +95,7 @@ public: virtual void openItem( void ); virtual void closeItem( void ); virtual void previewItem( void ); - virtual void selectItem(void); + virtual void selectItem(void) { } virtual void showProperties(void); void setVisibleIfDetached(BOOL visible); @@ -114,7 +114,6 @@ public: private: std::string mName; const LLUUID mUUID; - LLIMFloaterContainer* mContainer; }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From 679d0f78f9a4a83e5eb2ec857ceb2d9b8c6f4d91 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Aug 2012 23:14:01 -0700 Subject: CHUI-282 : WIP, Clean up dependencies --- indra/newview/llconversationmodel.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 2f7124aec5..1ce70d754b 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -27,19 +27,9 @@ #ifndef LL_LLCONVERSATIONMODEL_H #define LL_LLCONVERSATIONMODEL_H -//#include -//#include - #include "llfolderviewitem.h" #include "llfolderviewmodel.h" -class LLButton; -class LLFloater; -class LLLayoutPanel; -class LLLayoutStack; -class LLTabContainer; -class LLIMFloaterContainer; - // Implementation of conversations list class LLConversationItem; -- cgit v1.2.3 From 4ea73df484d22815026367771f9d728d755f6274 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 23 Aug 2012 11:32:20 -0700 Subject: CHUI-282 : WIP : Further separate view from model for llconversation items --- indra/newview/llconversationmodel.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 1ce70d754b..cb03128cac 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -88,8 +88,6 @@ public: virtual void selectItem(void) { } virtual void showProperties(void); - void setVisibleIfDetached(BOOL visible); - // This method will be called to determine if a drop can be // performed, and will set drop to TRUE if a drop is // requested. -- cgit v1.2.3 From e537d6477dfa1eea86dc16c767b793fb530d1ebc Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 23 Aug 2012 19:44:10 -0700 Subject: CHUI-98 : Defining the various llconversation sub classes in their respective file --- indra/newview/llconversationmodel.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index cb03128cac..fc2c600364 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -104,6 +104,22 @@ private: const LLUUID mUUID; }; +class LLConversationItemSession : public LLConversationItem +{ +public: + LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemSession(LLFolderViewModelInterface& root_view_model); + virtual ~LLConversationItemSession() {} +}; + +class LLConversationItemParticipant : public LLConversationItem +{ +public: + LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model); + virtual ~LLConversationItemParticipant() {} +}; + // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. // We just stubb everything for the moment. class LLConversationFilter : public LLFolderViewFilter -- cgit v1.2.3 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/llconversationmodel.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index fc2c600364..1a63230e41 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -43,6 +43,7 @@ class LLConversationItem : public LLFolderViewModelItemCommon { public: LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItem() {} @@ -108,7 +109,7 @@ class LLConversationItemSession : public LLConversationItem { public: LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - LLConversationItemSession(LLFolderViewModelInterface& root_view_model); + LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} }; @@ -116,7 +117,7 @@ class LLConversationItemParticipant : public LLConversationItem { public: LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model); + LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemParticipant() {} }; -- cgit v1.2.3 From c4638d1dca7f3292d7ce48ddb2f5598f86282c88 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 28 Aug 2012 19:09:57 -0700 Subject: CHUI-280 : WIP : Implement update of LLConversationModel in LLParticipantList --- indra/newview/llconversationmodel.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 1a63230e41..484c0feb36 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -33,6 +33,8 @@ // Implementation of conversations list class LLConversationItem; +class LLConversationItemSession; +class LLConversationItemParticipant; typedef std::map conversations_items_map; typedef std::map conversations_widgets_map; @@ -100,9 +102,10 @@ public: // bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } -private: - std::string mName; - const LLUUID mUUID; + +protected: + std::string mName; // Name of the session or the participant + LLUUID mUUID; // UUID of the session or the participant }; class LLConversationItemSession : public LLConversationItem @@ -111,6 +114,19 @@ public: LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} + + void setSessionID(const LLUUID& session_id) { mUUID = session_id; } + void addParticipant(LLConversationItemParticipant* item); + void removeParticipant(LLConversationItemParticipant* item); + void clearParticipants(); + LLConversationItemParticipant* findParticipant(const LLUUID& participant_id); + + void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); + + bool isLoaded() { return mIsLoaded; } + +private: + bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise }; class LLConversationItemParticipant : public LLConversationItem @@ -119,6 +135,15 @@ public: LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemParticipant() {} + + bool isMuted() { return mIsMuted; } + bool isModerator() {return mIsModerator; } + void setIsMuted(bool is_muted) { mIsMuted = is_muted; } + void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; } + +private: + bool mIsMuted; // default is false + bool mIsModerator; // default is false }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From ad070b9155e2fddfc746319003253248ceb0eba3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 28 Aug 2012 23:13:10 -0700 Subject: CHUI-280 : Implement all LLConversationModel updates in LLParticipantList. Allow mAvatarList to be NULL. --- indra/newview/llconversationmodel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 484c0feb36..aa79e5aeb0 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -116,12 +116,14 @@ public: virtual ~LLConversationItemSession() {} void setSessionID(const LLUUID& session_id) { mUUID = session_id; } - void addParticipant(LLConversationItemParticipant* item); - void removeParticipant(LLConversationItemParticipant* item); + void addParticipant(LLConversationItemParticipant* participant); + void removeParticipant(LLConversationItemParticipant* participant); + void removeParticipant(const LLUUID& participant_id); void clearParticipants(); LLConversationItemParticipant* findParticipant(const LLUUID& participant_id); void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); + void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); bool isLoaded() { return mIsLoaded; } -- cgit v1.2.3 From ca7abc4c3be9310f4e5fec00b7d6ffadaba58ff0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 29 Aug 2012 10:07:55 -0700 Subject: CHUI-280 : Add print out debug methods --- indra/newview/llconversationmodel.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index aa79e5aeb0..af3756c45d 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -127,6 +127,8 @@ public: bool isLoaded() { return mIsLoaded; } + void dumpDebugData(); + private: bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise }; @@ -143,6 +145,8 @@ public: void setIsMuted(bool is_muted) { mIsMuted = is_muted; } void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; } + void dumpDebugData(); + private: bool mIsMuted; // default is false bool mIsModerator; // default is false -- cgit v1.2.3 From 9ff67f4a040fae53f28aa981309bce2356df1445 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 29 Aug 2012 18:27:21 -0700 Subject: CHUI-285 : WIP : Get the conversation floater to use the same LLParticipantList as the IM and call dialog --- indra/newview/llconversationmodel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index af3756c45d..1a2e09dfab 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -59,8 +59,8 @@ public: virtual LLPointer getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } - virtual BOOL isItemRenameable() const { return FALSE; } - virtual BOOL renameItem(const std::string& new_name) { return FALSE; } + virtual BOOL isItemRenameable() const { return TRUE; } + virtual BOOL renameItem(const std::string& new_name) { mName = new_name; return TRUE; } virtual BOOL isItemMovable( void ) const { return FALSE; } virtual BOOL isItemRemovable( void ) const { return FALSE; } virtual BOOL isItemInTrash( void) const { return FALSE; } -- cgit v1.2.3 From 8cd5d361600f34a0a7fa504a721bea3301191644 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 4 Sep 2012 22:11:28 -0700 Subject: CHUI-285 : Create participant widgets in the conversation list --- indra/newview/llconversationmodel.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 1a2e09dfab..5947055e0f 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -60,7 +60,7 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } virtual BOOL isItemRenameable() const { return TRUE; } - virtual BOOL renameItem(const std::string& new_name) { mName = new_name; return TRUE; } + virtual BOOL renameItem(const std::string& new_name) { mName = new_name; mNeedsRefresh = true; return TRUE; } virtual BOOL isItemMovable( void ) const { return FALSE; } virtual BOOL isItemRemovable( void ) const { return FALSE; } virtual BOOL isItemInTrash( void) const { return FALSE; } @@ -102,10 +102,14 @@ public: // bool hasSameValues(std::string name, const LLUUID& uuid) { return ((name == mName) && (uuid == mUUID)); } bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); } - + + void resetRefresh() { mNeedsRefresh = false; } + bool needsRefresh() { return mNeedsRefresh; } + protected: std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant + bool mNeedsRefresh; // Flag signaling to the view that something changed for this item }; class LLConversationItemSession : public LLConversationItem @@ -115,7 +119,7 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} - void setSessionID(const LLUUID& session_id) { mUUID = session_id; } + void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); void removeParticipant(const LLUUID& participant_id); @@ -142,8 +146,8 @@ public: bool isMuted() { return mIsMuted; } bool isModerator() {return mIsModerator; } - void setIsMuted(bool is_muted) { mIsMuted = is_muted; } - void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; } + void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } + void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } void dumpDebugData(); -- cgit v1.2.3 From ee5e689331ff6ba44cebaf9e9fb48f7bc3f590c4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 6 Sep 2012 16:32:17 -0700 Subject: CHUI-285 : Completed. Update the names of the participants. --- indra/newview/llconversationmodel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 5947055e0f..26c7a29d76 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -29,6 +29,7 @@ #include "llfolderviewitem.h" #include "llfolderviewmodel.h" +#include "llavatarname.h" // Implementation of conversations list @@ -149,6 +150,8 @@ public: void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } + void onAvatarNameCache(const LLAvatarName& av_name); + void dumpDebugData(); private: -- cgit v1.2.3 From c26867bb6d1226c82c11f2f386f73b6d8e3ed749 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 7 Sep 2012 19:53:38 -0700 Subject: CHUI-285 : Implement sort, alphabetical only for the moment --- indra/newview/llconversationmodel.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 26c7a29d76..2775bf8186 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -208,23 +208,14 @@ private: class LLConversationSort { public: - LLConversationSort(U32 order = 0) - : mSortOrder(order), - mByDate(false), - mByName(false) - { - mByDate = (order & LLConversationFilter::SO_DATE); - mByName = (order & LLConversationFilter::SO_NAME); - } + LLConversationSort(U32 order = 0) : mSortOrder(order) { } - bool isByDate() const { return mByDate; } + bool isByDate() const { return (mSortOrder & LLConversationFilter::SO_DATE); } U32 getSortOrder() const { return mSortOrder; } bool operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const; private: U32 mSortOrder; - bool mByDate; - bool mByName; }; class LLConversationViewModel @@ -233,7 +224,7 @@ class LLConversationViewModel public: typedef LLFolderViewModel base_t; - void sort(LLFolderViewFolder* folder) { } // *TODO : implement conversation sort + void sort(LLFolderViewFolder* folder); bool contentsReady() { return true; } // *TODO : we need to check that participants names are available somewhat bool startDrag(std::vector& items) { return false; } // We do not allow drag of conversation items -- cgit v1.2.3 From 5dc8738076d158aa74a93f7f3630a17d9102fdc4 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Mon, 10 Sep 2012 07:40:13 -0700 Subject: CHUI-283: Basic Implementation, just have hard coded avatar icon appearing and profile/info buttons visible. profile/info buttons do not have proper positioning or mouseclick events. --- indra/newview/llconversationmodel.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/newview/llconversationmodel.h (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h old mode 100644 new mode 100755 index 1a2e09dfab..7baabf7f76 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -29,6 +29,7 @@ #include "llfolderviewitem.h" #include "llfolderviewmodel.h" +#include "llviewerfoldertype.h" // Implementation of conversations list @@ -55,7 +56,7 @@ public: virtual const std::string& getSearchableName() const { return mName; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer getIcon() const { return NULL; } + virtual LLPointer getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILE, FALSE)); } virtual LLPointer getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } @@ -115,6 +116,7 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} + LLPointer getIcon() const { return NULL; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; } void addParticipant(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); -- cgit v1.2.3 From 4b52515b543546844835064dfb89e5af2bbbd948 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 13 Sep 2012 20:10:45 +0300 Subject: CHUI-282 WIP Fixed conversation list items selection. Fixed displaying session participants only when session item is open. --- indra/newview/llconversationmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 26c7a29d76..e5c727feae 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -120,6 +120,8 @@ public: LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} + /*virtual*/ bool hasChildren() const; + void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); -- cgit v1.2.3 From c6863d18d7c981756c57bbcd52baa06af00d1551 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 13 Sep 2012 19:10:28 -0700 Subject: CHUI-283: Now upon the information icon and speaker icon do not overlap the username text. Instead the username text will be truncated with an ellipse to prevent the overlap. Also did a code cleanup. --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 4f13d3d3a1..e1713f9db7 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -57,7 +57,7 @@ public: virtual const std::string& getSearchableName() const { return mName; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILE, FALSE)); } + virtual LLPointer getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILEXXXGGG, FALSE)); } virtual LLPointer getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } -- cgit v1.2.3 From 9b0d627a06a817fc11edc4c6c718f1114aa7cfcf Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 14 Sep 2012 19:47:52 -0700 Subject: CHUI-192 : Implement menus and settings for sorting. The sort itself is not performed though. Wait for CHUI-340 for this. --- indra/newview/llconversationmodel.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index c340194dd3..ef1903ab19 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -170,10 +170,14 @@ public: enum ESortOrderType { - SO_NAME = 0, // Sort inventory by name - SO_DATE = 0x1, // Sort inventory by date + SO_NAME = 0, // Sort by name + SO_DATE = 0x1, // Sort by date (most recent) + SO_SESSION_TYPE = 0x2, // Sort by type (valid only for sessions) + SO_DISTANCE = 0x3, // Sort by distance (valid only for participants in nearby chat) }; - + // Default sort order is by type for sessions and by date for participants + static const U32 SO_DEFAULT = (SO_SESSION_TYPE << 16) | (SO_DATE); + LLConversationFilter() { mEmpty = ""; } ~LLConversationFilter() {} @@ -211,13 +215,18 @@ private: class LLConversationSort { public: - LLConversationSort(U32 order = 0) : mSortOrder(order) { } - - bool isByDate() const { return (mSortOrder & LLConversationFilter::SO_DATE); } - U32 getSortOrder() const { return mSortOrder; } + LLConversationSort(U32 order = LLConversationFilter::SO_DEFAULT) : mSortOrder(order) { } + // 16 LSB bits used for participants, 16 MSB bits for sessions + U32 getSortOrderSessions() const { return ((mSortOrder >> 16) & 0xFFFF); } + U32 getSortOrderParticipants() const { return (mSortOrder & 0xFFFF); } + void setSortOrderSessions(LLConversationFilter::ESortOrderType session) { mSortOrder = ((session & 0xFFFF) << 16) | (mSortOrder & 0xFFFF); } + void setSortOrderParticipants(LLConversationFilter::ESortOrderType participant) { mSortOrder = (mSortOrder & 0xFFFF0000) | (participant & 0xFFFF); } + bool operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const; + operator U32() const { return mSortOrder; } private: + // Note: we're treating this value as a sort order bitmask as done in other places in the code (e.g. inventory) U32 mSortOrder; }; -- cgit v1.2.3 From d22c8510b19f12e81dc68562de45c2c364036440 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 17 Sep 2012 17:53:17 -0700 Subject: CHUI-340 : WIP : Sorting implemented. Type and name work. Date and distance still need the relevant values to be computed. --- indra/newview/llconversationmodel.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index ef1903ab19..954543f91a 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -46,6 +46,17 @@ typedef std::map conversations_widgets_map; class LLConversationItem : public LLFolderViewModelItemCommon { public: + enum EConversationType + { + CONV_UNKNOWN = 0, + CONV_PARTICIPANT = 1, + CONV_SESSION_NEARBY = 2, // The order counts here as it is used to sort sessions by type + CONV_SESSION_1_ON_1 = 3, + CONV_SESSION_AD_HOC = 4, + CONV_SESSION_GROUP = 5, + CONV_SESSION_UNKNOWN = 6 + }; + LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(LLFolderViewModelInterface& root_view_model); @@ -93,6 +104,11 @@ public: virtual void selectItem(void) { } virtual void showProperties(void); + // Methods used in sorting (see LLConversationSort::operator() + EConversationType const getType() const { return mConvType; } + virtual const bool getTime(F32& time) const { return false; } + virtual const bool getDistanceToAgent(F32& distance) const { return false; } + // This method will be called to determine if a drop can be // performed, and will set drop to TRUE if a drop is // requested. @@ -111,6 +127,7 @@ public: protected: std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant + EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item }; -- cgit v1.2.3 From 3c8407f32cf947ee1631ed66bba7a676e8b3b670 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 18 Sep 2012 12:15:51 -0700 Subject: CHUI-283: Now the avatar icon loads in the user's avatar image.Also the avatar image is of proper size. The participant of the conversation is offset correctly as well. --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index ef1903ab19..49af927acf 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -57,7 +57,7 @@ public: virtual const std::string& getSearchableName() const { return mName; } virtual const LLUUID& getUUID() const { return mUUID; } virtual time_t getCreationDate() const { return 0; } - virtual LLPointer getIcon() const { return LLUI::getUIImage(LLViewerFolderType::lookupIconName(LLFolderType::FT_PROFILEXXXGGG, FALSE)); } + virtual LLPointer getIcon() const { return NULL; } virtual LLPointer getOpenIcon() const { return getIcon(); } virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; } virtual std::string getLabelSuffix() const { return LLStringUtil::null; } -- cgit v1.2.3 From 1107803a5c6da07cd5171f06afc0490f3eca7bf7 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 20 Sep 2012 17:50:58 -0700 Subject: CHUI-340 : WIP : Implement time update and comparison for sessions and participants --- indra/newview/llconversationmodel.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index dbc04223af..f3f99b5575 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -104,9 +104,9 @@ public: virtual void selectItem(void) { } virtual void showProperties(void); - // Methods used in sorting (see LLConversationSort::operator() + // Methods used in sorting (see LLConversationSort::operator()) EConversationType const getType() const { return mConvType; } - virtual const bool getTime(F32& time) const { return false; } + virtual const bool getTime(F64& time) const { return false; } virtual const bool getDistanceToAgent(F32& distance) const { return false; } // This method will be called to determine if a drop can be @@ -152,6 +152,8 @@ public: bool isLoaded() { return mIsLoaded; } + virtual const bool getTime(F64& time) const; + void dumpDebugData(); private: @@ -169,14 +171,18 @@ public: bool isModerator() {return mIsModerator; } void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } + void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); } void onAvatarNameCache(const LLAvatarName& av_name); + virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1 ? true : false); } + void dumpDebugData(); private: bool mIsMuted; // default is false bool mIsModerator; // default is false + F64 mLastActiveTime; }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From fc6bbee3f4ba1abba2956ee92f7ac7ba01d0f59b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 20 Sep 2012 20:48:20 -0700 Subject: CHUI-340 : WIP : Implement time update on all IM typing cases --- indra/newview/llconversationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index f3f99b5575..e2c88785a2 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -149,6 +149,7 @@ public: void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); + void setParticipantTimeNow(const LLUUID& participant_id); bool isLoaded() { return mIsLoaded; } -- cgit v1.2.3 From b5583906d0cce652f456851732db5b1c19659662 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 21 Sep 2012 18:12:06 -0700 Subject: CHUI-340 : WIP : Fix sorting bugs on time for sessions, simplified the update time mechanism and clean up --- indra/newview/llconversationmodel.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index e2c88785a2..e67aeb9aca 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -106,7 +106,7 @@ public: // Methods used in sorting (see LLConversationSort::operator()) EConversationType const getType() const { return mConvType; } - virtual const bool getTime(F64& time) const { return false; } + virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1); } virtual const bool getDistanceToAgent(F32& distance) const { return false; } // This method will be called to determine if a drop can be @@ -129,6 +129,7 @@ protected: LLUUID mUUID; // UUID of the session or the participant EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item + F64 mLastActiveTime; }; class LLConversationItemSession : public LLConversationItem @@ -149,7 +150,7 @@ public: void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); - void setParticipantTimeNow(const LLUUID& participant_id); + void setTimeNow(const LLUUID& participant_id); bool isLoaded() { return mIsLoaded; } @@ -172,18 +173,15 @@ public: bool isModerator() {return mIsModerator; } void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } - void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); } + void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } void onAvatarNameCache(const LLAvatarName& av_name); - virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1 ? true : false); } - void dumpDebugData(); private: bool mIsMuted; // default is false bool mIsModerator; // default is false - F64 mLastActiveTime; }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From 552f288a0caea45e30a231478a19f4243d69689c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 21 Sep 2012 20:13:50 -0700 Subject: CHUI-340 : Implement distance computation and update --- indra/newview/llconversationmodel.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index e67aeb9aca..18c5dd1ce1 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -107,7 +107,7 @@ public: // Methods used in sorting (see LLConversationSort::operator()) EConversationType const getType() const { return mConvType; } virtual const bool getTime(F64& time) const { time = mLastActiveTime; return (time > 0.1); } - virtual const bool getDistanceToAgent(F32& distance) const { return false; } + virtual const bool getDistanceToAgent(F64& distance) const { return false; } // This method will be called to determine if a drop can be // performed, and will set drop to TRUE if a drop is @@ -151,6 +151,7 @@ public: void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted); void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); void setTimeNow(const LLUUID& participant_id); + void setDistance(const LLUUID& participant_id, F64 dist); bool isLoaded() { return mIsLoaded; } @@ -174,14 +175,18 @@ public: void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } + void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } void onAvatarNameCache(const LLAvatarName& av_name); + virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } + void dumpDebugData(); private: bool mIsMuted; // default is false bool mIsModerator; // default is false + F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set. }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From 3502e783b7425ba30d92f66697bafa89ae891e60 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 25 Sep 2012 22:02:44 -0700 Subject: CHUI-342 : Fixed : Use user name and display name correctly. Sort according to user names. --- indra/newview/llconversationmodel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 18c5dd1ce1..30f94d51ae 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -170,6 +170,8 @@ public: LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemParticipant() {} + virtual const std::string& getDisplayName() const { return mDisplayName; } + bool isMuted() { return mIsMuted; } bool isModerator() {return mIsModerator; } void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } @@ -186,6 +188,7 @@ public: private: bool mIsMuted; // default is false bool mIsModerator; // default is false + std::string mDisplayName; F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set. }; -- cgit v1.2.3 From 0651e10afff81a6e32828c122753d87b8503a79b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 28 Sep 2012 11:15:45 -0700 Subject: CHUI-342, CHUI-366 and CHUI-367 : WIP : Allow a NO_TOOLTIP value for tooltips, update display/user names and sort on display/user names --- indra/newview/llconversationmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 30f94d51ae..82d4f0a710 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -123,9 +123,11 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } + bool const useNameForSort() const { return mUseNameForSort; } protected: std::string mName; // Name of the session or the participant + bool mUseNameForSort; LLUUID mUUID; // UUID of the session or the participant EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item -- cgit v1.2.3 From 7fc33cc47fdc080bbc7674cf118011b689ba1485 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 28 Sep 2012 17:30:18 -0700 Subject: CHUI-367 : Completed : Show user name tooltip in all situations so to avoid the conversation name showing up --- indra/newview/llconversationmodel.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 82d4f0a710..30f94d51ae 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -123,11 +123,9 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } - bool const useNameForSort() const { return mUseNameForSort; } protected: std::string mName; // Name of the session or the participant - bool mUseNameForSort; LLUUID mUUID; // UUID of the session or the participant EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item -- cgit v1.2.3 From 11a148415e810706f2a1835b6b717a0a062d458f Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 28 Sep 2012 18:22:05 -0700 Subject: CHUI-102: Now the participants and one-on-one conversations have right-click-menus. These menus are functional as well, but 'chat history' does not yet work. --- indra/newview/llconversationmodel.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 30f94d51ae..43fa66e8e2 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -41,6 +41,8 @@ class LLConversationItemParticipant; typedef std::map conversations_items_map; typedef std::map conversations_widgets_map; +typedef std::vector menuentry_vec_t; + // Conversation items: we hold a list of those and create an LLFolderViewItem widget for each // that we tuck into the mConversationsListPanel. class LLConversationItem : public LLFolderViewModelItemCommon @@ -124,6 +126,8 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } + void buildParticipantMenuOptions(menuentry_vec_t& items); + protected: std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant @@ -155,6 +159,7 @@ public: bool isLoaded() { return mIsLoaded; } + void buildContextMenu(LLMenuGL& menu, U32 flags); virtual const bool getTime(F64& time) const; void dumpDebugData(); @@ -178,7 +183,8 @@ public: void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } - + + void buildContextMenu(LLMenuGL& menu, U32 flags); void onAvatarNameCache(const LLAvatarName& av_name); virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } @@ -273,4 +279,14 @@ public: private: }; +// Utility function to hide all entries except those in the list +// Can be called multiple times on the same menu (e.g. if multiple items +// are selected). If "append" is false, then only common enabled items +// are set as enabled. + +//(defined in inventorybridge.cpp) +void hide_context_entries(LLMenuGL& menu, + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); + #endif // LL_LLCONVERSATIONMODEL_H -- cgit v1.2.3 From 8e1a9e2813da6b9d5c17795b375098fb6a386ee1 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Mon, 1 Oct 2012 13:54:53 -0700 Subject: CHUI-102: Cleaned up code after code review. --- indra/newview/llconversationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 43fa66e8e2..f84fbe39f1 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -285,6 +285,7 @@ private: // are set as enabled. //(defined in inventorybridge.cpp) +//TODO: Gilbert Linden - Refactor to make this function non-global void hide_context_entries(LLMenuGL& menu, const menuentry_vec_t &entries_to_show, const menuentry_vec_t &disabled_entries); -- cgit v1.2.3 From 9d989feede2dbef934cdc459b4758c024df862d6 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 2 Oct 2012 15:10:12 -0700 Subject: CHUI-102: Now the user can select a conversation and use the right-click-menu to enable/disable voice. --- indra/newview/llconversationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index f84fbe39f1..bc72cd96ea 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -160,6 +160,7 @@ public: bool isLoaded() { return mIsLoaded; } void buildContextMenu(LLMenuGL& menu, U32 flags); + void addVoiceOptions(menuentry_vec_t& items); virtual const bool getTime(F64& time) const; void dumpDebugData(); -- cgit v1.2.3 From 4a25ce8b9d5d56b160d0d13c4681cd916c4ea4e0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 2 Oct 2012 22:34:44 -0700 Subject: CHUI-341 : Implement the use of LLEventStream and LLEventPump to signal conversation model changes, picked by LLIMFloaterContainer. Suppress pooling on draw(). --- indra/newview/llconversationmodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 30f94d51ae..97e5b0fc31 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -124,6 +124,8 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } + void postEvent(const std::string& event_type); + protected: std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant -- cgit v1.2.3 From bd64c483639ae33518609398fce7c51ddc73dae7 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 3 Oct 2012 16:46:46 -0700 Subject: CHUI-358 : Fixed the removal of participants as they leave conversations. Used the event mechanism for this. --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 97e5b0fc31..32280f3293 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -124,7 +124,7 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } - void postEvent(const std::string& event_type); + void postEvent(const std::string& event_type, LLConversationItemParticipant* participant); protected: std::string mName; // Name of the session or the participant -- cgit v1.2.3 From f533a251553d95045ab7c1d37a149004cd1e2ef0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 4 Oct 2012 20:36:04 -0700 Subject: CHUI-381 : Implement add_participant and update_participant events handling. --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 7218cdf25a..d5f7e1a56b 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -126,7 +126,7 @@ public: void resetRefresh() { mNeedsRefresh = false; } bool needsRefresh() { return mNeedsRefresh; } - void postEvent(const std::string& event_type, LLConversationItemParticipant* participant); + void postEvent(const std::string& event_type, LLConversationItemSession* session, LLConversationItemParticipant* participant); void buildParticipantMenuOptions(menuentry_vec_t& items); -- cgit v1.2.3 From db452823e5cc615225f3f163d827954447cf9bd8 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 5 Oct 2012 20:28:11 -0700 Subject: CHUI-194 : WIP : Update the ad-hoc conversation line item title, add a new update_session event. Still some clean up to do. --- indra/newview/llconversationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index d5f7e1a56b..1d082852f5 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -149,6 +149,7 @@ public: LLPointer getIcon() const { return NULL; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); + void updateParticipantName(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); void removeParticipant(const LLUUID& participant_id); void clearParticipants(); -- cgit v1.2.3 From fb3df4790e27345a1e45f4a4675e756c1e551f21 Mon Sep 17 00:00:00 2001 From: William Todd Stinson Date: Tue, 30 Oct 2012 15:59:42 -0700 Subject: CHUI-459: Creating a fetchAvatarName() method for the LLConversationItemParticipant class to allow the class to query for the avatar display name directly. Also, added a field to store the avatar name cache callback connection so that we can disconnect properly on object destruction to avoid a crash with the callback attempting to access recently freed memory. --- indra/newview/llconversationmodel.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 1d082852f5..481d46af58 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -27,9 +27,11 @@ #ifndef LL_LLCONVERSATIONMODEL_H #define LL_LLCONVERSATIONMODEL_H +#include + +#include "llavatarname.h" #include "llfolderviewitem.h" #include "llfolderviewmodel.h" -#include "llavatarname.h" #include "llviewerfoldertype.h" // Implementation of conversations list @@ -177,7 +179,7 @@ class LLConversationItemParticipant : public LLConversationItem public: LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - virtual ~LLConversationItemParticipant() {} + virtual ~LLConversationItemParticipant(); virtual const std::string& getDisplayName() const { return mDisplayName; } @@ -189,17 +191,21 @@ public: void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } void buildContextMenu(LLMenuGL& menu, U32 flags); - void onAvatarNameCache(const LLAvatarName& av_name); virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } + void fetchAvatarName(); + void dumpDebugData(); private: + void onAvatarNameCache(const LLAvatarName& av_name); + bool mIsMuted; // default is false bool mIsModerator; // default is false std::string mDisplayName; F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set. + boost::signals2::connection mAvatarNameCacheConnection; }; // We don't want to ever filter conversations but we need to declare that class to create a conversation view model. -- cgit v1.2.3 From 33068c6da8f079c557e4fb520b074f6e5ce40ba4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 14 Nov 2012 10:40:51 -0800 Subject: CHUI-479 : WIP : Add debug tracing into speaking indicator manager and monitors (to be deleted eventually). --- indra/newview/llconversationmodel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 481d46af58..2ee21d0c16 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -195,6 +195,7 @@ public: virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } void fetchAvatarName(); + LLConversationItemSession* getParentSession(); void dumpDebugData(); -- cgit v1.2.3 From bd62d1d33717536e71f5fbb5ab4a477a69494c77 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 14 Nov 2012 20:00:01 -0800 Subject: CHUI-479 : WIP : More tracing --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 2ee21d0c16..dd849210a8 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -168,7 +168,7 @@ public: void addVoiceOptions(menuentry_vec_t& items); virtual const bool getTime(F64& time) const; - void dumpDebugData(); + void dumpDebugData(bool dump_children = false); private: bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise -- cgit v1.2.3 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.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llconversationmodel.h') 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); -- cgit v1.2.3 From be6f3286f4a969a4de73d8f3af7b8262fe70bfb9 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 13 Dec 2012 18:43:52 +0200 Subject: Fixed path for correct assembly of the project --- indra/newview/llconversationmodel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 7177d3a414..743a6ba40b 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -30,8 +30,8 @@ #include #include "llavatarname.h" -#include "llfolderviewitem.h" -#include "llfolderviewmodel.h" +#include "../llui/llfolderviewitem.h" +#include "../llui/llfolderviewmodel.h" #include "llviewerfoldertype.h" // Implementation of conversations list -- cgit v1.2.3 From 090636f107a2d3ba3438a6690f36eac3ec257314 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 20 Dec 2012 18:36:01 -0800 Subject: CHUI-429 : Fixed! Add a flag to filter multi/single selection situations in menu building. Implement in conversation contextual menu. --- indra/newview/llconversationmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 743a6ba40b..02002d8f70 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -130,7 +130,7 @@ public: void postEvent(const std::string& event_type, LLConversationItemSession* session, LLConversationItemParticipant* participant); - void buildParticipantMenuOptions(menuentry_vec_t& items); + void buildParticipantMenuOptions(menuentry_vec_t& items, U32 flags); protected: std::string mName; // Name of the session or the participant -- cgit v1.2.3 From 12554bffb34895533ed11013a780bfa088756a67 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 4 Jan 2013 20:23:14 -0800 Subject: CHUI-580 : Fixed : Avoid fetching names while reacting to display name checkbox change (overkill), make display name pref disabled when usePeopleAPI is off --- indra/newview/llconversationmodel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 743a6ba40b..6ae891203d 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -195,14 +195,16 @@ public: virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } - void fetchAvatarName(); + void fetchAvatarName(); // fetch and update the avatar name + void updateAvatarName(); // get from the cache (do *not* fetch) and update the avatar name LLConversationItemSession* getParentSession(); void dumpDebugData(); void setModeratorOptionsVisible(bool visible) { mDisplayModeratorOptions = visible; } private: - void onAvatarNameCache(const LLAvatarName& av_name); + void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName + void updateAvatarName(const LLAvatarName& av_name); bool mIsMuted; // default is false bool mIsModerator; // default is false -- cgit v1.2.3 From def252341a8c1675405404a6588749d06fa40791 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Tue, 8 Jan 2013 23:37:29 +0200 Subject: CHUI-612 FIXED Blank conversation names showing in conversation list --- indra/newview/llconversationmodel.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 01b3850f5e..6aaea041e4 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -64,7 +64,7 @@ public: LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(LLFolderViewModelInterface& root_view_model); - virtual ~LLConversationItem() {} + virtual ~LLConversationItem(); // Stub those things we won't really be using in this conversation context virtual const std::string& getName() const { return mName; } @@ -132,27 +132,31 @@ public: void buildParticipantMenuOptions(menuentry_vec_t& items, U32 flags); + void fetchAvatarName(bool isParticipant = true); // fetch and update the avatar name + protected: + virtual void onAvatarNameCache(const LLAvatarName& av_name) {} + std::string mName; // Name of the session or the participant LLUUID mUUID; // UUID of the session or the participant EConversationType mConvType; // Type of conversation item bool mNeedsRefresh; // Flag signaling to the view that something changed for this item F64 mLastActiveTime; bool mDisplayModeratorOptions; -}; + boost::signals2::connection mAvatarNameCacheConnection; +}; class LLConversationItemSession : public LLConversationItem { public: LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - virtual ~LLConversationItemSession() {} /*virtual*/ bool hasChildren() const; LLPointer getIcon() const { return NULL; } void setSessionID(const LLUUID& session_id) { mUUID = session_id; mNeedsRefresh = true; } void addParticipant(LLConversationItemParticipant* participant); - void updateParticipantName(LLConversationItemParticipant* participant); + void updateName(LLConversationItemParticipant* participant); void removeParticipant(LLConversationItemParticipant* participant); void removeParticipant(const LLUUID& participant_id); void clearParticipants(); @@ -172,6 +176,8 @@ public: void dumpDebugData(bool dump_children = false); private: + /*virtual*/ void onAvatarNameCache(const LLAvatarName& av_name); + bool mIsLoaded; // true if at least one participant has been added to the session, false otherwise }; @@ -180,7 +186,6 @@ class LLConversationItemParticipant : public LLConversationItem public: LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - virtual ~LLConversationItemParticipant(); virtual const std::string& getDisplayName() const { return mDisplayName; } @@ -195,8 +200,7 @@ public: virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); } - void fetchAvatarName(); // fetch and update the avatar name - void updateAvatarName(); // get from the cache (do *not* fetch) and update the avatar name + void updateName(); // get from the cache (do *not* fetch) and update the avatar name LLConversationItemSession* getParentSession(); void dumpDebugData(); @@ -204,7 +208,7 @@ public: private: void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName - void updateAvatarName(const LLAvatarName& av_name); + void updateName(const LLAvatarName& av_name); bool mIsMuted; // default is false bool mIsModerator; // default is false -- cgit v1.2.3 From 4a96941b73254538c27a83fe28c637065e93f2e2 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Mon, 28 Jan 2013 18:06:27 +0200 Subject: CHUI-395 (Group moderators are not shown as Moderators in group conversation) --- indra/newview/llconversationmodel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index 6aaea041e4..c907d1d6d2 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -205,13 +205,15 @@ public: void dumpDebugData(); void setModeratorOptionsVisible(bool visible) { mDisplayModeratorOptions = visible; } + void setDisplayModeratorRole(bool displayRole); private: void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName void updateName(const LLAvatarName& av_name); - bool mIsMuted; // default is false - bool mIsModerator; // default is false + bool mIsMuted; // default is false + bool mIsModerator; // default is false + bool mDisplayModeratorLabel; // default is false std::string mDisplayName; F64 mDistToAgent; // Distance to the agent. A negative (meaningless) value means the distance has not been set. boost::signals2::connection mAvatarNameCacheConnection; -- cgit v1.2.3 From 31e5465158db171a4ac6d3aa48d44e8a62c012f9 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 27 Feb 2013 01:35:27 +0200 Subject: CHUI-788 FIXED Mute icon not shown in participant list in conversation floater --- indra/newview/llconversationmodel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationmodel.h') diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index c907d1d6d2..8766585049 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -189,9 +189,9 @@ public: virtual const std::string& getDisplayName() const { return mDisplayName; } - bool isMuted() { return mIsMuted; } - bool isModerator() {return mIsModerator; } - void setIsMuted(bool is_muted) { mIsMuted = is_muted; mNeedsRefresh = true; } + bool isVoiceMuted(); + bool isModerator() const { return mIsModerator; } + void muteVoice(bool mute_voice); void setIsModerator(bool is_moderator) { mIsModerator = is_moderator; mNeedsRefresh = true; } void setTimeNow() { mLastActiveTime = LLFrameTimer::getElapsedSeconds(); mNeedsRefresh = true; } void setDistance(F64 dist) { mDistToAgent = dist; mNeedsRefresh = true; } -- cgit v1.2.3