summaryrefslogtreecommitdiff
path: root/indra/newview/llfirstuse.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-31 12:34:17 -0500
committerOz Linden <oz@lindenlab.com>2011-01-31 12:34:17 -0500
commited308d15bf2f88f91687411cd92f6cc55b1e75b4 (patch)
tree9353a91515097c1088ed850ab27372e433f2f7c1 /indra/newview/llfirstuse.cpp
parent5322021746582195df6b7ad5843a7da09e617917 (diff)
parentcb6d59513eabe72029821a96191873351fd5c753 (diff)
merge changes for storm-845
Diffstat (limited to 'indra/newview/llfirstuse.cpp')
-rw-r--r--indra/newview/llfirstuse.cpp58
1 files changed, 33 insertions, 25 deletions
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 4c17199895..4d252dc662 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -41,35 +41,36 @@
// static
-std::set<std::string> LLFirstUse::sConfigVariables;
+//std::set<std::string> LLFirstUse::sConfigVariables;
+std::set<std::string> LLFirstUse::sConfigVariablesEnabled;
// static
-void LLFirstUse::addConfigVariable(const std::string& var)
-{
- sConfigVariables.insert(var);
-}
+//void LLFirstUse::addConfigVariable(const std::string& var)
+//{
+// sConfigVariables.insert(var);
+//}
// static
-void LLFirstUse::disableFirstUse()
-{
- // Set all first-use warnings to disabled
- for (std::set<std::string>::iterator iter = sConfigVariables.begin();
- iter != sConfigVariables.end(); ++iter)
- {
- gWarningSettings.setBOOL(*iter, FALSE);
- }
-}
+//void LLFirstUse::disableFirstUse()
+//{
+// // Set all first-use warnings to disabled
+// for (std::set<std::string>::iterator iter = sConfigVariables.begin();
+// iter != sConfigVariables.end(); ++iter)
+// {
+// gWarningSettings.setBOOL(*iter, FALSE);
+// }
+//}
// static
-void LLFirstUse::resetFirstUse()
-{
- // Set all first-use warnings to disabled
- for (std::set<std::string>::iterator iter = sConfigVariables.begin();
- iter != sConfigVariables.end(); ++iter)
- {
- gWarningSettings.setBOOL(*iter, TRUE);
- }
-}
+//void LLFirstUse::resetFirstUse()
+//{
+// // Set all first-use warnings to disabled
+// for (std::set<std::string>::iterator iter = sConfigVariables.begin();
+// iter != sConfigVariables.end(); ++iter)
+// {
+// gWarningSettings.setBOOL(*iter, TRUE);
+// }
+//}
// static
void LLFirstUse::otherAvatarChatFirst(bool enable)
@@ -151,13 +152,21 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
if (enable)
{
+ if(sConfigVariablesEnabled.find(control_var) != sConfigVariablesEnabled.end())
+ {
+ return ; //already added
+ }
+
if (gSavedSettings.getBOOL("EnableUIHints"))
{
LL_DEBUGS("LLFirstUse") << "Trigger first use notification " << notification_name << LL_ENDL;
// if notification doesn't already exist and this notification hasn't been disabled...
if (gWarningSettings.getBOOL(control_var))
- { // create new notification
+ {
+ sConfigVariablesEnabled.insert(control_var) ;
+
+ // create new notification
LLNotifications::instance().add(LLNotification::Params().name(notification_name).substitutions(args).payload(payload.with("control_var", control_var)));
}
}
@@ -169,7 +178,6 @@ void LLFirstUse::firstUseNotification(const std::string& control_var, bool enabl
// redundantly clear settings var here, in case there are no notifications to cancel
gWarningSettings.setBOOL(control_var, FALSE);
}
-
}
// static