From 5a31b5dceaeb7dd7089c7426371aac39927c5c02 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 13 Nov 2012 11:19:45 -0800 Subject: CHUI-486: Code cleanup, instead of using values such as 0, 1, 2 now using strings 'toast', 'flash', 'none'. These values are used whether to show a notification or not. --- indra/newview/app_settings/settings.xml | 10 ++++---- indra/newview/llfloaterimnearbychathandler.cpp | 2 +- indra/newview/llimview.cpp | 9 ++++--- .../default/xui/en/panel_preferences_chat.xml | 30 +++++++++++----------- 4 files changed, 26 insertions(+), 25 deletions(-) (limited to 'indra/newview') 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 @@ Type String Value - 0 + toast NotificationFriendIMOptions @@ -6327,7 +6327,7 @@ Type String Value - 0 + toast NotificationGroupChatOptions @@ -6338,7 +6338,7 @@ Type String Value - 0 + toast NotificationNearbyChatOptions @@ -6349,7 +6349,7 @@ Type String Value - 0 + toast NotificationNonFriendIMOptions @@ -6360,7 +6360,7 @@ Type String Value - 0 + toast NotificationToastLifeTime diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index f382b65b1d..ab81b85d04 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -284,7 +284,7 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast() void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) { //Ignore Nearby Toasts - if(gSavedSettings.getString("NotificationNearbyChatOptions") != "0") + if(gSavedSettings.getString("NotificationNearbyChatOptions") != "toast") { return; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e4b51b719b..d57ffb9a11 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -149,29 +149,30 @@ void toast_callback(const LLSD& msg){ { //Ignores non-friends if(LLAvatarTracker::instance().getBuddyInfo(msg["from_id"]) == NULL && - gSavedSettings.getString("NotificationNonFriendIMOptions") != "0") + gSavedSettings.getString("NotificationNonFriendIMOptions") != "toast") { return; } //Ignores friends - else if(gSavedSettings.getString("NotificationFriendIMOptions") != "0") + else if(gSavedSettings.getString("NotificationFriendIMOptions") != "toast") { return; } } //Ignore Ad Hoc Toasts else if(session->isAdHocSessionType() && - gSavedSettings.getString("NotificationConferenceIMOptions") != "0") + gSavedSettings.getString("NotificationConferenceIMOptions") != "toast") { return; } //Ignore Group Toasts else if(session->isGroupSessionType() && - gSavedSettings.getString("NotificationGroupChatOptions") != "0") + 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 @@ + value="toast"/> + value="flash"/> + value="none"/> + value="toast"/> + value="flash"/> + value="none"/> + value="toast"/> + value="flash"/> + value="none"/> + value="toast"/> + value="flash"/> + value="none"/> + value="toast"/> + value="flash"/> + value="none"/>