summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-11-16 12:38:40 +0200
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-11-16 12:38:40 +0200
commit50b69c3f97c0b58791f7dd67f8b2fbdc9e8ef503 (patch)
tree1a97f8460be345cf88203222260d330b1fb09894 /indra/newview
parent0b910871ab2935bde912314515f8b53ec3ff754e (diff)
CHUI-487, CHUI-488 W.I.P. #3 (Enable flashing FUI button behavior and Implement Flashing Conversations panel line item behavior): implemented conversation's item flashing
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llflashtimer.cpp14
-rw-r--r--indra/newview/llflashtimer.h6
-rw-r--r--indra/newview/llfloaterimcontainer.cpp11
-rw-r--r--indra/newview/llfloaterimcontainer.h1
4 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llflashtimer.cpp b/indra/newview/llflashtimer.cpp
index f44ca9f90c..2feacfa218 100644
--- a/indra/newview/llflashtimer.cpp
+++ b/indra/newview/llflashtimer.cpp
@@ -29,11 +29,13 @@
#include "llflashtimer.h"
#include "llviewercontrol.h"
+#include "lleventtimer.h"
LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period)
: LLEventTimer(period)
, mCallback(cb)
, mCurrentTickCount(0)
+ , mIsFlashing(false)
{
mEventTimer.stop();
@@ -49,8 +51,11 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period)
BOOL LLFlashTimer::tick()
{
- bool blink = !(mCurrentTickCount % 2);
- mCallback(blink);
+ mIsHighlight = !(mCurrentTickCount % 2);
+ if (mCallback)
+ {
+ mCallback(mIsHighlight);
+ }
if (++mCurrentTickCount >= mFlashCount)
{
@@ -63,10 +68,15 @@ BOOL LLFlashTimer::tick()
void LLFlashTimer::startFlashing()
{
mCurrentTickCount = 0;
+ mIsFlashing = true;
mEventTimer.start();
}
void LLFlashTimer::stopFlashing()
{
+ mIsFlashing = false;
+ mIsHighlight = false;
mEventTimer.stop();
}
+
+
diff --git a/indra/newview/llflashtimer.h b/indra/newview/llflashtimer.h
index 95e458dff6..c030edfc52 100644
--- a/indra/newview/llflashtimer.h
+++ b/indra/newview/llflashtimer.h
@@ -42,13 +42,15 @@ public:
* @param period - how frequently callback should be called
* @param cb - callback to be called each tick
*/
- LLFlashTimer(callback_t cb, S32 count = 0, F32 period = 0.0);
+ LLFlashTimer(callback_t cb = NULL, S32 count = 0, F32 period = 0.0);
~LLFlashTimer() {};
/*virtual*/ BOOL tick();
void startFlashing();
void stopFlashing();
+ bool isFlashing() {return mIsFlashing;}
+ bool isHighlight() {return mIsHighlight;}
private:
callback_t mCallback;
@@ -57,6 +59,8 @@ private:
*/
S32 mFlashCount;
S32 mCurrentTickCount;
+ bool mIsHighlight;
+ bool mIsFlashing;
};
#endif /* LL_FLASHTIMER_H */
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index aebfdb5bce..da6f3a484d 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1154,6 +1154,7 @@ void LLFloaterIMContainer::selectConversation(const LLUUID& session_id)
}
}
+
// Synchronous select the conversation item and the conversation floater
BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget)
{
@@ -1596,4 +1597,14 @@ void LLFloaterIMContainer::reSelectConversation()
}
+void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id)
+{
+ LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id);
+ if (widget)
+ {
+ widget->;
+ }
+
+}
+
// EOF
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index afc8d00174..443688668b 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -164,6 +164,7 @@ public:
void setTimeNow(const LLUUID& session_id, const LLUUID& participant_id);
void setNearbyDistances();
void reSelectConversation();
+ void flashConversationItemWidget(const LLUUID& session_id);
private:
LLConversationViewSession* createConversationItemWidget(LLConversationItem* item);