summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llconversationview.cpp10
-rwxr-xr-xindra/newview/llconversationview.h3
-rw-r--r--indra/newview/llfloaterimcontainer.cpp22
3 files changed, 22 insertions, 13 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 527c0ad233..1943174872 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -98,14 +98,20 @@ LLConversationViewSession::~LLConversationViewSession()
mFlashTimer->unset();
}
+void LLConversationViewSession::setFlashState(bool flash_state)
+{
+ mFlashStateOn = flash_state;
+ (flash_state ? mFlashTimer->startFlashing() : mFlashTimer->stopFlashing());
+}
+
bool LLConversationViewSession::isHighlightAllowed()
{
- return mFlashTimer->isFlashingInProgress() || mIsSelected;
+ return mFlashStateOn || mIsSelected;
}
bool LLConversationViewSession::isHighlightActive()
{
- return mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : mIsCurSelection;
+ return (mFlashStateOn ? (mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : true) : mIsCurSelection);
}
BOOL LLConversationViewSession::postBuild()
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index fb2834f26a..3e65823a23 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -83,7 +83,7 @@ public:
virtual void refresh();
- LLFlashTimer * getFlashTimer() { return mFlashTimer; }
+ void setFlashState(bool flash_state);
private:
@@ -94,6 +94,7 @@ private:
LLTextBox* mSessionTitle;
LLOutputMonitorCtrl* mSpeakingIndicator;
LLFlashTimer* mFlashTimer;
+ bool mFlashStateOn;
bool mCollapsedMode;
bool mHasArrow;
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 3a5f2ae854..aaf43bdda0 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1247,6 +1247,17 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
BOOL handled = TRUE;
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
+ // On selection, stop the flash state on all conversation widgets
+ conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin();
+ for (;widget_it != mConversationsWidgets.end(); ++widget_it)
+ {
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(widget_it->second);
+ if (widget)
+ {
+ widget->setFlashState(false);
+ }
+ }
+
/* widget processing */
if (select_widget)
{
@@ -1723,16 +1734,7 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id,
if (widget)
{
- //Start flash
- if (is_flashes)
- {
- widget->getFlashTimer()->startFlashing();
- }
- //Stop flash
- else
- {
- widget->getFlashTimer()->stopFlashing();
- }
+ widget->setFlashState(is_flashes);
}
}