diff options
author | Richard Linden <none@none> | 2010-11-08 19:27:24 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2010-11-08 19:27:24 -0800 |
commit | 8daea83c98d57e7c063bf9287b1e9c0cd720d337 (patch) | |
tree | 4af322c78e390283ec7773592325fbb3281343a7 | |
parent | 197f09f1ea7c634d619a3d87d65f6e929611c511 (diff) |
EXP-421 FIX Notifications tab in Preferences not working properly
fixed logic so that ignore consistently means *don't show* the notification
the ignore settings still store "show the notification if true" values
-rw-r--r-- | indra/llui/llnotifications.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 3dba2d2b83..d6d3672784 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -219,7 +219,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica } else { - LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Ignore notification with this name", TRUE); + LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", TRUE); mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name); } } @@ -357,15 +357,15 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { - bool ignored = false; + bool show = false; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { - ignored = mIgnoreSetting->getValue().asBoolean(); - if (mInvertSetting) ignored = !ignored; + show = mIgnoreSetting->getValue().asBoolean(); + if (mInvertSetting) show = !show; } - return ignored; + return !show; } void LLNotificationForm::setIgnored(bool ignored) @@ -373,7 +373,7 @@ void LLNotificationForm::setIgnored(bool ignored) if (mIgnoreSetting) { if (mInvertSetting) ignored = !ignored; - mIgnoreSetting->setValue(ignored); + mIgnoreSetting->setValue(!ignored); } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 2bea3d37ff..5becd8f990 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -803,7 +803,7 @@ void LLFloaterPreference::buildPopupLists() LLScrollListItem* item = NULL; - bool show_popup = formp->getIgnored(); + bool show_popup = !formp->getIgnored(); if (!show_popup) { if (ignore == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE) @@ -1155,7 +1155,7 @@ void LLFloaterPreference::onClickDisablePopup() for (itor = items.begin(); itor != items.end(); ++itor) { LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); - templatep->mForm->setIgnored(false); + templatep->mForm->setIgnored(true); } buildPopupLists(); @@ -1169,7 +1169,7 @@ void LLFloaterPreference::resetAllIgnored() { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) { - iter->second->mForm->setIgnored(true); + iter->second->mForm->setIgnored(false); } } } @@ -1182,7 +1182,7 @@ void LLFloaterPreference::setAllIgnored() { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) { - iter->second->mForm->setIgnored(false); + iter->second->mForm->setIgnored(true); } } } |