diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 00:39:07 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-12 00:39:07 +0200 |
commit | 84f3b2865fe3ec2a3dfb0a96ed0389381cebeed5 (patch) | |
tree | 1490249690bb3c7c0509e8ad73e2b7f7748d9dba /indra/llui/llnotifications.cpp | |
parent | 6ec37fac60c0288e576b72b91b16d74b37dbc32d (diff) | |
parent | 78bdf57ad6610b34389226bf941ba736ca0c2225 (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r-- | indra/llui/llnotifications.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7bafd711cb..9fc6c05ead 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -130,7 +130,7 @@ bool handleIgnoredNotification(const LLSD& payload) response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON); break; case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE: - response = LLUI::sSettingGroups["ignores"]->getLLSD("Default" + pNotif->getName()); + response = LLUI::getInstance()->mSettingGroups["ignores"]->getLLSD("Default" + pNotif->getName()); break; case LLNotificationForm::IGNORE_SHOW_AGAIN: break; @@ -197,6 +197,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica { mIgnoreMsg = p.ignore.text; + LLUI *ui_inst = LLUI::getInstance(); if (!p.ignore.save_option) { mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE; @@ -205,19 +206,19 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica { // remember last option chosen by user and automatically respond with that in the future mIgnore = IGNORE_WITH_LAST_RESPONSE; - LLUI::sSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name)); + ui_inst->mSettingGroups["ignores"]->declareLLSD(std::string("Default") + name, "", std::string("Default response for notification " + name)); } BOOL show_notification = TRUE; if (p.ignore.control.isProvided()) { - mIgnoreSetting = LLUI::sSettingGroups["config"]->getControl(p.ignore.control); + mIgnoreSetting = ui_inst->mSettingGroups["config"]->getControl(p.ignore.control); mInvertSetting = p.ignore.invert_control; } else { - LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", LLControlVariable::PERSIST_NONDFT); - mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name); + ui_inst->mSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", LLControlVariable::PERSIST_NONDFT); + mIgnoreSetting = ui_inst->mSettingGroups["ignores"]->getControl(name); } } @@ -432,7 +433,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mSoundName("") { if (p.sound.isProvided() - && LLUI::sSettingGroups["config"]->controlExists(p.sound)) + && LLUI::getInstance()->mSettingGroups["config"]->controlExists(p.sound)) { mSoundName = p.sound; } @@ -700,7 +701,7 @@ void LLNotification::respond(const LLSD& response) mForm->setIgnored(mIgnored); if (mIgnored && mForm->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE) { - LLUI::sSettingGroups["ignores"]->setLLSD("Default" + getName(), response); + LLUI::getInstance()->mSettingGroups["ignores"]->setLLSD("Default" + getName(), response); } } |