diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-12-19 10:26:17 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-12-19 10:26:17 -0800 |
commit | 865981c59f37c3d355ba00dc31004e56e293a360 (patch) | |
tree | 281913cecb41469ac9dcc2fe4f3f19ba8077fe3f /indra/newview/llimview.cpp | |
parent | bd6d34d312c3e3322ab62f3a60253fb88fcbc9e3 (diff) | |
parent | b34e3a1b40fd72b4c4cdc1553c3f5934e9e9cef5 (diff) |
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7e02915b43..5b4d5466a1 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -160,10 +160,16 @@ void on_new_message(const LLSD& msg) LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id); //session floater not focused (visible or not) - bool sessionFloaterNotFocused = session_floater && !session_floater->hasFocus(); + bool session_floater_not_focused = session_floater && !session_floater->hasFocus(); + //conv. floater is closed + bool conversation_floater_is_closed = + !( im_box + && im_box->isInVisibleChain() + && !im_box->isMinimized()); //conversation floater not focused (visible or not) - bool conversationFloaterNotFocused = im_box && !im_box->hasFocus(); + bool conversation_floater_not_focused = + conversation_floater_is_closed || !im_box->hasFocus(); if ("toast" == action) { @@ -187,12 +193,12 @@ void on_new_message(const LLSD& msg) } //User is not focused on conversation containing the message - if(sessionFloaterNotFocused) + if(session_floater_not_focused) { im_box->flashConversationItemWidget(session_id, true); //The conversation floater isn't focused/open - if(conversationFloaterNotFocused) + if(conversation_floater_not_focused) { gToolBarView->flashCommand(LLCommandId("chat"), true); @@ -204,23 +210,29 @@ void on_new_message(const LLSD& msg) } } } + else if ("flash" == action) { - //User is not focused on conversation containing the message - if(sessionFloaterNotFocused && conversationFloaterNotFocused) - { - gToolBarView->flashCommand(LLCommandId("chat"), true); - } - //conversation floater is open but a different conversation is focused - else if(sessionFloaterNotFocused) - { - im_box->flashConversationItemWidget(session_id, true); - } + if (session_floater_not_focused) + { + //User is not focused on conversation containing the message + + if(conversation_floater_not_focused) + { + gToolBarView->flashCommand(LLCommandId("chat"), true); + } + //conversation floater is open but a different conversation is focused + else + { + im_box->flashConversationItemWidget(session_id, true); + } + } } + else if("openconversations" == action) { //User is not focused on conversation containing the message - if(sessionFloaterNotFocused) + if(session_floater_not_focused) { //Flash line item im_box->flashConversationItemWidget(session_id, true); |