diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-13 19:09:00 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-13 19:09:00 -0400 |
commit | bf95c1cae7a84d1a97dacd8ea7f1b6af8be067a9 (patch) | |
tree | 85a0f5fef2af8276cf99388a46193624838dfb6b /indra/newview/llconversationview.cpp | |
parent | d348deb7049cbaef7c228000525c7ee5a265464c (diff) | |
parent | 04e78ce4fdd3bbc0e4daa1daabbff2de1c425601 (diff) |
merge changes for 3.5.0-beta3
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 74b348cd81..956abcd586 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -104,6 +104,15 @@ LLConversationViewSession::~LLConversationViewSession() void LLConversationViewSession::setFlashState(bool flash_state) { + if (flash_state && !mFlashStateOn) + { + // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) + if (mContainer->isScrolledOutOfSight(this)) + { + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + } + mFlashStateOn = flash_state; mFlashStarted = false; mFlashTimer->stopFlashing(); @@ -115,12 +124,6 @@ void LLConversationViewSession::startFlashing() { mFlashStarted = true; mFlashTimer->startFlashing(); - - // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) - if (mContainer->isScrolledOutOfSight(this)) - { - gToolBarView->flashCommand(LLCommandId("chat"), true); - } } } @@ -254,20 +257,38 @@ BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask ) //This node (conversation) was selected and a child (participant) was not if(result && getRoot()) { - if(getRoot()->getCurSelectedItem() == this) - { - LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); - LLUUID session_id = item? item->getUUID() : LLUUID(); + selectConversationItem(); + } - LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - im_container->flashConversationItemWidget(session_id,false); - im_container->selectConversationPair(session_id, false); - im_container->collapseMessagesPane(false); - } + return result; +} + +BOOL LLConversationViewSession::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + BOOL result = LLFolderViewFolder::handleRightMouseDown(x, y, mask); + + if(result) + { + selectConversationItem(); } + return result; } +void LLConversationViewSession::selectConversationItem() +{ + if(getRoot()->getCurSelectedItem() == this) + { + LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem()); + LLUUID session_id = item? item->getUUID() : LLUUID(); + + LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + im_container->flashConversationItemWidget(session_id,false); + im_container->selectConversationPair(session_id, false); + im_container->collapseMessagesPane(false); + } +} + // virtual S32 LLConversationViewSession::arrange(S32* width, S32* height) { |