diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2013-03-27 22:52:41 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2013-03-27 22:52:41 +0200 |
commit | 3a31b47028e0ae4945512924219118a74b0c7b27 (patch) | |
tree | 6e1928dd6861c154dc0001b7b1376c17f0a1d683 /indra | |
parent | b973e8566d6f88d10e74c343bd67a2ad23b7c47d (diff) |
CHUI-486 ADD FIX Update Preferences -> Chat XUI
1) when preference is "Pop up" - added toast according to Kurt's comment from 22/Dec/12;
2) fixed line item flashing and "Chat" button flashing in other cases according to original matrix.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterimnearbychathandler.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 12 |
2 files changed, 11 insertions, 16 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 7afcf288ce..0824b26406 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -559,9 +559,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); - if(( nearby_chat->hasFocus() - || im_box->hasFocus() - || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT + if(( ( chat_msg.mSourceType == CHAT_SOURCE_AGENT && gSavedSettings.getBOOL("UseChatBubbles") ) || mChannel.isDead() || !mChannel.get()->getShowToasts() ) @@ -606,17 +604,16 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, toast_msg = chat_msg.mText; } - //Don't show nearby toast, if conversation is visible but not focused - LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(LLUUID()); - if (session_floater && session_floater->isMessagePaneExpanded() - && session_floater->isInVisibleChain() && !session_floater->isMinimized() - && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) + //Don't show nearby toast, if conversation is visible and selected + if (im_box->getSelectedSession().isNull() && + ((LLFloater::isVisible(im_box) && !im_box->isMinimized() && im_box->isFrontmost()) + || (LLFloater::isVisible(nearby_chat) && !nearby_chat->isMinimized() && nearby_chat->isFrontmost()))) { return; } //Will show toast when chat preference is set - if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !session_floater->isMessagePaneExpanded()) + if((gSavedSettings.getString("NotificationNearbyChatOptions") == "toast") || !nearby_chat->isMessagePaneExpanded()) { // Add a nearby chat toast. LLUUID id; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ca04d27d11..76a314f807 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -181,9 +181,9 @@ void on_new_message(const LLSD& msg) { conversations_floater_status = CLOSED; } - else if (!im_box->isFrontmost() && + else if ( !im_box->hasFocus() && (!session_floater || !LLFloater::isVisible(session_floater) - || session_floater->isMinimized() || !session_floater->isFrontmost())) + || session_floater->isMinimized() || !session_floater->hasFocus())) { conversations_floater_status = NOT_ON_TOP; } @@ -274,7 +274,7 @@ void on_new_message(const LLSD& msg) // 2. Flash line item if ("openconversations" == user_preferences - || NOT_ON_TOP == conversations_floater_status) + || ON_TOP == conversations_floater_status) { if(!LLMuteList::getInstance()->isMuted(participant_id)) { @@ -283,7 +283,7 @@ void on_new_message(const LLSD& msg) } // 3. Flash FUI button - if ("flash" == user_preferences && + if (("toast" == user_preferences || "flash" == user_preferences) && (CLOSED == conversations_floater_status || NOT_ON_TOP == conversations_floater_status)) { @@ -295,9 +295,7 @@ void on_new_message(const LLSD& msg) } // 4. Toast - if (("toast" == user_preferences && - (CLOSED == conversations_floater_status - || NOT_ON_TOP == conversations_floater_status)) + if ("toast" == user_preferences || !session_floater->isMessagePaneExpanded()) { //Show IM toasts (upper right toasts) |