diff options
author | James Cook <james@lindenlab.com> | 2009-11-25 01:15:50 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-25 01:15:50 -0800 |
commit | cbc0783cd19f096b454cabe47174c97d3d42842b (patch) | |
tree | 96a4596d101c1d205fc4f56b0b54951dd408df80 /indra/newview/llfloaterwater.cpp | |
parent | 0e351bedb6ec15ecb4da6073c8db4edc34ccc0ba (diff) |
Created lightweight LLNotificationsUtil::add(), switched most alerts to use it
Cuts number of includes of llnotifications.h from 300+ to 40.
Diffstat (limited to 'indra/newview/llfloaterwater.cpp')
-rw-r--r-- | indra/newview/llfloaterwater.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 3a60f6d4d9..66a1f6701f 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -47,7 +47,7 @@ #include "llviewercamera.h" #include "llcombobox.h" #include "lllineeditor.h" -#include "llnotifications.h" +#include "llnotificationsutil.h" #include "llfloaterdaycycle.h" #include "llboost.h" #include "llmultisliderctrl.h" @@ -160,7 +160,7 @@ void LLFloaterWater::initCallbacks(void) { bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& response) { std::string text = response["message"].asString(); - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(text == "") { @@ -192,7 +192,7 @@ bool LLFloaterWater::newPromptCallback(const LLSD& notification, const LLSD& res } else { - LLNotifications::instance().add("ExistsWaterPresetAlert"); + LLNotificationsUtil::add("ExistsWaterPresetAlert"); } } return false; @@ -504,7 +504,7 @@ void LLFloaterWater::onNormalMapPicked(LLUICtrl* ctrl) void LLFloaterWater::onNewPreset() { - LLNotifications::instance().add("NewWaterPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWater::newPromptCallback, this, _1, _2)); + LLNotificationsUtil::add("NewWaterPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWater::newPromptCallback, this, _1, _2)); } void LLFloaterWater::onSavePreset() @@ -526,16 +526,16 @@ void LLFloaterWater::onSavePreset() comboBox->getSelectedItemLabel()); if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("WaterEditPresets")) { - LLNotifications::instance().add("WLNoEditDefault"); + LLNotificationsUtil::add("WLNoEditDefault"); return; } - LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWater::saveAlertCallback, this, _1, _2)); + LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWater::saveAlertCallback, this, _1, _2)); } bool LLFloaterWater::saveAlertCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); // if they choose save, do it. Otherwise, don't do anything if(option == 0) { @@ -562,12 +562,12 @@ void LLFloaterWater::onDeletePreset() LLSD args; args["SKY"] = combo_box->getSelectedValue().asString(); - LLNotifications::instance().add("WLDeletePresetAlert", args, LLSD(), boost::bind(&LLFloaterWater::deleteAlertCallback, this, _1, _2)); + LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(), boost::bind(&LLFloaterWater::deleteAlertCallback, this, _1, _2)); } bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); // if they choose delete, do it. Otherwise, don't do anything if(option == 0) { @@ -588,7 +588,7 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r std::set<std::string>::iterator sIt = sDefaultPresets.find(name); if(sIt != sDefaultPresets.end()) { - LLNotifications::instance().add("WaterNoEditDefault"); + LLNotificationsUtil::add("WaterNoEditDefault"); return false; } |