diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-15 15:42:22 -0800 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-11-15 15:42:22 -0800 |
commit | d3474c6eaf5f26986e7988f4ca773f67e034c49d (patch) | |
tree | 5f25e19f90aab214c2d3526c25312f541e2f2053 /indra/newview | |
parent | d75824d520ba1965e48196f8b230ded0f15c5841 (diff) |
CHUI-489: Now sounds exist for teleport and inventory offers. The sound is specified in notifications.xml. Also changes for CHUI 486, which allow the user to set preferences for hearing sounds for a New Conversation, Incoming Voice Call, Teleport Offer and Inventory Offer.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 1 |
4 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0f4bbd054a..f7b182e891 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2494,7 +2494,11 @@ void LLIMMgr::addMessage( return; } - make_ui_sound("UISndNewIncomingIMSession"); + //Play sound for new conversations + if(gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE) + { + make_ui_sound("UISndNewIncomingIMSession"); + } } bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index ccad49bc30..8672dc479d 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -493,6 +493,21 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) } // adjust panel's height to the text size snapToMessageHeight(mTextBox, MAX_LENGTH); + + bool playSound = true; + + if((mNotification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer") == FALSE) + || mNotification->getName() == "TeleportOffered" + && gSavedSettings.getBOOL("PlaySoundTeleportOffer") == FALSE) + { + playSound = false; + } + + if(playSound) + { + mNotification->playSound(); + } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6c2ad869ac..bf2bfaf386 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6460,7 +6460,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th icon="notify.tga" name="UserGiveItem" log_to_im ="true" - type="offer"> + type="offer" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] <form name="form"> @@ -6517,7 +6518,8 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th name="TeleportOffered" log_to_im="true" log_to_chat="false" - type="offer"> + type="offer" + sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: “[MESSAGE]” 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 8ab5c9a99c..712e8bff7f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -322,6 +322,7 @@ name="incoming_voice_call" width="150" /> <check_box + enabled="false" control_name="PlaySoundGroupChatMessages" height="16" label="Group chat messages" |