summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-04 14:45:19 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2012-12-04 14:45:19 +0200
commit4c3510bc4e4c2365bf75c3fbfdfae6b329a420e0 (patch)
tree6a712f7b27366afc5e99e1b43138be45edeef388 /indra/newview/llfloaterimcontainer.cpp
parentf888a3fd00ca32275ab2da6437cb011b3ab78f89 (diff)
parent8c24cc8e3635888b766e30001749966eddc0dc7e (diff)
merging
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index a04b8d79d6..3a80491dae 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1165,21 +1165,16 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
selectConversation(session_id);
}
-// Will select only the conversation item
void LLFloaterIMContainer::selectConversation(const LLUUID& session_id)
{
- LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id);
- if (widget)
- {
- (widget->getRoot())->setSelection(widget, FALSE, FALSE);
+ selectConversationPair(session_id, true);
}
-}
-
// Synchronous select the conversation item and the conversation floater
BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget)
{
BOOL handled = TRUE;
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
/* widget processing */
if (select_widget)
@@ -1198,7 +1193,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
// Store the active session
setSelectedSession(session_id);
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
if (session_floater->getHost())
{
@@ -1207,13 +1202,13 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
// Switch to the conversation floater that is being selected
selectFloater(session_floater);
}
+ }
// Set the focus on the selected floater
if (!session_floater->hasFocus())
{
session_floater->setFocus(TRUE);
}
- }
return handled;
}
@@ -1627,13 +1622,26 @@ void LLFloaterIMContainer::reSelectConversation()
void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes)
{
+ //Finds the conversation line item to flash using the session_id
LLConversationViewSession * widget = dynamic_cast<LLConversationViewSession *>(get_ptr_in_map(mConversationsWidgets,session_id));
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
if (widget)
{
+ //Start flash
if (is_flashes)
{
+ //Only flash when conversation is not active
+ if(session_floater
+ && (!session_floater->isInVisibleChain()) //conversation floater not displayed
+ ||
+ (session_floater->isInVisibleChain() && session_floater->hasFocus() == false)) //conversation floater is displayed but doesn't have focus
+
+ {
widget->getFlashTimer()->startFlashing();
}
+ }
+ //Stop flash
else
{
widget->getFlashTimer()->stopFlashing();