diff options
| author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-16 11:18:22 -0800 |
|---|---|---|
| committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-16 11:18:22 -0800 |
| commit | d6358e120fd5f6b6e987c05469c18b9ef186dba0 (patch) | |
| tree | 9455f1b9f640044988e5642b2d986aa4440457c9 /indra/newview/llnotificationofferhandler.cpp | |
| parent | 568d818ffe214c358f92717ceb86dd20cb4aed26 (diff) | |
| parent | 4cf894dc77d31d029e77fa9f1212deaa75d9f844 (diff) | |
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
| -rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 6e641575fa..91003c7d53 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -117,6 +117,17 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); if(channel) channel->addToast(p); + + //Will not play a notification sound for inventory and teleport offer based upon chat preference + bool playSound = !((notification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer") == FALSE) + || notification->getName() == "TeleportOffered" + && gSavedSettings.getBOOL("PlaySoundTeleportOffer") == FALSE); + + if(playSound) + { + notification->playSound(); + } } if (notification->canLogToIM()) |
