summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-25 01:15:50 -0800
committerJames Cook <james@lindenlab.com>2009-11-25 01:15:50 -0800
commitcbc0783cd19f096b454cabe47174c97d3d42842b (patch)
tree96a4596d101c1d205fc4f56b0b54951dd408df80 /indra/newview/llappviewer.cpp
parent0e351bedb6ec15ecb4da6073c8db4edc34ccc0ba (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/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fa0ea557ba..799a09540e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -90,6 +90,8 @@
#include "llvolumemgr.h"
#include "llnotificationmanager.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
// Third party library includes
#include <boost/bind.hpp>
@@ -873,7 +875,7 @@ bool LLAppViewer::init()
if (LLFeatureManager::getInstance()->getGPUClass() == GPU_CLASS_UNKNOWN)
{
- LLNotifications::instance().add("UnknownGPU");
+ LLNotificationsUtil::add("UnknownGPU");
}
if(unsupported)
@@ -882,7 +884,7 @@ bool LLAppViewer::init()
|| gSavedSettings.getBOOL("WarnUnsupportedHardware"))
{
args["MINSPECS"] = minSpecs;
- LLNotifications::instance().add("UnsupportedHardware", args );
+ LLNotificationsUtil::add("UnsupportedHardware", args );
}
}
@@ -2864,7 +2866,7 @@ void LLAppViewer::requestQuit()
static bool finish_quit(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
@@ -2876,7 +2878,7 @@ static LLNotificationFunctorRegistration finish_quit_reg("ConfirmQuit", finish_q
void LLAppViewer::userQuit()
{
- LLNotifications::instance().add("ConfirmQuit");
+ LLNotificationsUtil::add("ConfirmQuit");
}
static bool finish_early_exit(const LLSD& notification, const LLSD& response)
@@ -2889,7 +2891,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
{
llwarns << "app_early_exit: " << name << llendl;
gDoDisconnect = TRUE;
- LLNotifications::instance().add(name, substitutions, LLSD(), finish_early_exit);
+ LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
}
void LLAppViewer::forceExit(S32 arg)
@@ -3207,7 +3209,7 @@ std::string LLAppViewer::getWindowTitle() const
// Callback from a dialog indicating user was logged out.
bool finish_disconnect(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (1 == option)
{
@@ -3247,12 +3249,12 @@ void LLAppViewer::forceDisconnect(const std::string& mesg)
{
// Tell users what happened
args["ERROR_MESSAGE"] = big_reason;
- LLNotifications::instance().add("ErrorMessage", args, LLSD(), &finish_forced_disconnect);
+ LLNotificationsUtil::add("ErrorMessage", args, LLSD(), &finish_forced_disconnect);
}
else
{
args["MESSAGE"] = big_reason;
- LLNotifications::instance().add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect );
+ LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect );
}
}