diff options
| author | brad kittenbrink <brad@lindenlab.com> | 2009-06-29 15:52:24 -0400 |
|---|---|---|
| committer | brad kittenbrink <brad@lindenlab.com> | 2009-06-29 15:52:24 -0400 |
| commit | 50c40dd72e7a36af91cb84395a4a88b984b219aa (patch) | |
| tree | a29dccea6bfaac6d76e1cef4ae0579295ca6c3b2 /indra/llui/llnotifications.cpp | |
| parent | 6da0725c3b75c24855537df877672595de8e56e6 (diff) | |
| parent | 87918b4bfe27ddcba2e4a44323ebc85e509a92fc (diff) | |
Merged my latest eventhost changes with tip/latest viewer-2.0.0-3.
Diffstat (limited to 'indra/llui/llnotifications.cpp')
| -rw-r--r-- | indra/llui/llnotifications.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 452f18b40b..50fee41029 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -160,6 +160,12 @@ private: bool filterIgnoredNotifications(LLNotificationPtr notification) { + // filter everything if we are to ignore ALL + if(LLNotifications::instance().getIgnoreAllNotifications()) + { + return false; + } + LLNotificationFormPtr form = notification->getForm(); // Check to see if the user wants to ignore this alert if (form->getIgnoreType() != LLNotificationForm::IGNORE_NO) @@ -231,7 +237,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP LLSD item_entry; std::string element_name = child->getName()->mString; - if (element_name == "ignore") + if (element_name == "ignore" ) { bool save_option = false; child->getAttribute_bool("save_option", save_option); @@ -925,7 +931,8 @@ std::string LLNotificationChannel::summarize() // LLNotifications implementation // --- LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything, - LLNotificationComparators::orderByUUID()) + LLNotificationComparators::orderByUUID()), + mIgnoreAllNotifications(false) { LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2)); } @@ -1473,6 +1480,14 @@ std::string LLNotifications::getGlobalString(const std::string& key) const } } +void LLNotifications::setIgnoreAllNotifications(bool setting) +{ + mIgnoreAllNotifications = setting; +} +bool LLNotifications::getIgnoreAllNotifications() +{ + return mIgnoreAllNotifications; +} // --- // END OF LLNotifications implementation |
