diff options
-rw-r--r-- | indra/newview/llagent.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llchannelmanager.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llchannelmanager.h | 7 |
3 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ca1688ad1f..1257cf9789 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -107,6 +107,7 @@ #include "llnavigationbar.h" //to show/hide navigation bar when changing mouse look state #include "llagentui.h" +#include "llchannelmanager.h" using namespace LLVOAvatarDefines; @@ -2166,6 +2167,7 @@ void LLAgent::setBusy() { gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy")); } + LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(true); } //----------------------------------------------------------------------------- @@ -2179,6 +2181,7 @@ void LLAgent::clearBusy() { gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy")); } + LLNotificationsUI::LLChannelManager::getInstance()->muteAllChannels(false); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 914435b640..3443d8b593 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -220,5 +220,12 @@ void LLChannelManager::removeChannelByID(const LLUUID id) } //-------------------------------------------------------------------------- - +void LLChannelManager::muteAllChannels(bool mute) +{ + for (std::vector<ChannelElem>::iterator it = mChannelList.begin(); + it != mChannelList.end(); it++) + { + it->channel->setShowToasts(!mute); + } +} diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index b927d369cd..4b66a1ef89 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -102,6 +102,13 @@ public: // remove channel methods void removeChannelByID(const LLUUID id); + /** + * Manages toasts showing for all channels. + * + * @param mute Flag to disable/enable toasts showing. + */ + void muteAllChannels(bool mute); + private: LLScreenChannel* createChannel(LLChannelManager::Params& p); |