summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2009-11-16 14:36:09 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2009-11-16 14:36:09 +0200
commit89e917599b7d24e2fc7ec9c58522756f4877ad92 (patch)
treeb998da82b5d3847ef7c3f964b0c3b19d500978c1 /indra/newview
parent508097d0f691e9705ab25d0b42f13a8d02a90049 (diff)
fixed EXT-862 "Add support for Busy mode into notifications";
disabled showing toasts except alertmodal in busy mode --HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp3
-rw-r--r--indra/newview/llchannelmanager.cpp9
-rw-r--r--indra/newview/llchannelmanager.h7
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);