diff options
-rwxr-xr-x | indra/newview/app_settings/settings.xml | 10 | ||||
-rw-r--r-- | indra/newview/llfloaterimnearbychathandler.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 46 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 30 |
4 files changed, 59 insertions, 33 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9b8c86ffc8..b703b9cc8e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6316,7 +6316,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>0</string> + <string>toast</string> </map> <key>NotificationFriendIMOptions</key> <map> @@ -6327,7 +6327,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>0</string> + <string>toast</string> </map> <key>NotificationGroupChatOptions</key> <map> @@ -6338,7 +6338,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>0</string> + <string>toast</string> </map> <key>NotificationNearbyChatOptions</key> <map> @@ -6349,7 +6349,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>0</string> + <string>toast</string> </map> <key>NotificationNonFriendIMOptions</key> <map> @@ -6360,7 +6360,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>0</string> + <string>toast</string> </map> <key>NotificationToastLifeTime</key> <map> diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 0dfaa9174b..ab81b85d04 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") != "toast") + { + 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 781b0cb2ea..3b217ef482 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -139,20 +139,40 @@ 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") != "toast") + { + return; + } + //Ignores friends + else if(gSavedSettings.getString("NotificationFriendIMOptions") != "toast") + { + return; + } + } + //Ignore Ad Hoc Toasts + else if(session->isAdHocSessionType() && + gSavedSettings.getString("NotificationConferenceIMOptions") != "toast") + { + return; + } + //Ignore Group Toasts + else if(session->isGroupSessionType() && + gSavedSettings.getString("NotificationGroupChatOptions") != "toast") + { + return; + } + //Show toast LLAvatarNameCache::get(msg["from_id"].asUUID(), boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index f1b11e2ca8..8ab5c9a99c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -137,15 +137,15 @@ <combo_box.item label="Pop up the message" name="PopUpMessage" - value="0"/> + value="toast"/> <combo_box.item label="Flash toolbar button" name="FlashToolbarButton" - value="1"/> + value="flash"/> <combo_box.item label="None" name="None" - value="2"/> + value="none"/> </combo_box> <text follows="left|top" @@ -168,15 +168,15 @@ <combo_box.item label="Pop up the message" name="PopUpMessage" - value="0"/> + value="toast"/> <combo_box.item label="Flash toolbar button" name="FlashToolbarButton" - value="1"/> + value="flash"/> <combo_box.item label="None" name="None" - value="2"/> + value="none"/> </combo_box> <text follows="left|top" @@ -199,15 +199,15 @@ <combo_box.item label="Pop up the message" name="PopUpMessage" - value="0"/> + value="toast"/> <combo_box.item label="Flash toolbar button" name="FlashToolbarButton" - value="1"/> + value="flash"/> <combo_box.item label="None" name="None" - value="2"/> + value="none"/> </combo_box> <text follows="left|top" @@ -230,15 +230,15 @@ <combo_box.item label="Pop up the message" name="PopUpMessage" - value="0"/> + value="toast"/> <combo_box.item label="Flash toolbar button" name="FlashToolbarButton" - value="1"/> + value="flash"/> <combo_box.item label="None" name="None" - value="2"/> + value="none"/> </combo_box> <text follows="left|top" @@ -261,15 +261,15 @@ <combo_box.item label="Pop up the message" name="PopUpMessage" - value="0"/> + value="toast"/> <combo_box.item label="Flash toolbar button" name="FlashToolBarButton" - value="1"/> + value="flash"/> <combo_box.item label="None" name="None" - value="2"/> + value="none"/> </combo_box> <text follows="left|top" |