summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-12-14 21:20:43 -0800
committerMerov Linden <merov@lindenlab.com>2012-12-14 21:20:43 -0800
commitd0d8ee87e7648e80b83b125202d6270495e955b6 (patch)
treefd744fb9c7dabc104a754950005c709d4611784e /indra
parent9b556fb3fea0a97f5773d8fd435a428b0fafacbf (diff)
CHUI-596 : Added a new flash state so we can keep a conversation highlighted after the flash time ends. Clears the flash state for all conversation on select.
Diffstat (limited to 'indra')
-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);
}
}