summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-11-13 11:19:45 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-11-13 11:19:45 -0800
commit5a31b5dceaeb7dd7089c7426371aac39927c5c02 (patch)
treee7066735a04d821bf2e337054f1f2129b69676ce
parent91781df3701da9852dbe87a4d5c9d5e3abf09987 (diff)
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.
-rwxr-xr-xindra/newview/app_settings/settings.xml10
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp2
-rw-r--r--indra/newview/llimview.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml30
4 files changed, 26 insertions, 25 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 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 @@
<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"