summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.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/llfloaterpreference.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/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 0a55f9c834..83c784c1f7 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -61,6 +61,7 @@
#include "llmodaldialog.h"
#include "llnavigationbar.h"
#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llpanellogin.h"
#include "llradiogroup.h"
#include "llsearchcombobox.h"
@@ -204,7 +205,7 @@ viewer_media_t get_web_media()
bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( option == 0 ) // YES
{
// clean web
@@ -217,7 +218,7 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
// flag client texture cache for clearing next time the client runs
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
- LLNotifications::instance().add("CacheWillClear");
+ LLNotificationsUtil::add("CacheWillClear");
LLSearchHistory::getInstance()->clearHistory();
LLSearchHistory::getInstance()->save();
@@ -242,7 +243,7 @@ void handleNameTagOptionChanged(const LLSD& newvalue)
bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option && floater )
{
if ( floater )
@@ -257,7 +258,7 @@ bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFlo
bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
{
- S32 option = LLNotification::getSelectedOption(notification, response);
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( 0 == option && floater )
{
if ( floater )
@@ -413,7 +414,7 @@ void LLFloaterPreference::apply()
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (sSkin != gSavedSettings.getString("SkinCurrent"))
{
- LLNotifications::instance().add("ChangeSkin");
+ LLNotificationsUtil::add("ChangeSkin");
refreshSkin(this);
}
// Call apply() on all panels that derive from LLPanelPreference
@@ -714,13 +715,13 @@ void LLFloaterPreference::onClickClearCache()
{
// flag client cache for clearing next time the client runs
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
- LLNotifications::instance().add("CacheWillClear");
+ LLNotificationsUtil::add("CacheWillClear");
}
*/
void LLFloaterPreference::onClickBrowserClearCache()
{
- LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache);
+ LLNotificationsUtil::add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache);
}
void LLFloaterPreference::onClickSetCache()
@@ -740,7 +741,7 @@ void LLFloaterPreference::onClickSetCache()
if (!dir_name.empty() && dir_name != cur_name)
{
std::string new_top_folder(gDirUtilp->getBaseFileName(dir_name));
- LLNotifications::instance().add("CacheWillBeMoved");
+ LLNotificationsUtil::add("CacheWillBeMoved");
gSavedSettings.setString("NewCacheLocation", dir_name);
gSavedSettings.setString("NewCacheLocationTopFolder", new_top_folder);
}
@@ -759,7 +760,7 @@ void LLFloaterPreference::onClickResetCache()
{
gSavedSettings.setString("NewCacheLocation", "");
gSavedSettings.setString("NewCacheLocationTopFolder", "");
- LLNotifications::instance().add("CacheWillBeMoved");
+ LLNotificationsUtil::add("CacheWillBeMoved");
}
std::string cache_location = gDirUtilp->getCacheDir(true);
gSavedSettings.setString("CacheLocation", cache_location);
@@ -1081,12 +1082,12 @@ void LLFloaterPreference::onClickSetMiddleMouse()
void LLFloaterPreference::onClickSkipDialogs()
{
- LLNotifications::instance().add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, this));
+ LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, this));
}
void LLFloaterPreference::onClickResetDialogs()
{
- LLNotifications::instance().add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, this));
+ LLNotificationsUtil::add("ResetShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_reset_dialogs, _1, _2, this));
}
void LLFloaterPreference::onClickEnablePopup()