summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-04-01 09:34:41 -0400
committerOz Linden <oz@lindenlab.com>2013-04-01 09:34:41 -0400
commit90b56ee9fa95ca8cc15e3abc81977f504eb32c5b (patch)
tree581e4ba644ebf770dbdab292ea9f10d4b9404cb6 /indra/newview/llimview.cpp
parent130e4e510198147664a2377b62b22d8e42f00f04 (diff)
parent49bef4e122e3ab4c82962e25f4ec1803c4e0c600 (diff)
merge changes for 3.5.0-beta7
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 76a314f807..e237cb7f9e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -174,6 +174,7 @@ void on_new_message(const LLSD& msg)
// determine state of conversations floater
enum {CLOSED, NOT_ON_TOP, ON_TOP, ON_TOP_AND_ITEM_IS_SELECTED} conversations_floater_status;
+
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
@@ -181,19 +182,18 @@ void on_new_message(const LLSD& msg)
{
conversations_floater_status = CLOSED;
}
- else if ( !im_box->hasFocus() &&
- (!session_floater || !LLFloater::isVisible(session_floater)
- || session_floater->isMinimized() || !session_floater->hasFocus()))
+ else if (!session_floater || !LLFloater::isVisible(session_floater)
+ || session_floater->isMinimized() || !session_floater->hasFocus())
{
conversations_floater_status = NOT_ON_TOP;
}
- else if (im_box->getSelectedSession() != session_id)
+ else if ((session_floater->hasFocus()) && (im_box->getSelectedSession() == session_id))
{
- conversations_floater_status = ON_TOP;
+ conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED;
}
else
{
- conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED;
+ conversations_floater_status = ON_TOP;
}
// determine user prefs for this session
@@ -274,7 +274,9 @@ void on_new_message(const LLSD& msg)
// 2. Flash line item
if ("openconversations" == user_preferences
- || ON_TOP == conversations_floater_status)
+ || ON_TOP == conversations_floater_status
+ || ("toast" == user_preferences && ON_TOP != conversations_floater_status)
+ || ("flash" == user_preferences && CLOSED == conversations_floater_status))
{
if(!LLMuteList::getInstance()->isMuted(participant_id))
{
@@ -295,8 +297,11 @@ void on_new_message(const LLSD& msg)
}
// 4. Toast
- if ("toast" == user_preferences
+ if ((("toast" == user_preferences) &&
+ (CLOSED == conversations_floater_status
+ || NOT_ON_TOP == conversations_floater_status))
|| !session_floater->isMessagePaneExpanded())
+
{
//Show IM toasts (upper right toasts)
// Skip toasting for system messages and for nearby chat