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