From 22303da8a61e60dd061b5a63f6d023fd1345b59c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 3 Dec 2009 13:48:07 +0200 Subject: Work on task EXT-3081 (Separate Message Well on Notifications Well and IM Well) Initial commit -- added two floater classes derived from LLSysWellWindow to work with Notification Well & IM Well -- register two floaters in place of previous sys_well (but with the same xml file) -- replace using of LLSysWellWindow with LLNotificationWellWindow in the out code (except of in LLScreenChannel::updateShowToastsState) -- rename member variable in bottom tray used for Notification Well --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 3e4cdbdcbe..fe0ac4b740 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -149,6 +149,30 @@ private: }; }; +/** + * Class intended to manage incoming notifications. + * + * It contains a list of notifications that have not been responded to. + */ +class LLNotificationWellWindow : public LLSysWellWindow +{ +public: + LLNotificationWellWindow(const LLSD& key); + static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD()); +}; + +/** + * Class intended to manage incoming messages in IM chats. + * + * It contains a list list of all active IM sessions. + */ +class LLIMWellWindow : public LLSysWellWindow +{ +public: + LLIMWellWindow(const LLSD& key); + static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); +}; + #endif // LL_LLSYSWELLWINDOW_H -- cgit v1.2.3 From 653ebfbe7ca53515d6c83f6ba72cbb1d3e2d9daf Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 4 Dec 2009 12:48:08 +0200 Subject: Work on normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well) Refactored toggle interaction between Notification Well and Notification Well Window: -- set "Button.SetDockableFloaterToggle" init callback to Notification Well -- remove deprecated functionality in code -- update interaction with screen channels to work properly. --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index fe0ac4b740..04596c0622 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -66,8 +66,6 @@ public: // Operating with outfit virtual void setVisible(BOOL visible); void adjustWindowPosition(); - void toggleWindow(); - /*virtual*/ BOOL canClose() { return FALSE; } /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); @@ -76,7 +74,7 @@ public: void onItemClick(LLSysWellItem* item); void onItemClose(LLSysWellItem* item); void onStoreToast(LLPanel* info_panel, LLUUID id); - void onChicletClick(); + void clearScreenChannels(); void onStartUpToastClick(S32 x, S32 y, MASK mask); // size constants for the window and for its elements @@ -154,11 +152,14 @@ private: * * It contains a list of notifications that have not been responded to. */ -class LLNotificationWellWindow : public LLSysWellWindow +class LLNotificationWellWindow : public LLSysWellWindow, public LLInitClass { public: LLNotificationWellWindow(const LLSD& key); static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD()); + + static void initClass() { getInstance(); } + }; /** -- cgit v1.2.3 From 69cd9ac98bde4d602a8bdb785ac576df958ea1f5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 4 Dec 2009 18:31:57 +0200 Subject: Completed normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well) -- created IM Wel icon -- functionality is moved from the base class into appropriate classes (for Notification & IM Well windows) --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 101 ++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 41 deletions(-) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 04596c0622..21391cebea 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,7 +47,7 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; -class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver +class LLSysWellWindow : public LLDockableFloater { public: LLSysWellWindow(const LLSD& key); @@ -59,7 +59,6 @@ public: bool isWindowEmpty(); // Operating with items - void addItem(LLSysWellItem::Params p); void clear( void ); void removeItemByID(const LLUUID& id); @@ -70,18 +69,13 @@ public: // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); - // Handlers - void onItemClick(LLSysWellItem* item); - void onItemClose(LLSysWellItem* item); - void onStoreToast(LLPanel* info_panel, LLUUID id); - void clearScreenChannels(); void onStartUpToastClick(S32 x, S32 y, MASK mask); // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; -private: +protected: typedef enum{ IT_NOTIFICATION, @@ -90,25 +84,17 @@ private: // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111) void getAllowedRect(LLRect& rect); - // connect counter and list updaters to the corresponding signals - void connectListUpdaterToSignal(std::string notification_type); + + // init Window's channel - void initChannel(); + virtual void initChannel(); void handleItemAdded(EItemType added_item_type); void handleItemRemoved(EItemType removed_item_type); bool anotherTypeExists(EItemType item_type) ; - class RowPanel; void reshapeWindow(); - LLChiclet * findIMChiclet(const LLUUID& sessionId); - void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); - void delIMRow(const LLUUID& sessionId); - // LLIMSessionObserver observe triggers - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); - virtual void sessionRemoved(const LLUUID& session_id); - void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; @@ -124,27 +110,6 @@ private: typedef std::map typed_items_count_t; typed_items_count_t mTypedItemsCount; -private: - /** - * Scrolling row panel. - */ - class RowPanel: public LLPanel - { - public: - RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, - const std::string& name, const LLUUID& otherParticipantId); - virtual ~RowPanel(); - void onMouseEnter(S32 x, S32 y, MASK mask); - void onMouseLeave(S32 x, S32 y, MASK mask); - BOOL handleMouseDown(S32 x, S32 y, MASK mask); - private: - void onClosePanel(); - public: - LLIMChiclet* mChiclet; - private: - LLButton* mCloseBtn; - const LLSysWellWindow* mParent; - }; }; /** @@ -160,6 +125,25 @@ public: static void initClass() { getInstance(); } + /*virtual*/ void setVisible(BOOL visible); + + // Operating with items + void addItem(LLSysWellItem::Params p); + +private: + // init Window's channel + void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // connect counter and list updaters to the corresponding signals + void connectListUpdaterToSignal(std::string notification_type); + + // Handlers + void onItemClick(LLSysWellItem* item); + void onItemClose(LLSysWellItem* item); + }; /** @@ -167,11 +151,46 @@ public: * * It contains a list list of all active IM sessions. */ -class LLIMWellWindow : public LLSysWellWindow +class LLIMWellWindow : public LLSysWellWindow, LLIMSessionObserver, LLInitClass { public: LLIMWellWindow(const LLSD& key); + ~LLIMWellWindow(); + static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); + static void initClass() { getInstance(); } + + // LLIMSessionObserver observe triggers + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); + /*virtual*/ void sessionRemoved(const LLUUID& session_id); + /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + +private: + LLChiclet * findIMChiclet(const LLUUID& sessionId); + void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); + void delIMRow(const LLUUID& sessionId); + + + /** + * Scrolling row panel. + */ + class RowPanel: public LLPanel + { + public: + RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, + const std::string& name, const LLUUID& otherParticipantId); + virtual ~RowPanel(); + void onMouseEnter(S32 x, S32 y, MASK mask); + void onMouseLeave(S32 x, S32 y, MASK mask); + BOOL handleMouseDown(S32 x, S32 y, MASK mask); + private: + void onClosePanel(); + public: + LLIMChiclet* mChiclet; + private: + LLButton* mCloseBtn; + const LLSysWellWindow* mParent; + }; }; #endif // LL_LLSYSWELLWINDOW_H -- cgit v1.2.3 From fdb25e5add7305d8b92067f610eff1b5c18482de Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 7 Dec 2009 14:20:33 +0200 Subject: Aditional changes for normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well) -- set different titles for IM & Notification Well windows -- set different anchors for IM & Notification Well windows --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 21391cebea..d2c494bfe8 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,6 +47,10 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; +extern std::string NOTIFICATION_WELL_ANCHOR_NAME; +extern std::string IM_WELL_ANCHOR_NAME; + + class LLSysWellWindow : public LLDockableFloater { public: @@ -92,7 +96,7 @@ protected: void handleItemRemoved(EItemType removed_item_type); bool anotherTypeExists(EItemType item_type) ; - + virtual const std::string& getAnchorViewName() = 0; void reshapeWindow(); @@ -125,16 +129,21 @@ public: static void initClass() { getInstance(); } + /*virtual*/ BOOL postBuild(); /*virtual*/ void setVisible(BOOL visible); // Operating with items void addItem(LLSysWellItem::Params p); +protected: + /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; } + private: // init Window's channel void initChannel(); void clearScreenChannels(); + void onStoreToast(LLPanel* info_panel, LLUUID id); // connect counter and list updaters to the corresponding signals @@ -160,11 +169,16 @@ public: static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); static void initClass() { getInstance(); } + /*virtual*/ BOOL postBuild(); + // LLIMSessionObserver observe triggers /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); /*virtual*/ void sessionRemoved(const LLUUID& session_id); /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); +protected: + /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; } + private: LLChiclet * findIMChiclet(const LLUUID& sessionId); void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); -- cgit v1.2.3 From 13dd7431a350fc2515a6b7f30995fbc47f1bc77b Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 7 Dec 2009 15:44:44 +0200 Subject: Implemented normal task EXT-3084 (Update Notifications window behavior). - Added hiding window when focus is lost. --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index d2c494bfe8..18715ceeb5 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -73,6 +73,11 @@ public: // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); + /** + * Hides window when user clicks away from it (EXT-3084) + */ + /*virtual*/ void onFocusLost(); + void onStartUpToastClick(S32 x, S32 y, MASK mask); // size constants for the window and for its elements -- cgit v1.2.3 From d5bc38ae2db2d482db3e3fb83a0d9b917c6d4eb4 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 7 Dec 2009 15:59:49 +0200 Subject: Work on normal task EXT-3148 (Implement updating of the IM Well message counter). Fixed Linux build -- move constats into class --HG-- branch : product-engine --- indra/newview/llsyswellwindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsyswellwindow.h') diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 18715ceeb5..adbc83677d 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,8 +47,6 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; -extern std::string NOTIFICATION_WELL_ANCHOR_NAME; -extern std::string IM_WELL_ANCHOR_NAME; class LLSysWellWindow : public LLDockableFloater @@ -101,6 +99,8 @@ protected: void handleItemRemoved(EItemType removed_item_type); bool anotherTypeExists(EItemType item_type) ; + const std::string NOTIFICATION_WELL_ANCHOR_NAME; + const std::string IM_WELL_ANCHOR_NAME; virtual const std::string& getAnchorViewName() = 0; void reshapeWindow(); -- cgit v1.2.3