diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-12 18:18:34 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-12 18:18:34 -0800 |
commit | 91781df3701da9852dbe87a4d5c9d5e3abf09987 (patch) | |
tree | 02c2569e8ef761f847a20db679dc86b7614d7fde | |
parent | 0e6139eb3d3af1e77df20f87deef427993bf2c61 (diff) |
CHUI-486: Now toasts only appear when proper 'Chat Preference' setting is set to 'Pop Up Message'.
-rw-r--r-- | indra/newview/llfloaterimnearbychathandler.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 45 |
2 files changed, 38 insertions, 13 deletions
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 0dfaa9174b..f382b65b1d 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -283,6 +283,12 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { + //Ignore Nearby Toasts + if(gSavedSettings.getString("NotificationNearbyChatOptions") != "0") + { + return; + } + //look in pool. if there is any message if(mStopProcessing) return; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6712127750..e4b51b719b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -139,19 +139,38 @@ void toast_callback(const LLSD& msg){ return; } - // *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea - LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( - msg["session_id"]); - if (!gSavedSettings.getBOOL("EnableGroupChatPopups") - && session->isGroupSessionType()) - { - return; - } - if (!gSavedSettings.getBOOL("EnableIMChatPopups") - && !session->isGroupSessionType()) - { - return; - } + // *NOTE Skip toasting if the user disable it in preferences/debug settings ~Alexandrea + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( + msg["session_id"]); + + + //Ignore P2P Friend/Non-Friend toasts + if(session->isP2PSessionType()) + { + //Ignores non-friends + if(LLAvatarTracker::instance().getBuddyInfo(msg["from_id"]) == NULL && + gSavedSettings.getString("NotificationNonFriendIMOptions") != "0") + { + return; + } + //Ignores friends + else if(gSavedSettings.getString("NotificationFriendIMOptions") != "0") + { + return; + } + } + //Ignore Ad Hoc Toasts + else if(session->isAdHocSessionType() && + gSavedSettings.getString("NotificationConferenceIMOptions") != "0") + { + return; + } + //Ignore Group Toasts + else if(session->isGroupSessionType() && + gSavedSettings.getString("NotificationGroupChatOptions") != "0") + { + return; + } LLAvatarNameCache::get(msg["from_id"].asUUID(), boost::bind(&on_avatar_name_cache_toast, |