summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-16 17:55:28 -0700
committerRichard Linden <none@none>2010-09-16 17:55:28 -0700
commit2dc14c66d4f50dfe4d140b5630cadf2febcee09d (patch)
tree5abaa6a86e3ca6a9541cd1db560d34179e1df257
parent57d4e7261d2a451f2066b68e163d6632fcac246e (diff)
fix for all notifications being ignored by default
-rw-r--r--indra/llui/llnotifications.cpp16
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml3
2 files changed, 13 insertions, 6 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index bd58fe2637..6a0d64e876 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -62,7 +62,7 @@ LLNotificationForm::FormElementBase::FormElementBase()
LLNotificationForm::FormIgnore::FormIgnore()
: text("text"),
control("control"),
- invert_control("invert_control", false),
+ invert_control("invert_control", true),
save_option("save_option", false)
{}
@@ -190,7 +190,7 @@ LLNotificationForm::LLNotificationForm()
LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotificationForm::Params& p)
: mIgnore(IGNORE_NO),
- mInvertSetting(false)
+ mInvertSetting(true) // ignore settings by default mean true=show, false=ignore
{
if (p.ignore.isProvided())
{
@@ -353,18 +353,24 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting()
bool LLNotificationForm::getIgnored()
{
+ bool ignored = false;
if (mIgnore != LLNotificationForm::IGNORE_NO
&& mIgnoreSetting)
{
- return mIgnoreSetting->getValue().asBoolean() != mInvertSetting;
+ ignored = mIgnoreSetting->getValue().asBoolean();
+ if (mInvertSetting) ignored = !ignored;
}
- return false;
+ return ignored;
}
void LLNotificationForm::setIgnored(bool ignored)
{
- if (mIgnoreSetting) mIgnoreSetting->setValue(ignored != mInvertSetting);
+ if (mIgnoreSetting)
+ {
+ if (mInvertSetting) ignored = !ignored;
+ mIgnoreSetting->setValue(ignored);
+ }
}
LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Params& p)
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 9d947480b3..d206313185 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6460,7 +6460,8 @@ Mute everyone?
A pop-up was prevented from opening.
<form name="form">
<ignore name="ignore"
- control="MediaEnablePopups"
+ control="MediaEnablePopups"
+ invert_control="false"
text="Enable all pop-ups"/>
<button default="true"
index="0"