From e5d6a14f05f857ecbbbd9b464db3ece82d1d099f Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Fri, 9 Jan 2015 20:17:39 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - initial version Works: 1) All new notices shown on "Invites" tab of new floater "NOTIFICATIONS TABBED" in condensed view To be done: 1) Show other types of notices, like transactions and system 2) Separate notices between tabs "Invites", "System", "Transactions" 3) Design full notice view (in addition to condensed view) --- indra/newview/llfloaternotificationstabbed.h | 143 +++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 indra/newview/llfloaternotificationstabbed.h (limited to 'indra/newview/llfloaternotificationstabbed.h') diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h new file mode 100644 index 0000000000..1fd60826cb --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.h @@ -0,0 +1,143 @@ +/** + * @file llfloaternotificationstabbed.h + * @brief // TODO + * + * $LicenseInfo:firstyear=2003&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_FLOATERNOTIFICATIONSTABBED_H +#define LL_FLOATERNOTIFICATIONSTABBED_H + +#include "llimview.h" +#include "llnotifications.h" +#include "llscreenchannel.h" +#include "llsyswellitem.h" +#include "lltransientdockablefloater.h" + +class LLAvatarName; +class LLChiclet; +class LLFlatListView; +class LLIMChiclet; +class LLScriptChiclet; +class LLSysWellChiclet; + +class LLFloaterNotificationsTabbed : public LLTransientDockableFloater +{ +public: + LOG_CLASS(LLFloaterNotificationsTabbed); + + LLFloaterNotificationsTabbed(const LLSD& key); + virtual ~LLFloaterNotificationsTabbed(); + BOOL postBuild(); + + // other interface functions + // check is window empty + bool isWindowEmpty(); + + // Operating with items + void removeItemByID(const LLUUID& id); + LLPanel * findItemByID(const LLUUID& id); + + // Operating with outfit + virtual void setVisible(BOOL visible); + void adjustWindowPosition();//not used - ? + + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + // override LLFloater's minimization according to EXT-1216 + /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); + + void onStartUpToastClick(S32 x, S32 y, MASK mask); + + void setSysWellChiclet(LLSysWellChiclet* chiclet); + + // size constants for the window and for its elements + static const S32 MAX_WINDOW_HEIGHT = 200; + static const S32 MIN_WINDOW_WIDTH = 318; + +protected: + // init Window's channel + virtual void initChannel(); + + const std::string NOTIFICATION_TABBED_ANCHOR_NAME; + const std::string IM_WELL_ANCHOR_NAME; + //virtual const std::string& getAnchorViewName() = 0; + + void reshapeWindow(); + + // pointer to a corresponding channel's instance + LLNotificationsUI::LLScreenChannel* mChannel; + LLFlatListView* mMessageList; + + /** + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; + + bool mIsReshapedByUser; + +public: + static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); + + /*virtual*/ //BOOL postBuild(); + /*virtual*/ //void setVisible(BOOL visible); + /*virtual*/ void onAdd(LLNotificationPtr notify); + // Operating with items + void addItem(LLNotificationTabbedItem::Params p); + + // Closes all notifications and removes them from the Notification Well + void closeAll(); + +protected: + struct NotificationTabbedChannel : public LLNotificationChannel + { + NotificationTabbedChannel(LLFloaterNotificationsTabbed*); + void onDelete(LLNotificationPtr notify) + { + mNotificationsTabbedWindow->removeItemByID(notify->getID()); + } + + LLFloaterNotificationsTabbed* mNotificationsTabbedWindow; + }; + + LLNotificationChannelPtr mNotificationUpdates; + virtual const std::string& getAnchorViewName() { return NOTIFICATION_TABBED_ANCHOR_NAME; } + +private: + // init Window's channel + // void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // Handlers + void onItemClick(LLNotificationTabbedItem* item); + void onItemClose(LLNotificationTabbedItem* item); + + // ID of a toast loaded by user (by clicking notification well item) + LLUUID mLoadedToastId; +}; + +#endif // LL_FLOATERNOTIFICATIONSTABBED_H + + + -- cgit v1.2.3 From b31631934a7caa0fe331cd25e745e8b9c9485798 Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Tue, 3 Feb 2015 19:44:25 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - added code to sort notifications between tabs: Invites, Transactions, System messages - made cosmetic changes according to comment from 27/Jan/15 in Jira - added code to show correct number of notifications on each tab - added code to close all notifications on current tab via "Delete all" button --- indra/newview/llfloaternotificationstabbed.h | 75 +++++++++++++++++++--------- 1 file changed, 51 insertions(+), 24 deletions(-) (limited to 'indra/newview/llfloaternotificationstabbed.h') diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 1fd60826cb..36eee2f866 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -1,6 +1,6 @@ /** * @file llfloaternotificationstabbed.h - * @brief // TODO + * @brief * * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code @@ -32,6 +32,8 @@ #include "llscreenchannel.h" #include "llsyswellitem.h" #include "lltransientdockablefloater.h" +#include "llnotificationlistview.h" +#include "lltabcontainer.h" class LLAvatarName; class LLChiclet; @@ -40,6 +42,29 @@ class LLIMChiclet; class LLScriptChiclet; class LLSysWellChiclet; +class LLNotificationSeparator +{ +public: + LLNotificationSeparator(); + ~LLNotificationSeparator(); + void initTaggedList(const std::string& tag, LLNotificationListView* list); + void initTaggedList(const std::set& tags, LLNotificationListView* list); + void initUnTaggedList(LLNotificationListView* list); + bool addItem(std::string& tag, LLNotificationListItem* item); + LLPanel* findItemByID(std::string& tag, const LLUUID& id); + bool removeItemByID(std::string& tag, const LLUUID& id); + void getItems(std::vector& items) const; + U32 size() const; +private: + static void getItemsFromList(std::vector& items, LLNotificationListView* list); + + typedef std::map notification_list_map_t; + notification_list_map_t mNotificationListMap; + typedef std::list notification_list_list_t; + notification_list_list_t mNotificationLists; + LLNotificationListView* mUnTaggedList; +}; + class LLFloaterNotificationsTabbed : public LLTransientDockableFloater { public: @@ -54,8 +79,10 @@ public: bool isWindowEmpty(); // Operating with items - void removeItemByID(const LLUUID& id); - LLPanel * findItemByID(const LLUUID& id); + void removeItemByID(const LLUUID& id, std::string type); + LLPanel * findItemByID(const LLUUID& id, std::string type); + void updateNotificationCounters(); + void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName); // Operating with outfit virtual void setVisible(BOOL visible); @@ -67,14 +94,18 @@ public: /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); + /*virtual*/ void onAdd(LLNotificationPtr notify); void setSysWellChiclet(LLSysWellChiclet* chiclet); + void closeAll(); + + static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; -protected: +private: // init Window's channel virtual void initChannel(); @@ -86,7 +117,6 @@ protected: // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; - LLFlatListView* mMessageList; /** * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 @@ -95,25 +125,12 @@ protected: bool mIsReshapedByUser; -public: - static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); - - /*virtual*/ //BOOL postBuild(); - /*virtual*/ //void setVisible(BOOL visible); - /*virtual*/ void onAdd(LLNotificationPtr notify); - // Operating with items - void addItem(LLNotificationTabbedItem::Params p); - - // Closes all notifications and removes them from the Notification Well - void closeAll(); - -protected: struct NotificationTabbedChannel : public LLNotificationChannel { NotificationTabbedChannel(LLFloaterNotificationsTabbed*); void onDelete(LLNotificationPtr notify) { - mNotificationsTabbedWindow->removeItemByID(notify->getID()); + mNotificationsTabbedWindow->removeItemByID(notify->getID(), notify->getName()); } LLFloaterNotificationsTabbed* mNotificationsTabbedWindow; @@ -122,19 +139,29 @@ protected: LLNotificationChannelPtr mNotificationUpdates; virtual const std::string& getAnchorViewName() { return NOTIFICATION_TABBED_ANCHOR_NAME; } -private: // init Window's channel // void initChannel(); void clearScreenChannels(); + // Operating with items + void addItem(LLNotificationListItem::Params p); - void onStoreToast(LLPanel* info_panel, LLUUID id); + // Closes all notifications and removes them from the Notification Well + void closeAllOnCurrentTab(); + void onStoreToast(LLPanel* info_panel, LLUUID id); + void onClickDeleteAllBtn(); // Handlers - void onItemClick(LLNotificationTabbedItem* item); - void onItemClose(LLNotificationTabbedItem* item); - + void onItemClick(LLNotificationListItem* item); + void onItemClose(LLNotificationListItem* item); // ID of a toast loaded by user (by clicking notification well item) LLUUID mLoadedToastId; + + LLNotificationListView* mInviteMessageList; + LLNotificationListView* mTransactionMessageList; + LLNotificationListView* mSystemMessageList; + LLNotificationSeparator* mNotificationsSeparator; + LLTabContainer* mNotificationsTabContainer; + LLButton* mDeleteAllBtn; }; #endif // LL_FLOATERNOTIFICATIONSTABBED_H -- cgit v1.2.3 From b147d659dc0c94a972f1c82f16536b374ee10c19 Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Tue, 17 Mar 2015 18:26:28 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) stripped off attachment field; 2) made logos (group's, sender's, etc) in expanded view the same size as in condensed view; 3) turned on notification showing upon click; 4) fixed cropped right border of Invite and Transactions notifications; 5) enabled "Collapse All" button; 6) stripped off unnecessary icons. --- indra/newview/llfloaternotificationstabbed.h | 29 +++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'indra/newview/llfloaternotificationstabbed.h') diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 36eee2f866..5191b783f6 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -2,9 +2,9 @@ * @file llfloaternotificationstabbed.h * @brief * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2015, 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 @@ -68,11 +68,11 @@ private: class LLFloaterNotificationsTabbed : public LLTransientDockableFloater { public: - LOG_CLASS(LLFloaterNotificationsTabbed); + LOG_CLASS(LLFloaterNotificationsTabbed); LLFloaterNotificationsTabbed(const LLSD& key); virtual ~LLFloaterNotificationsTabbed(); - BOOL postBuild(); + BOOL postBuild(); // other interface functions // check is window empty @@ -86,12 +86,11 @@ public: // Operating with outfit virtual void setVisible(BOOL visible); - void adjustWindowPosition();//not used - ? - /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); - /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); + /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); /*virtual*/ void onAdd(LLNotificationPtr notify); @@ -102,8 +101,8 @@ public: static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static const S32 MAX_WINDOW_HEIGHT = 200; + static const S32 MIN_WINDOW_WIDTH = 318; private: // init Window's channel @@ -119,9 +118,9 @@ private: LLNotificationsUI::LLScreenChannel* mChannel; /** - * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 - */ - LLSysWellChiclet* mSysWellChiclet; + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; bool mIsReshapedByUser; @@ -144,12 +143,15 @@ private: void clearScreenChannels(); // Operating with items void addItem(LLNotificationListItem::Params p); + void getAllItemsOnCurrentTab(std::vector& items) const; // Closes all notifications and removes them from the Notification Well void closeAllOnCurrentTab(); + void collapseAllOnCurrentTab(); void onStoreToast(LLPanel* info_panel, LLUUID id); void onClickDeleteAllBtn(); + void onClickCollapseAllBtn(); // Handlers void onItemClick(LLNotificationListItem* item); void onItemClose(LLNotificationListItem* item); @@ -162,6 +164,7 @@ private: LLNotificationSeparator* mNotificationsSeparator; LLTabContainer* mNotificationsTabContainer; LLButton* mDeleteAllBtn; + LLButton* mCollapseAllBtn; }; #endif // LL_FLOATERNOTIFICATIONSTABBED_H -- cgit v1.2.3 From 60d28437e616a6afda51a368ea40ad49a707d16c Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Wed, 8 Apr 2015 19:51:39 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) added GroupNotice notification type and tab "Group" for it; 2) added Attachment field to group notice notifications which may contain inventory offers, notecards, etc; 3) added Fee field to Group Invite notifications; 4) added notification resize depending on attachment field. --- indra/newview/llfloaternotificationstabbed.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationstabbed.h') diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 5191b783f6..8dd20b18c4 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -158,7 +158,8 @@ private: // ID of a toast loaded by user (by clicking notification well item) LLUUID mLoadedToastId; - LLNotificationListView* mInviteMessageList; + LLNotificationListView* mGroupInviteMessageList; + LLNotificationListView* mGroupNoticeMessageList; LLNotificationListView* mTransactionMessageList; LLNotificationListView* mSystemMessageList; LLNotificationSeparator* mNotificationsSeparator; -- cgit v1.2.3