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.
parent
d75824d520
commit
d3474c6eaf
|
|
@ -64,6 +64,8 @@
|
|||
// use this to control "jumping" behavior when Ctrl-Tabbing
|
||||
const S32 TABBED_FLOATER_OFFSET = 0;
|
||||
|
||||
extern LLControlGroup gSavedSettings;
|
||||
|
||||
namespace LLInitParam
|
||||
{
|
||||
void TypeValues<LLFloaterEnums::EOpenPositioning>::declareValues()
|
||||
|
|
@ -660,7 +662,18 @@ void LLFloater::openFloater(const LLSD& key)
|
|||
&& !getFloaterHost()
|
||||
&& (!getVisible() || isMinimized()))
|
||||
{
|
||||
make_ui_sound("UISndWindowOpen");
|
||||
bool playSound = true;
|
||||
|
||||
//Don't play a sound for incoming voice call based upon chat preference setting
|
||||
if(getName() == "incoming call" && gSavedSettings.getBOOL("PlaySoundIncomingVoiceCall") == FALSE)
|
||||
{
|
||||
playSound = false;
|
||||
}
|
||||
|
||||
if(playSound)
|
||||
{
|
||||
make_ui_sound("UISndWindowOpen");
|
||||
}
|
||||
}
|
||||
|
||||
//RN: for now, we don't allow rehosting from one multifloater to another
|
||||
|
|
|
|||
|
|
@ -899,6 +899,11 @@ bool LLNotification::hasFormElements() const
|
|||
return mTemplatep->mForm->getNumElements() != 0;
|
||||
}
|
||||
|
||||
void LLNotification::playSound()
|
||||
{
|
||||
LLUI::sAudioCallback(mTemplatep->mSoundEffect);
|
||||
}
|
||||
|
||||
LLNotification::ECombineBehavior LLNotification::getCombineBehavior() const
|
||||
{
|
||||
return mTemplatep->mCombineBehavior;
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ public:
|
|||
bool canLogToIM() const;
|
||||
bool canShowToast() const;
|
||||
bool hasFormElements() const;
|
||||
void playSound();
|
||||
|
||||
typedef enum e_combine_behavior
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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") &&
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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]”
|
||||
|
|
|
|||
|
|
@ -322,6 +322,7 @@
|
|||
name="incoming_voice_call"
|
||||
width="150" />
|
||||
<check_box
|
||||
enabled="false"
|
||||
control_name="PlaySoundGroupChatMessages"
|
||||
height="16"
|
||||
label="Group chat messages"
|
||||
|
|
|
|||
Loading…
Reference in New Issue