diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloaterpostprocess.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llfloaterpostprocess.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterpostprocess.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/linden/indra/newview/llfloaterpostprocess.cpp b/linden/indra/newview/llfloaterpostprocess.cpp index 569a74c..de9b598 100644 --- a/linden/indra/newview/llfloaterpostprocess.cpp +++ b/linden/indra/newview/llfloaterpostprocess.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -169,11 +170,13 @@ void LLFloaterPostProcess::onSaveEffect(void* userData) | |||
169 | { | 170 | { |
170 | LLLineEditor* editBox = static_cast<LLLineEditor*>(userData); | 171 | LLLineEditor* editBox = static_cast<LLLineEditor*>(userData); |
171 | 172 | ||
172 | LLSD::String effectName(editBox->getValue().asString()); | 173 | std::string effectName(editBox->getValue().asString()); |
173 | 174 | ||
174 | if (gPostProcess->mAllEffects.has(effectName)) | 175 | if (gPostProcess->mAllEffects.has(effectName)) |
175 | { | 176 | { |
176 | gViewerWindow->alertXml("PPSaveEffectAlert", &LLFloaterPostProcess::saveAlertCallback, userData); | 177 | LLSD payload; |
178 | payload["effect_name"] = effectName; | ||
179 | LLNotifications::instance().add("PPSaveEffectAlert", LLSD(), payload, &LLFloaterPostProcess::saveAlertCallback); | ||
177 | } | 180 | } |
178 | else | 181 | else |
179 | { | 182 | { |
@@ -192,20 +195,18 @@ void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) | |||
192 | editBox->setValue(comboBox->getSelectedValue()); | 195 | editBox->setValue(comboBox->getSelectedValue()); |
193 | } | 196 | } |
194 | 197 | ||
195 | void LLFloaterPostProcess::saveAlertCallback(S32 option, void* userData) | 198 | bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) |
196 | { | 199 | { |
197 | LLLineEditor* editBox = static_cast<LLLineEditor*>(userData); | 200 | S32 option = LLNotification::getSelectedOption(notification, response); |
198 | 201 | ||
199 | // if they choose save, do it. Otherwise, don't do anything | 202 | // if they choose save, do it. Otherwise, don't do anything |
200 | if (option == 0) | 203 | if (option == 0) |
201 | { | 204 | { |
202 | LLSD::String effectName(editBox->getValue().asString()); | 205 | gPostProcess->saveEffect(notification["payload"]["effect_name"].asString()); |
203 | |||
204 | gPostProcess->saveEffect(effectName); | ||
205 | 206 | ||
206 | sPostProcess->syncMenu(); | 207 | sPostProcess->syncMenu(); |
207 | } | 208 | } |
208 | 209 | return false; | |
209 | } | 210 | } |
210 | 211 | ||
211 | void LLFloaterPostProcess::show() | 212 | void LLFloaterPostProcess::show() |