From 85e553638e51994824683497bd9ccc964c7cc1fc Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 6 Jun 2012 19:37:59 -0700 Subject: CHUI-137 : Implement temporary conversations list (not working yet) --- indra/newview/llimfloatercontainer.h | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 92938ff405..5cfdb41ad3 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -35,11 +35,85 @@ #include "llavatarpropertiesprocessor.h" #include "llgroupmgr.h" +#include "llfolderviewitem.h" +#include "llfoldervieweventlistener.h" + class LLButton; class LLLayoutPanel; class LLLayoutStack; class LLTabContainer; +// CHUI-137 : Temporary implementation of conversations list +class LLConversationItem; + +typedef std::list conversations_items_list_t; +typedef std::list conversations_widgets_list_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 LLFolderViewEventListener +{ +public: + LLConversationItem(std::string name); + 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 LLUUID& getUUID() const { return mUUID; } + virtual time_t getCreationDate() const { return 0; } + virtual PermissionMask getPermissionMask() const { return PERM_ALL; } + virtual LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; } + 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(LLDynamicArray& batch) { } + virtual void move( LLFolderViewEventListener* parent_listener ) { } + virtual BOOL isItemCopyable() const { return FALSE; } + virtual BOOL copyToClipboard() const { return FALSE; } + virtual void cutToClipboard() { } + 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 LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } + virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + + // The action callbacks (or so we think...) + 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); + + // This method should be called when a drag begins. returns TRUE + // if the drag can begin, otherwise FALSE. + virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) 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. Returns TRUE if a drop is possible/happened, + // otherwise FALSE. + virtual BOOL dragOrDrop(MASK mask, BOOL drop, + EDragAndDropType cargo_type, + void* cargo_data, + std::string& tooltip_msg) { return FALSE; } +private: + std::string mName; + LLUUID mUUID; +}; + // CHUI-137 : End + class LLIMFloaterContainer : public LLMultiFloater { public: @@ -64,6 +138,8 @@ public: virtual void setMinimized(BOOL b); void collapseMessagesPane(bool collapse); + + LLFolderViewItem* createConversationItemWidget(LLConversationItem* item); private: typedef std::map avatarID_panel_map_t; @@ -84,6 +160,11 @@ private: LLLayoutPanel* mMessagesPane; LLLayoutPanel* mConversationsPane; LLLayoutStack* mConversationsStack; + + // CHUI-137 : Data + LLPanel* mConversationsListPanel; // The widget we add list item to (title of each conversation) + conversations_items_list_t mConversationsItems; + conversations_widgets_list_t mConversationsWidgets; }; #endif // LL_LLIMFLOATERCONTAINER_H -- cgit v1.2.3 From 1aba6c119ef05a4cfd91325c8455dc8c60098746 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 8 Jun 2012 17:26:13 -0700 Subject: CHUI-137 : Implement conversation list, temporary solution: add but doesn't take out items from the list --- indra/newview/llimfloatercontainer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 5cfdb41ad3..d04ac873fa 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -46,7 +46,7 @@ class LLTabContainer; // CHUI-137 : Temporary implementation of conversations list class LLConversationItem; -typedef std::list conversations_items_list_t; +typedef std::list conversations_items_list_t; typedef std::list conversations_widgets_list_t; // Conversation items: we hold a list of those and create an LLFolderViewItem widget for each that we tuck @@ -110,7 +110,7 @@ public: std::string& tooltip_msg) { return FALSE; } private: std::string mName; - LLUUID mUUID; + const LLUUID mUUID; }; // CHUI-137 : End -- cgit v1.2.3 From e286330365576e67fa9b59166f6019e89f09f3cf Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 8 Jun 2012 17:58:15 -0700 Subject: CHUI-137 : Fix build error after merge --- indra/newview/llimfloatercontainer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index d04ac873fa..84b1c864cc 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -78,7 +78,7 @@ public: virtual void move( LLFolderViewEventListener* parent_listener ) { } virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL copyToClipboard() const { return FALSE; } - virtual void cutToClipboard() { } + virtual BOOL cutToClipboard() const { return FALSE; } virtual BOOL isClipboardPasteable() const { return FALSE; } virtual void pasteFromClipboard() { } virtual void pasteLinkFromClipboard() { } -- cgit v1.2.3 From db67c21f901800d27c9dd2ea2ce6134dc3bd33f1 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 11 Jun 2012 17:25:17 -0700 Subject: CHUI-137 : Implemented switch conversation in the conversation list --- indra/newview/llimfloatercontainer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 84b1c864cc..afb65671ae 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -45,6 +45,7 @@ class LLTabContainer; // CHUI-137 : Temporary implementation of conversations list class LLConversationItem; +class LLIMFloaterContainer; typedef std::list conversations_items_list_t; typedef std::list conversations_widgets_list_t; @@ -54,7 +55,7 @@ typedef std::list conversations_widgets_list_t; class LLConversationItem : public LLFolderViewEventListener { public: - LLConversationItem(std::string name); + LLConversationItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp); virtual ~LLConversationItem() {} // Stub those things we won't really be using in this conversation context @@ -111,6 +112,8 @@ public: private: std::string mName; const LLUUID mUUID; + LLFloater* mFloater; + LLIMFloaterContainer* mContainer; }; // CHUI-137 : End -- cgit v1.2.3 From 0e2f5c2ebad0a19e9c5e151a4ac3ae7321f2f296 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 11 Jun 2012 22:12:43 -0700 Subject: CHUI-137 : Implemented tear off and close of conversation in the list --- indra/newview/llimfloatercontainer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index afb65671ae..3df5a07df8 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -47,8 +47,8 @@ class LLTabContainer; class LLConversationItem; class LLIMFloaterContainer; -typedef std::list conversations_items_list_t; -typedef std::list conversations_widgets_list_t; +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. @@ -166,8 +166,8 @@ private: // CHUI-137 : Data LLPanel* mConversationsListPanel; // The widget we add list item to (title of each conversation) - conversations_items_list_t mConversationsItems; - conversations_widgets_list_t mConversationsWidgets; + conversations_items_map mConversationsItems; + conversations_widgets_map mConversationsWidgets; }; #endif // LL_LLIMFLOATERCONTAINER_H -- cgit v1.2.3 From b01ab3b9b2d55a8536894a049354b87bb1d71cdb Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 13 Jun 2012 13:52:26 -0700 Subject: EXP-137 : Comments cleanup --- indra/newview/llimfloatercontainer.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 3df5a07df8..23927239a5 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -42,16 +42,16 @@ class LLButton; class LLLayoutPanel; class LLLayoutStack; class LLTabContainer; +class LLIMFloaterContainer; // CHUI-137 : Temporary implementation of conversations list class LLConversationItem; -class LLIMFloaterContainer; 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. +// Conversation items: we hold a list of those and create an LLFolderViewItem widget for each +// that we tuck into the mConversationsListPanel. class LLConversationItem : public LLFolderViewEventListener { public: @@ -89,7 +89,7 @@ public: virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } - // The action callbacks (or so we think...) + // The action callbacks virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem( void ); virtual void closeItem( void ); @@ -97,14 +97,14 @@ public: virtual void selectItem(void); virtual void showProperties(void); - // This method should be called when a drag begins. returns TRUE - // if the drag can begin, otherwise FALSE. + // This method should be called when a drag begins. + // Returns TRUE if the drag can begin, FALSE otherwise. virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) 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. Returns TRUE if a drop is possible/happened, - // otherwise FALSE. + // requested. + // Returns TRUE if a drop is possible/happened, FALSE otherwise. virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -115,7 +115,7 @@ private: LLFloater* mFloater; LLIMFloaterContainer* mContainer; }; - // CHUI-137 : End +// CHUI-137 : End class LLIMFloaterContainer : public LLMultiFloater { @@ -164,8 +164,9 @@ private: LLLayoutPanel* mConversationsPane; LLLayoutStack* mConversationsStack; - // CHUI-137 : Data - LLPanel* mConversationsListPanel; // The widget we add list item to (title of each conversation) + // CHUI-137 : Temporary implementation of conversations list + // Conversation list data + LLPanel* mConversationsListPanel; // This is the widget we add items to (i.e. clickable title for each conversation) conversations_items_map mConversationsItems; conversations_widgets_map mConversationsWidgets; }; -- cgit v1.2.3 From d34746b596bad717f7d0c10e263700738a06aa43 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 14 Jun 2012 17:37:16 +0300 Subject: CHUI-144 FIXED Residents picker added to Conversations panel + button. --- indra/newview/llimfloatercontainer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llimfloatercontainer.h') diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index 92938ff405..7b395fb18f 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -80,6 +80,9 @@ private: void updateState(bool collapse, S32 delta_width); + void onAddButtonClicked(); + void onAvatarPicked(const uuid_vec_t& ids); + LLButton* mExpandCollapseBtn; LLLayoutPanel* mMessagesPane; LLLayoutPanel* mConversationsPane; -- cgit v1.2.3