From ff071bbdce6478f8cd666ecf75658ca6e24f1140 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 28 Sep 2010 16:49:22 -0700 Subject: Added a mechanism for preventing classes of notifications from being displayed, controlled by the notification_visibility.xml file in the viewer skin. Reviewed by Richard. --- indra/llui/llnotifications.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/llui/llnotifications.h') diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 4fe1687f0e..75c67151ca 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -268,6 +268,11 @@ struct LLNotificationTemplate; // with smart pointers typedef boost::shared_ptr LLNotificationTemplatePtr; + +struct LLNotificationVisibilityRule; + +typedef boost::shared_ptr LLNotificationVisibilityRulePtr; + /** * @class LLNotification * @brief The object that expresses the details of a notification @@ -856,6 +861,10 @@ public: // load notification descriptions from file; // OK to call more than once because it will reload bool loadTemplates(); + + // load visibility rules from file; + // OK to call more than once because it will reload + bool loadVisibilityRules(); // Add a simple notification (from XUI) void addFromCallback(const LLSD& name); @@ -902,6 +911,8 @@ public: // test for existence bool templateExists(const std::string& name); + typedef std::list VisibilityRuleList; + void forceResponse(const LLNotification::Params& params, S32 option); void createDefaultChannels(); @@ -916,7 +927,9 @@ public: void setIgnoreAllNotifications(bool ignore); bool getIgnoreAllNotifications(); - + + bool isVisibleByRules(LLNotificationPtr pNotification); + private: // we're a singleton, so we don't have a public constructor LLNotifications(); @@ -935,6 +948,8 @@ private: // put your template in bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate); TemplateMap mTemplates; + + VisibilityRuleList mVisibilityRules; std::string mFileName; -- cgit v1.2.3 From 2b6d3b851fc6210e7cf6272ac0bc9f8645ca5644 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 30 Sep 2010 14:48:36 -0700 Subject: Adding tags mechanism to notification visibility rules. Also started adding the tag 'fail' to entries in notifications.xml that are failures the user should always be told about. Reviewed by Richard. --- indra/llui/llnotifications.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llui/llnotifications.h') diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 75c67151ca..98ff035170 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -580,6 +580,8 @@ public: std::string summarize() const; bool hasUniquenessConstraints() const; + + bool matchesTag(const std::string& tag); virtual ~LLNotification() {} }; -- cgit v1.2.3 From b10744dbee7ffa64180f5558cac874e126045fc8 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 11 Oct 2010 16:33:23 -0700 Subject: fix for default notification form valus not appearing --- indra/llui/llnotifications.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llnotifications.h') diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 5298549b58..3b50d0b2b6 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -194,6 +194,7 @@ public: { Mandatory type; Optional width; + Optional value; FormInput(); }; -- cgit v1.2.3