diff options
author | Kent Quirk <q@lindenlab.com> | 2009-01-05 18:59:12 +0000 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2009-01-05 18:59:12 +0000 |
commit | 667ca55bad0108c4bdf8f007b89e1a52fc766aad (patch) | |
tree | 7bd62ac8d9af079c3994565f3f200ccc250bbc28 /indra/newview/llfloaterpostprocess.cpp | |
parent | 95f365789f4cebc7bd97ccefd538f14d481a8373 (diff) |
svn merge -r106715:HEAD svn+ssh://svn.lindenlab.com/svn/linden/branches/q/notifications-merge-r106715 . QAR-1149 -- Final merge of notifications to trunk.
Diffstat (limited to 'indra/newview/llfloaterpostprocess.cpp')
-rw-r--r-- | indra/newview/llfloaterpostprocess.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index 692b7e036f..ce5f9c124f 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -169,11 +169,13 @@ void LLFloaterPostProcess::onSaveEffect(void* userData) { LLLineEditor* editBox = static_cast<LLLineEditor*>(userData); - LLSD::String effectName(editBox->getValue().asString()); + std::string effectName(editBox->getValue().asString()); if (gPostProcess->mAllEffects.has(effectName)) { - gViewerWindow->alertXml("PPSaveEffectAlert", &LLFloaterPostProcess::saveAlertCallback, userData); + LLSD payload; + payload["effect_name"] = effectName; + LLNotifications::instance().add("PPSaveEffectAlert", LLSD(), payload, &LLFloaterPostProcess::saveAlertCallback); } else { @@ -192,20 +194,18 @@ void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) editBox->setValue(comboBox->getSelectedValue()); } -void LLFloaterPostProcess::saveAlertCallback(S32 option, void* userData) +bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) { - LLLineEditor* editBox = static_cast<LLLineEditor*>(userData); + S32 option = LLNotification::getSelectedOption(notification, response); // if they choose save, do it. Otherwise, don't do anything if (option == 0) { - LLSD::String effectName(editBox->getValue().asString()); - - gPostProcess->saveEffect(effectName); + gPostProcess->saveEffect(notification["payload"]["effect_name"].asString()); sPostProcess->syncMenu(); } - + return false; } void LLFloaterPostProcess::show() |