summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-12-03 16:19:46 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-12-03 16:19:46 -0800
commit2ee6bcab371a08791bccad3a4fa072c1d60cd6c9 (patch)
treedfffd454b20e8ca0162a004f777bc0fb6b076f39 /indra/newview/llfloaterimcontainer.cpp
parent611797543a917f1596be73e9e79974578748086e (diff)
CHUI-571: Now when the 'Chat Preference' is set to 'Open Conversations window' the conversation line item with flash. The only time it does not flash is when the the conversation line item is already focused. Also fixed various focusing bugs when navigating between conversations and participants.
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();