From 5445c58007e4d7a90fc3df26732cf319f49ca4f0 Mon Sep 17 00:00:00 2001 From: Selo Date: Fri, 14 Oct 2011 16:41:54 +0200 Subject: [PATCH] FIRE-3547 Gave ContactSets the option to control where the notices show up (toasts or nearby chat) and moved around the settings about on-offline notices --- indra/newview/app_settings/settings.xml | 22 +++++++++++++++++++ indra/newview/llcallingcard.cpp | 12 +++++++++- indra/newview/llnotificationtiphandler.cpp | 3 ++- .../xui/en/floater_contactsets_settings.xml | 7 ++++-- .../xui/en/panel_preferences_alerts.xml | 15 ++++++++++--- .../xui/en/panel_preferences_firestorm.xml | 3 +++ 6 files changed, 55 insertions(+), 7 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7cfe286518..ae711ed4d2 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16556,5 +16556,27 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSContactSetsNotificationToast + + Comment + Show the On/Offline notifications caused by Contactsets as Toast message + Persist + 1 + Type + Boolean + Value + 0 + + FSContactSetsNotificationNearbyChat + + Comment + Show the On/Offline notifications caused by Contactsets in Nearby Chat + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 22cf12a3b7..30b2afa499 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -818,7 +818,17 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, LLIMModel::instance().proccessOnlineOfflineNotification(session_id, notify_msg); // If desired, also send it to nearby chat, this allows friends' // online/offline times to be referenced in chat & logged. - if (gSavedSettings.getBOOL("OnlineOfflinetoNearbyChat")||LGGContactSets::getInstance()->notifyForFriend(agent_id)) + // [FIRE-3522 : SJ] Only show Online/Offline toast for groups which have enabled "Show notice for this set" and in the settingpage of CS is checked that the messages need to be in Toasts + if (gSavedSettings.getBOOL("OnlineOfflinetoNearbyChat")) + { + LLChat chat; + chat.mText = notify_msg; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + args["type"] = LLNotificationsUI::NT_NEARBYCHAT; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + } + // [FIRE-3522 : SJ] show Online/Offline toast for groups which have enabled "Show notice for this set" and in the settingpage of CS is checked that the messages need to be in Nearby Chat + if (gSavedSettings.getBOOL("FSContactSetsNotificationNearbyChat") && LGGContactSets::getInstance()->notifyForFriend(agent_id)) { LLChat chat; chat.mText = notify_msg; diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index d826eea13b..9b8a3d9ceb 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -133,7 +133,8 @@ bool LLTipHandler::processNotification(const LLSD& notify) // [FIRE-3522 : SJ] Only show Online/Offline toast when ChatOnlineNotification is enabled or the Friend is one you want to have on/offline notices from if (!gSavedSettings.getBOOL("ChatOnlineNotification") && ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName())) { - if (!LGGContactSets::getInstance()->notifyForFriend(agent_id) ) + // [FIRE-3522 : SJ] Only show Online/Offline toast for groups which have enabled "Show notice for this set" and in the settingpage of CS is checked that the messages need to be in Toasts + if (!(gSavedSettings.getBOOL("FSContactSetsNotificationToast") && LGGContactSets::getInstance()->notifyForFriend(agent_id))) { return false; } diff --git a/indra/newview/skins/default/xui/en/floater_contactsets_settings.xml b/indra/newview/skins/default/xui/en/floater_contactsets_settings.xml index 9c292c17dc..580cdc030d 100644 --- a/indra/newview/skins/default/xui/en/floater_contactsets_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_contactsets_settings.xml @@ -1,10 +1,13 @@ - + Default color for friends not in a Set - + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index 3d3ccfc0bb..66b2db0e66 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -32,11 +32,20 @@ + + +