diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index a8149a9a1dae6372f63f1d644ae28d8554e318f7..44f2c1efe92d98a586b437efea382ad802fa0406 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -644,7 +644,7 @@ void LLButton::draw() // Cancel sticking of color, if the button is pressed, // or when a flashing of the previously selected button is ended if (mFlashingTimer - && ((selected && !mFlashingTimer->isFlashingInProgress()) || pressed)) + && ((selected && !mFlashingTimer->isFlashingInProgress() && !mForceFlashing) || pressed)) { mFlashing = false; } @@ -971,8 +971,9 @@ void LLButton::setToggleState(BOOL b) } } -void LLButton::setFlashing(bool b) +void LLButton::setFlashing(bool b, bool force_flashing/* = false */) { + mForceFlashing = force_flashing; if (mFlashingTimer) { mFlashing = b; diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 060db59a8a6e088eb1661357961a7f4bf4317871..7b4719866d55b3a1c2bc3f0a7145f0cd95b1558c 100755 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -201,7 +201,7 @@ class LLButton void setToggleState(BOOL b); void setHighlight(bool b); - void setFlashing( bool b ); + void setFlashing( bool b, bool force_flashing = false ); BOOL getFlashing() const { return mFlashing; } LLFlashTimer* getFlashTimer() {return mFlashingTimer;} @@ -378,7 +378,7 @@ class LLButton LLFrameTimer mFrameTimer; LLFlashTimer * mFlashingTimer; - + bool mForceFlashing; // Stick flashing color even if button is pressed bool mHandleRightMouse; }; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 3d9f5cbbc232822be501c93860ec10342c2a0a15..928e82cb8c21c798e2cdb1744270ababa2b7012c 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -381,7 +381,7 @@ bool LLToolBar::stopCommandInProgress(const LLCommandId& commandId) return (command_button != NULL); } -bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash) +bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing/* = false */) { LLButton * command_button = NULL; @@ -391,7 +391,7 @@ bool LLToolBar::flashCommand(const LLCommandId& commandId, bool flash) if (it != mButtonMap.end()) { command_button = it->second; - command_button->setFlashing(flash ? TRUE : FALSE); + command_button->setFlashing((BOOL)(flash),(BOOL)(force_flashing)); } } diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index 31424a36d47a748b409d802e883d314aa550b8a9..743951a41f233bb80cc1e227da39ce5bd68033ec 100755 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -192,7 +192,7 @@ class LLToolBar bool hasCommand(const LLCommandId& commandId) const; // is this command bound to a button in this toolbar bool enableCommand(const LLCommandId& commandId, bool enabled); // enable/disable button bound to the specified command, if it exists in this toolbar bool stopCommandInProgress(const LLCommandId& commandId); // stop command if it is currently active - bool flashCommand(const LLCommandId& commandId, bool flash); // flash button associated with given command, if in this toolbar + bool flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing = false); // flash button associated with given command, if in this toolbar void setStartDragCallback(tool_startdrag_callback_t cb) { mStartDragItemCallback = cb; } // connects drag and drop behavior to external logic void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; } diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5432e68f14531cb2a8baa5e8372c3e1df176ff00..8b38e54a8e679664aa4bfd76954cb503492a8008 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -47,6 +47,7 @@ #include "llfloaterpreference.h" #include "llimview.h" #include "llnotificationsutil.h" +#include "lltoolbarview.h" #include "lltransientfloatermgr.h" #include "llviewercontrol.h" #include "llconversationview.h" @@ -597,6 +598,7 @@ void LLFloaterIMContainer::setMinimized(BOOL b) //Switching from minimized to un-minimized if(was_minimized && !b) { + gToolBarView->flashCommand(LLCommandId("chat"), false); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); if(session_floater && !session_floater->isTornOff()) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8d055be263ccc4b53ebb54fd3523d8257ce696b4..ecd22a5c1b005f9ebee52ad5c78fd3cc2216541e 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -336,7 +336,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) { if(!gAgent.isDoNotDisturb()) { - gToolBarView->flashCommand(LLCommandId("chat"), true); + gToolBarView->flashCommand(LLCommandId("chat"), true, im_box->isMinimized()); } else { diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index b2318f9158e8273c0eee654ff5170291c657cca9..4f2c99fba8fba1a758525ce7fcf5da079220e35c 100755 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -180,13 +180,13 @@ S32 LLToolBarView::stopCommandInProgress(const LLCommandId& commandId) return command_location; } -S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash) +S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing/* = false */) { S32 command_location = hasCommand(commandId); if (command_location != TOOLBAR_NONE) { - mToolbars[command_location]->flashCommand(commandId, flash); + mToolbars[command_location]->flashCommand(commandId, flash, force_flashing); } return command_location; diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 7125dd9990495e64bb020bdc760881480bbf8060..dcc38620746b70cc0c022fbb041bc73e8bea3cc3 100755 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -90,7 +90,7 @@ class LLToolBarView : public LLUICtrl S32 removeCommand(const LLCommandId& commandId, int& rank); // Sets the rank the removed command was at, RANK_NONE if not found S32 enableCommand(const LLCommandId& commandId, bool enabled); S32 stopCommandInProgress(const LLCommandId& commandId); - S32 flashCommand(const LLCommandId& commandId, bool flash); + S32 flashCommand(const LLCommandId& commandId, bool flash, bool force_flashing = false); // Loads the toolbars from the existing user or default settings bool loadToolbars(bool force_default = false); // return false if load fails