summaryrefslogtreecommitdiff
path: root/indra/llui/llnotifications.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-09-09 18:58:41 -0700
committerRichard Linden <none@none>2013-09-09 18:58:41 -0700
commit52da9f5f49e0e300943abc3afa6944e6bee0cdd1 (patch)
treeb61a1aa1775b3faca1baf492a969a51d7ce8b3fe /indra/llui/llnotifications.cpp
parent55ae6a7962cdc9a9d7d087fbc529d30db9c37013 (diff)
parent91850b6cfacb32ed32265ebd37ce7690dd79a0b0 (diff)
merge with viewer-release
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rwxr-xr-xindra/llui/llnotifications.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index a1853ca1f7..e43bb220e0 100755
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -246,7 +246,7 @@ LLNotificationForm::LLNotificationForm(const LLSD& sd)
}
else
{
- llwarns << "Invalid form data " << sd << llendl;
+ LL_WARNS() << "Invalid form data " << sd << LL_ENDL;
mFormData = LLSD::emptyArray();
}
}
@@ -438,11 +438,11 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mUniqueContext.push_back(context.value);
}
- lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl;
+ LL_DEBUGS() << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL;
BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags)
{
- lldebugs << " tag \"" << std::string(tag.value) << "\"" << llendl;
+ LL_DEBUGS() << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL;
mTags.push_back(tag.value);
}
@@ -516,7 +516,7 @@ LLNotification::LLNotification(const LLSDParamAdapter<Params>& p) :
LLSD LLNotification::asLLSD(bool excludeTemplateElements)
-{
+{
LLParamSDParser parser;
Params p;
@@ -544,12 +544,12 @@ LLSD LLNotification::asLLSD(bool excludeTemplateElements)
mForm->getElements(dynamicElements, templateForm->getNumElements());
p.form_elements = dynamicElements;
}
-
+
if(mResponder)
{
p.functor.responder_sd = mResponder->asLLSD();
}
-
+
if(!mResponseFunctorName.empty())
{
p.functor.name = mResponseFunctorName;
@@ -1207,6 +1207,9 @@ LLNotifications::LLNotifications()
mIgnoreAllNotifications(false)
{
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
+
+ // touch the instance tracker for notification channels, so that it will still be around in our destructor
+ LLInstanceTracker<LLNotificationChannel, std::string>::instanceCount();
}
@@ -1402,7 +1405,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op
if (selected_item.isUndefined())
{
- llwarns << "Invalid option" << option << " for notification " << (std::string)params.name << llendl;
+ LL_WARNS() << "Invalid option" << option << " for notification " << (std::string)params.name << LL_ENDL;
return;
}
response[selected_item["name"].asString()] = true;
@@ -1436,12 +1439,12 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements)
if (found != replacements.end())
{
replacement = found->second;
- lldebugs << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << llendl;
+ LL_DEBUGS() << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL;
it->second->setValue(replacement);
}
else
{
- llwarns << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << llendl;
+ LL_WARNS() << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << LL_ENDL;
}
}
}
@@ -1480,7 +1483,7 @@ void addPathIfExists(const std::string& new_path, std::vector<std::string>& path
bool LLNotifications::loadTemplates()
{
- llinfos << "Reading notifications template" << llendl;
+ LL_INFOS() << "Reading notifications template" << LL_ENDL;
// Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it
// output all relevant pathnames instead of just the ones from the most
// specific skin.
@@ -1493,7 +1496,7 @@ bool LLNotifications::loadTemplates()
if (!success || root.isNull() || !root->hasName( "notifications" ))
{
- llerrs << "Problem reading XML from UI Notifications file: " << base_filename << llendl;
+ LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL;
return false;
}
@@ -1503,7 +1506,7 @@ bool LLNotifications::loadTemplates()
if(!params.validateBlock())
{
- llerrs << "Problem reading XUI from UI Notifications file: " << base_filename << llendl;
+ LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL;
return false;
}
@@ -1551,7 +1554,7 @@ bool LLNotifications::loadTemplates()
mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification));
}
- llinfos << "...done" << llendl;
+ LL_INFOS() << "...done" << LL_ENDL;
return true;
}
@@ -1569,7 +1572,7 @@ bool LLNotifications::loadVisibilityRules()
if(!params.validateBlock())
{
- llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl;
+ LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL;
return false;
}
@@ -1634,7 +1637,7 @@ void LLNotifications::add(const LLNotificationPtr pNotif)
LLNotificationSet::iterator it=mItems.find(pNotif);
if (it != mItems.end())
{
- llerrs << "Notification added a second time to the master notification channel." << llendl;
+ LL_ERRS() << "Notification added a second time to the master notification channel." << LL_ENDL;
}
updateItem(LLSD().with("sigtype", "add").with("id", pNotif->id()), pNotif);
@@ -1692,7 +1695,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid)
LLNotificationSet::iterator it=mItems.find(target);
if (it == mItems.end())
{
- LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl;
+ LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << LL_ENDL;
return LLNotificationPtr((LLNotification*)NULL);
}
else
@@ -1743,13 +1746,13 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++)
{
// An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule.
- lldebugs
+ LL_DEBUGS()
<< "notification \"" << n->getName() << "\" "
<< "testing against " << ((*it)->mVisible?"show":"hide") << " rule, "
<< "name = \"" << (*it)->mName << "\" "
<< "tag = \"" << (*it)->mTag << "\" "
<< "type = \"" << (*it)->mType << "\" "
- << llendl;
+ << LL_ENDL;
if(!(*it)->mType.empty())
{
@@ -1788,7 +1791,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
if((*it)->mResponse.empty())
{
// Response property is empty. Cancel this notification.
- lldebugs << "cancelling notification " << n->getName() << llendl;
+ LL_DEBUGS() << "cancelling notification " << n->getName() << LL_ENDL;
cancel(n);
}
@@ -1799,7 +1802,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
// TODO: verify that the response template has an item with the correct name
response[(*it)->mResponse] = true;
- lldebugs << "responding to notification " << n->getName() << " with response = " << response << llendl;
+ LL_DEBUGS() << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL;
n->respond(response);
}
@@ -1811,7 +1814,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
break;
}
- lldebugs << "allowing notification " << n->getName() << llendl;
+ LL_DEBUGS() << "allowing notification " << n->getName() << LL_ENDL;
return true;
}
@@ -1872,7 +1875,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
// from PE merge - we should figure out if this is the right thing to do
if (name.empty())
{
- llwarns << "Empty name received for Id: " << agent_id << llendl;
+ LL_WARNS() << "Empty name received for Id: " << agent_id << LL_ENDL;
name = SYSTEM_FROM;
}