diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchiclet.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 2 |
2 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 960d9e02b2..b27634e105 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -169,15 +169,7 @@ void LLSysWellChiclet::setCounter(S32 counter) mButton->setLabel(s_count); - /* - Emulate 4 states of button by background images, see detains in EXT-3147 - xml attribute Description - image_unselected "Unlit" - there are no new messages - image_selected "Unlit" + "Selected" - there are no new messages and the Well is open - image_pressed "Lit" - there are new messages - image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open - */ - mButton->setForcePressedState(counter > 0); + setNewMessagesState(counter > 0); // we have to flash to 'Lit' state each time new unread message is comming. if (counter > mCounter) @@ -208,11 +200,24 @@ void LLSysWellChiclet::changeLitState() { static bool set_lit = false; - mButton->setForcePressedState(set_lit); + setNewMessagesState(set_lit); set_lit ^= true; } +void LLSysWellChiclet::setNewMessagesState(bool new_messages) +{ + /* + Emulate 4 states of button by background images, see detains in EXT-3147 + xml attribute Description + image_unselected "Unlit" - there are no new messages + image_selected "Unlit" + "Selected" - there are no new messages and the Well is open + image_pressed "Lit" - there are new messages + image_pressed_selected "Lit" + "Selected" - there are new messages and the Well is open + */ + mButton->setForcePressedState(new_messages); +} + /************************************************************************/ /* LLIMWellChiclet implementation */ /************************************************************************/ diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 65abcd1f5f..6228f87252 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -804,6 +804,8 @@ protected: */ void changeLitState(); + void setNewMessagesState(bool new_messages); + protected: class FlashToLitTimer; LLButton* mButton; |