From f3a92bfc17762c7f0ade6b93f27d7a499031e463 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 18 Dec 2009 15:58:37 +0200 Subject: implemented major task (EXT-3354) Add "unread message" counters for IM sessions in the IM well window - IM Well Window's chiclets now have counters and count IMs from 1 to "99+" - IM Well Window's items can resize on appearance of chiclet's counter or speaker indicator --HG-- branch : product-engine --- indra/newview/llchiclet.h | 59 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index d8f641d0f9..529586abb3 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -52,10 +52,19 @@ class LLChicletNotificationCounterCtrl : public LLTextBox { public: + static const S32 MAX_DISPLAYED_COUNT = 99; + struct Params : public LLInitParam::Block { - Params() - {}; + /** + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ + Optional max_displayed_count; + + Params(); }; /** @@ -93,6 +102,7 @@ private: S32 mCounter; S32 mInitialWidth; + S32 mMaxDisplayedCount; }; /** @@ -358,6 +368,32 @@ public: */ virtual void toggleSpeakerControl(); + /** + * Sets number of unread messages. Will update chiclet's width if number text + * exceeds size of counter and notify it's parent about size change. + */ + virtual void setCounter(S32); + + /** + * Enables/disables the counter control for a chiclet. + */ + virtual void enableCounterControl(bool enable); + + /** + * Sets show counter state. + */ + virtual void setShowCounter(bool show); + + /** + * Shows/Hides for counter control for a chiclet. + */ + virtual void toggleCounterControl(); + + /** + * Sets required width for a chiclet according to visible controls. + */ + virtual void setRequiredWidth(); + /** * Shows/hides overlay icon concerning new unread messages. */ @@ -400,6 +436,7 @@ protected: protected: bool mShowSpeaker; + bool mCounterEnabled; LLIconCtrl* mNewMessagesIcon; LLChicletNotificationCounterCtrl* mCounterCtrl; @@ -452,12 +489,6 @@ public: /* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id); - /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - /** * Init Speaker Control with speaker's ID */ @@ -526,12 +557,6 @@ public: */ /*virtual*/ void setSessionId(const LLUUID& session_id); - /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - /** * Keep Speaker Control with actual speaker's ID */ @@ -694,12 +719,6 @@ public: */ /*virtual*/ void changed(LLGroupChange gc); - /** - * Sets number of unread messages. Will update chiclet's width if number text - * exceeds size of counter and notify it's parent about size change. - */ - /*virtual*/ void setCounter(S32); - /** * Init Speaker Control with speaker's ID */ -- cgit v1.2.3 From 0b835fe1605be7908f63730575018c2b412b951f Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 18 Dec 2009 16:33:58 +0200 Subject: Fixed Linux build. --HG-- branch : product-engine --- indra/newview/llchiclet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 529586abb3..c60d06bc97 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -52,7 +52,7 @@ class LLChicletNotificationCounterCtrl : public LLTextBox { public: - static const S32 MAX_DISPLAYED_COUNT = 99; + static const S32 MAX_DISPLAYED_COUNT; struct Params : public LLInitParam::Block { -- cgit v1.2.3 From 216726dd23ef925f5bd6cccbdeb09cfca5400a7a Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 18 Dec 2009 18:41:14 +0200 Subject: Implemented major sub-task EXT-3524 (Context menu for IM well) --HG-- branch : product-engine --- indra/newview/llchiclet.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llchiclet.h') diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index c60d06bc97..259476c2ad 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -860,6 +860,16 @@ public: protected: LLIMWellChiclet(const Params& p); + /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + + /** + * Enables chiclet menu items. + */ + bool enableMenuItem(const LLSD& user_data); + /** * Creates menu. */ -- cgit v1.2.3