From 27f6b2ea7d9339f9ecfd3f7bbbde356cfe007848 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 29 Sep 2010 16:51:21 -0700 Subject: Change non-visible notifications to return empty response instead of default. This is part of EXP-111. Reviewed by Richard. --- indra/llui/llnotifications.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6e1f574935..98718e4de7 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -182,6 +182,20 @@ bool defaultResponse(const LLSD& payload) return false; } +bool emptyResponse(const LLSD& payload) +{ + if (payload["sigtype"].asString() == "add") + { + LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID()); + if (pNotif) + { + // supply empty response + pNotif->respond(pNotif->getResponseTemplate(LLNotification::WITHOUT_DEFAULT_BUTTON)); + } + } + return false; +} + namespace LLNotificationFilters { // a sample filter @@ -1238,7 +1252,7 @@ void LLNotifications::createDefaultChannels() LLNotifications::instance().getChannel("Ignore")-> connectFailedFilter(&handleIgnoredNotification); LLNotifications::instance().getChannel("VisibilityRules")-> - connectFailedFilter(&handleIgnoredNotification); + connectFailedFilter(&emptyResponse); } bool LLNotifications::addTemplate(const std::string &name, -- cgit v1.2.3