diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-11-26 15:01:57 -0800 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-11-26 15:01:57 -0800 |
| commit | 8076f7a33d7f5ee93d4ba8f71a7ba0fed5e364a7 (patch) | |
| tree | 6a7d0f88666e16948e73d1098c99edc7513b6e49 /indra/newview/llconversationview.cpp | |
| parent | 7ca2508cc2adcdc5201bd53e814246e156bc6013 (diff) | |
| parent | 890965faf5baa5f6f832e086991d59bb8d33b7bc (diff) | |
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/llconversationview.cpp')
| -rwxr-xr-x | indra/newview/llconversationview.cpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 4c52794e4c..e40d57c318 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -57,14 +57,11 @@ public: virtual void onChange(EStatusType status, const std::string &channelURI, bool proximal) { - if (conversation - && status != STATUS_JOINING - && status != STATUS_LEFT_CHANNEL - && LLVoiceClient::getInstance()->voiceEnabled() - && LLVoiceClient::getInstance()->isVoiceWorking()) - { - conversation->showVoiceIndicator(); - } + conversation->showVoiceIndicator(conversation + && status != STATUS_JOINING + && status != STATUS_LEFT_CHANNEL + && LLVoiceClient::getInstance()->voiceEnabled() + && LLVoiceClient::getInstance()->isVoiceWorking()); } private: @@ -85,6 +82,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mVoiceClientObserver(NULL), mMinimizedMode(false) { + mFlashTimer = new LLFlashTimer(); } LLConversationViewSession::~LLConversationViewSession() @@ -95,6 +93,18 @@ LLConversationViewSession::~LLConversationViewSession() { LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver); } + + delete mFlashTimer; +} + +bool LLConversationViewSession::isHighlightAllowed() +{ + return mFlashTimer->isFlashingInProgress() || mIsSelected; +} + +bool LLConversationViewSession::isHighlightActive() +{ + return mFlashTimer->isFlashingInProgress() ? mFlashTimer->isCurrentlyHighlighted() : mIsCurSelection; } BOOL LLConversationViewSession::postBuild() @@ -288,12 +298,9 @@ LLConversationViewParticipant* LLConversationViewSession::findParticipant(const return (iter == getItemsEnd() ? NULL : participant); } -void LLConversationViewSession::showVoiceIndicator() +void LLConversationViewSession::showVoiceIndicator(bool visible) { - if (LLVoiceChannel::getCurrentVoiceChannel()->getSessionID().isNull()) - { - mCallIconLayoutPanel->setVisible(true); - } + mCallIconLayoutPanel->setVisible(visible && LLVoiceChannel::getCurrentVoiceChannel()->getSessionID().isNull()); } void LLConversationViewSession::refresh() |
