Created lightweight LLNotificationsUtil::add(), switched most alerts to use it

Cuts number of includes of llnotifications.h from 300+ to 40.
master
James Cook 2009-11-25 01:15:50 -08:00
parent 0e351bedb6
commit cbc0783cd1
112 changed files with 856 additions and 672 deletions

View File

@ -60,6 +60,7 @@ set(llui_SOURCE_FILES
llmultisliderctrl.cpp
llnotifications.cpp
llnotificationslistener.cpp
llnotificationsutil.cpp
llpanel.cpp
llprogressbar.cpp
llradiogroup.cpp
@ -150,6 +151,7 @@ set(llui_HEADER_FILES
llnotificationptr.h
llnotifications.h
llnotificationslistener.h
llnotificationsutil.h
llpanel.h
llprogressbar.h
llradiogroup.h

View File

@ -48,7 +48,7 @@
#include "llfloaterreg.h"
#include "llfocusmgr.h"
#include "llwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llrender.h"
#include "lluictrlfactory.h"
#include "llhelp.h"
@ -1106,7 +1106,7 @@ void LLButton::showHelp(LLUICtrl* ctrl, const LLSD& sdname)
// display an error if we can't find a help_topic string.
// fix this by adding a help_topic attribute to the xui file
LLNotifications::instance().add("UnableToFindHelpTopic");
LLNotificationsUtil::add("UnableToFindHelpTopic");
}
void LLButton::resetMouseDownTimer()

View File

@ -39,7 +39,7 @@
#include "llpanel.h"
#include "lluuid.h"
//#include "llnotifications.h"
//#include "llnotificationsutil.h"
#include <set>
class LLDragHandle;

View File

@ -1395,10 +1395,9 @@ void LLNotifications::addFromCallback(const LLSD& name)
add(LLNotification::Params().name(name.asString()));
}
// we provide a couple of simple add notification functions so that it's reasonable to create notifications in one line
LLNotificationPtr LLNotifications::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload)
const LLSD& substitutions,
const LLSD& payload)
{
LLNotification::Params::Functor functor_p;
functor_p.name = name;
@ -1406,15 +1405,16 @@ LLNotificationPtr LLNotifications::add(const std::string& name,
}
LLNotificationPtr LLNotifications::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
const std::string& functor_name)
const LLSD& substitutions,
const LLSD& payload,
const std::string& functor_name)
{
LLNotification::Params::Functor functor_p;
functor_p.name = functor_name;
return add(LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));
}
//virtual
LLNotificationPtr LLNotifications::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,

View File

@ -839,10 +839,11 @@ public:
// Add a simple notification (from XUI)
void addFromCallback(const LLSD& name);
// we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line
// *NOTE: To add simple notifications, #include "llnotificationsutil.h"
// and use LLNotificationsUtil::add("MyNote") or add("MyNote", args)
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions = LLSD(),
const LLSD& payload = LLSD());
const LLSD& substitutions,
const LLSD& payload);
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,

View File

@ -0,0 +1,91 @@
/**
* @file llnotificationsutil.cpp
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
* Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#include "linden_common.h"
#include "llnotificationsutil.h"
#include "llnotifications.h"
#include "llsd.h"
#include "llxmlnode.h" // apparently needed to call LLNotifications::instance()
LLNotificationPtr LLNotificationsUtil::add(const std::string& name)
{
LLNotification::Params::Functor functor_p;
functor_p.name = name;
return LLNotifications::instance().add(
LLNotification::Params().name(name).substitutions(LLSD()).payload(LLSD()).functor(functor_p));
}
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions)
{
LLNotification::Params::Functor functor_p;
functor_p.name = name;
return LLNotifications::instance().add(
LLNotification::Params().name(name).substitutions(substitutions).payload(LLSD()).functor(functor_p));
}
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload)
{
LLNotification::Params::Functor functor_p;
functor_p.name = name;
return LLNotifications::instance().add(
LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));
}
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
const std::string& functor_name)
{
LLNotification::Params::Functor functor_p;
functor_p.name = functor_name;
return LLNotifications::instance().add(
LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));
}
LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
boost::function<void (const LLSD&, const LLSD&)> functor)
{
LLNotification::Params::Functor functor_p;
functor_p.function = functor;
return LLNotifications::instance().add(
LLNotification::Params().name(name).substitutions(substitutions).payload(payload).functor(functor_p));
}
S32 LLNotificationsUtil::getSelectedOption(const LLSD& notification, const LLSD& response)
{
return LLNotification::getSelectedOption(notification, response);
}

View File

@ -0,0 +1,68 @@
/**
* @file llnotificationsutil.h
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
* Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#ifndef LLNOTIFICATIONSUTIL_H
#define LLNOTIFICATIONSUTIL_H
// The vast majority of clients of the notifications system just want to add
// a notification to the screen, so define this lightweight public interface
// to avoid including the heavyweight llnotifications.h
#include "llnotificationptr.h"
#include <boost/function.hpp>
class LLSD;
namespace LLNotificationsUtil
{
LLNotificationPtr add(const std::string& name);
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions);
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload);
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
const std::string& functor_name);
LLNotificationPtr add(const std::string& name,
const LLSD& substitutions,
const LLSD& payload,
boost::function<void (const LLSD&, const LLSD&)> functor);
S32 getSelectedOption(const LLSD& notification, const LLSD& response);
}
#endif

View File

@ -162,7 +162,7 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::
args["STRING_NAME"] = xml_desc;
LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
//LLNotifications::instance().add("MissingString", args); // *TODO: resurrect
//LLNotificationsUtil::add("MissingString", args); // *TODO: resurrect
//return xml_desc;
return "MissingString("+xml_desc+")";
@ -189,7 +189,7 @@ bool LLTrans::findString(std::string &result, const std::string &xml_desc, const
LLSD args;
args["STRING_NAME"] = xml_desc;
LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
//LLNotifications::instance().add("MissingString", args);
//LLNotificationsUtil::add("MissingString", args);
return false;
}

View File

@ -58,7 +58,7 @@
#include "llmoveview.h"
#include "llnavigationbar.h" // to show/hide navigation bar when changing mouse look state
#include "llnearbychatbar.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "llsdutil.h"
#include "llsidetray.h"
@ -2301,11 +2301,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
if (user_cancel && !mAutoPilotBehaviorName.empty())
{
if (mAutoPilotBehaviorName == "Sit")
LLNotifications::instance().add("CancelledSit");
LLNotificationsUtil::add("CancelledSit");
else if (mAutoPilotBehaviorName == "Attach")
LLNotifications::instance().add("CancelledAttach");
LLNotificationsUtil::add("CancelledAttach");
else
LLNotifications::instance().add("Cancelled");
LLNotificationsUtil::add("Cancelled");
}
}
}

View File

@ -41,7 +41,7 @@
#include "llinventorybridge.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
@ -999,7 +999,7 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 index)
{
// Try to recover by replacing missing wearable with a new one.
LLNotifications::instance().add("ReplacedMissingWearable");
LLNotificationsUtil::add("ReplacedMissingWearable");
lldebugs << "Wearable " << LLWearableDictionary::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl;
LLWearable* new_wearable = LLWearableList::instance().createNewWearable(type);
@ -1368,7 +1368,7 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a
LLSD payload;
payload["wearable_type"] = (S32)type;
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotifications::instance().add("WearableSave", LLSD(), payload, &LLAgentWearables::onRemoveWearableDialog);
LLNotificationsUtil::add("WearableSave", LLSD(), payload, &LLAgentWearables::onRemoveWearableDialog);
return;
}
else
@ -1385,7 +1385,7 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a
// static
bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
EWearableType type = (EWearableType)notification["payload"]["wearable_type"].asInteger();
switch(option)
{
@ -1590,7 +1590,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne
// Bring up modal dialog: Save changes? Yes, No, Cancel
LLSD payload;
payload["item_id"] = new_item->getUUID();
LLNotifications::instance().add("WearableSave", LLSD(), payload, boost::bind(onSetWearableDialog, _1, _2, new_wearable));
LLNotificationsUtil::add("WearableSave", LLSD(), payload, boost::bind(onSetWearableDialog, _1, _2, new_wearable));
return;
}
}
@ -1602,7 +1602,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* ne
// static
bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
if (!new_item)
{

View File

@ -39,7 +39,7 @@
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryobserver.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llsidepanelappearance.h"
#include "llsidetray.h"
#include "llvoavatar.h"
@ -639,7 +639,7 @@ void LLAppearanceManager::updateAppearanceFromCOF()
if( !wear_items.count() && !obj_items.count() && !gest_items.count())
{
LLNotifications::instance().add("CouldNotPutOnOutfit");
LLNotificationsUtil::add("CouldNotPutOnOutfit");
return;
}

View File

@ -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 );
}
}

View File

@ -63,7 +63,7 @@
#include "lleconomy.h"
#include "llfloaterreg.h"
#include "llfocusmgr.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistctrl.h"
#include "llsdserialize.h"
#include "llvfs.h"
@ -121,14 +121,14 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
args["REASON"] = "Error in upload request. Please visit "
"http://secondlife.com/support for help fixing this problem.";
LLNotifications::instance().add("CannotUploadReason", args);
LLNotificationsUtil::add("CannotUploadReason", args);
break;
case 500:
default:
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
args["REASON"] = "The server is experiencing unexpected "
"difficulties.";
LLNotifications::instance().add("CannotUploadReason", args);
LLNotificationsUtil::add("CannotUploadReason", args);
break;
}
LLUploadDialog::modalUploadFinished();
@ -190,7 +190,7 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content)
LLSD args;
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
args["REASON"] = content["message"].asString();
LLNotifications::instance().add("CannotUploadReason", args);
LLNotificationsUtil::add("CannotUploadReason", args);
}
}
@ -233,7 +233,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
LLSD args;
args["AMOUNT"] = llformat("%d", expected_upload_cost);
LLNotifications::instance().add("UploadPayment", args);
LLNotificationsUtil::add("UploadPayment", args);
}
// Actually add the upload to viewer inventory

View File

@ -38,6 +38,7 @@
#include "llsd.h"
#include "lldarray.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "roles_constants.h" // for GP_MEMBER_INVITE
@ -69,7 +70,7 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
{
if(id == gAgentID)
{
LLNotifications::instance().add("AddSelfFriend");
LLNotificationsUtil::add("AddSelfFriend");
return;
}
@ -83,11 +84,11 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin
{
// Old and busted server version, doesn't support friend
// requests with messages.
LLNotifications::instance().add("AddFriend", args, payload, &callbackAddFriend);
LLNotificationsUtil::add("AddFriend", args, payload, &callbackAddFriend);
}
else
{
LLNotifications::instance().add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
}
// add friend to recent people list
@ -149,7 +150,7 @@ void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids)
payload["ids"].append(*it);
}
LLNotifications::instance().add(msgType,
LLNotificationsUtil::add(msgType,
args,
payload,
&handleRemove);
@ -359,7 +360,7 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id)
// static
bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
const LLSD& ids = notification["payload"]["ids"];
for (LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr)
@ -393,7 +394,7 @@ bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& respons
// static
bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
gAgent.clearBusy();
@ -416,7 +417,7 @@ void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
// static
bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
requestFriendship(notification["payload"]["id"].asUUID(),
@ -429,7 +430,7 @@ bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, con
// static
bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
// Servers older than 1.25 require the text of the message to be the

View File

@ -40,7 +40,7 @@
#include "llimfloater.h" // for LLIMFloater
#include "lllayoutstack.h"
#include "llnearbychatbar.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llspeakbutton.h"
#include "llsplitbutton.h"
#include "llsyswellwindow.h"
@ -942,7 +942,7 @@ void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type
{
// mark this button to show it while future bottom tray extending
mResizeState |= shown_object_type;
LLNotifications::instance().add("BottomTrayButtonCanNotBeShown");
LLNotificationsUtil::add("BottomTrayButtonCanNotBeShown");
}
}

View File

@ -54,6 +54,7 @@
#include "llinventoryobserver.h"
#include "llinventorymodel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "llimview.h"
@ -641,11 +642,11 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg)
}
if(LLRelationship::GRANT_MODIFY_OBJECTS & new_rights)
{
LLNotifications::instance().add("GrantedModifyRights",args);
LLNotificationsUtil::add("GrantedModifyRights",args);
}
else
{
LLNotifications::instance().add("RevokedModifyRights",args);
LLNotificationsUtil::add("RevokedModifyRights",args);
}
}
(mBuddyInfo[agent_id])->setRightsFrom(new_rights);
@ -715,7 +716,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
if(notify)
{
// Popup a notify box with online status of this agent
LLNotificationPtr notification = LLNotifications::instance().add(online ? "FriendOnline" : "FriendOffline", args);
LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args);
// If there's an open IM session with this agent, send a notification there too.
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id);

View File

@ -44,6 +44,7 @@
#include "lllocalcliprect.h"
#include "llmenugl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lloutputmonitorctrl.h"
#include "llscriptfloater.h"
#include "lltextbox.h"

View File

@ -60,7 +60,7 @@
#include "llbutton.h"
#include "lldir.h"
#include "llfloaterchat.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llviewerstats.h"
#include "llvfile.h"
#include "lluictrlfactory.h"
@ -481,7 +481,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use
llwarns << "Unable to save text for script." << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("CompileQueueSaveText", args);
LLNotificationsUtil::add("CompileQueueSaveText", args);
}
}
@ -501,7 +501,7 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void*
llwarns << "Unable to save bytecode for script." << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("CompileQueueSaveBytecode", args);
LLNotificationsUtil::add("CompileQueueSaveBytecode", args);
}
delete data;
data = NULL;

View File

@ -37,7 +37,7 @@
#include "lluictrlfactory.h"
// viewer includes
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstring.h"
#include "llxmlnode.h"
@ -48,7 +48,7 @@ LLConfirmationManager::ListenerBase::~ListenerBase()
static bool onConfirmAlert(const LLSD& notification, const LLSD& response, LLConfirmationManager::ListenerBase* listener)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
listener->confirmed("");
@ -61,7 +61,7 @@ static bool onConfirmAlert(const LLSD& notification, const LLSD& response, LLCon
static bool onConfirmAlertPassword(const LLSD& notification, const LLSD& response, LLConfirmationManager::ListenerBase* listener)
{
std::string text = response["message"].asString();
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
@ -83,11 +83,11 @@ void LLConfirmationManager::confirm(Type type,
switch (type)
{
case TYPE_CLICK:
LLNotifications::instance().add("ConfirmPurchase", args, LLSD(), boost::bind(onConfirmAlert, _1, _2, listener));
LLNotificationsUtil::add("ConfirmPurchase", args, LLSD(), boost::bind(onConfirmAlert, _1, _2, listener));
break;
case TYPE_PASSWORD:
LLNotifications::instance().add("ConfirmPurchasePassword", args, LLSD(), boost::bind(onConfirmAlertPassword, _1, _2, listener));
LLNotificationsUtil::add("ConfirmPurchasePassword", args, LLSD(), boost::bind(onConfirmAlertPassword, _1, _2, listener));
break;
case TYPE_NONE:
default:

View File

@ -35,7 +35,7 @@
#include "lldelayedgestureerror.h"
#include <list>
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llcallbacklist.h"
#include "llinventory.h"
@ -121,7 +121,7 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok)
}
LLNotifications::instance().add(ent.mNotifyName, args);
LLNotificationsUtil::add(ent.mNotifyName, args);
return true;
}

View File

@ -34,7 +34,7 @@
#include "lleventnotifier.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "message.h"
#include "llnotify.h"
@ -82,7 +82,7 @@ void LLEventNotifier::update()
LLSD args;
args["NAME"] = np->getEventName();
args["DATE"] = np->getEventDateStr();
LLNotifications::instance().add("EventNotification", args, LLSD(),
LLNotificationsUtil::add("EventNotification", args, LLSD(),
boost::bind(&LLEventNotification::handleResponse, np, _1, _2));
mEventNotifications.erase(iter++);
}
@ -186,7 +186,7 @@ LLEventNotification::~LLEventNotification()
bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch (option)
{
case 0:

View File

@ -36,7 +36,7 @@
// library includes
#include "indra_constants.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
// viewer includes
#include "llagent.h" // for gAgent.inPrelude()
@ -87,7 +87,7 @@ void LLFirstUse::useBalanceIncrease(S32 delta)
LLSD args;
args["AMOUNT"] = llformat("%d",delta);
LLNotifications::instance().add("FirstBalanceIncrease", args);
LLNotificationsUtil::add("FirstBalanceIncrease", args);
}
}
@ -101,7 +101,7 @@ void LLFirstUse::useBalanceDecrease(S32 delta)
LLSD args;
args["AMOUNT"] = llformat("%d",-delta);
LLNotifications::instance().add("FirstBalanceDecrease", args);
LLNotificationsUtil::add("FirstBalanceDecrease", args);
}
}
@ -115,7 +115,7 @@ void LLFirstUse::useSit()
//{
// gWarningSettings.setBOOL("FirstSit", FALSE);
//
// LLNotifications::instance().add("FirstSit");
// LLNotificationsUtil::add("FirstSit");
//}
}
@ -126,7 +126,7 @@ void LLFirstUse::useMap()
{
gWarningSettings.setBOOL("FirstMap", FALSE);
LLNotifications::instance().add("FirstMap");
LLNotificationsUtil::add("FirstMap");
}
}
@ -143,7 +143,7 @@ void LLFirstUse::useBuild()
{
gWarningSettings.setBOOL("FirstBuild", FALSE);
LLNotifications::instance().add("FirstBuild");
LLNotificationsUtil::add("FirstBuild");
}
}
/*
@ -154,7 +154,7 @@ void LLFirstUse::useLeftClickNoHit()
{
gWarningSettings.setBOOL("FirstLeftClickNoHit", FALSE);
LLNotifications::instance().add("FirstLeftClickNoHit");
LLNotificationsUtil::add("FirstLeftClickNoHit");
}
}
*/
@ -168,7 +168,7 @@ void LLFirstUse::useTeleport()
{
gWarningSettings.setBOOL("FirstTeleport", FALSE);
LLNotifications::instance().add("FirstTeleport");
LLNotificationsUtil::add("FirstTeleport");
}
}
}
@ -184,7 +184,7 @@ void LLFirstUse::useOverrideKeys()
{
gWarningSettings.setBOOL("FirstOverrideKeys", FALSE);
LLNotifications::instance().add("FirstOverrideKeys");
LLNotificationsUtil::add("FirstOverrideKeys");
}
}
}
@ -202,7 +202,7 @@ void LLFirstUse::useAppearance()
{
gWarningSettings.setBOOL("FirstAppearance", FALSE);
LLNotifications::instance().add("FirstAppearance");
LLNotificationsUtil::add("FirstAppearance");
}
}
@ -213,7 +213,7 @@ void LLFirstUse::useInventory()
{
gWarningSettings.setBOOL("FirstInventory", FALSE);
LLNotifications::instance().add("FirstInventory");
LLNotificationsUtil::add("FirstInventory");
}
}
@ -228,7 +228,7 @@ void LLFirstUse::useSandbox()
LLSD args;
args["HOURS"] = llformat("%d",SANDBOX_CLEAN_FREQ);
args["TIME"] = llformat("%d",SANDBOX_FIRST_CLEAN_HOUR);
LLNotifications::instance().add("FirstSandbox", args);
LLNotificationsUtil::add("FirstSandbox", args);
}
}
@ -239,7 +239,7 @@ void LLFirstUse::useFlexible()
{
gWarningSettings.setBOOL("FirstFlexible", FALSE);
LLNotifications::instance().add("FirstFlexible");
LLNotificationsUtil::add("FirstFlexible");
}
}
@ -250,7 +250,7 @@ void LLFirstUse::useDebugMenus()
{
gWarningSettings.setBOOL("FirstDebugMenus", FALSE);
LLNotifications::instance().add("FirstDebugMenus");
LLNotificationsUtil::add("FirstDebugMenus");
}
}
@ -261,7 +261,7 @@ void LLFirstUse::useSculptedPrim()
{
gWarningSettings.setBOOL("FirstSculptedPrim", FALSE);
LLNotifications::instance().add("FirstSculptedPrim");
LLNotificationsUtil::add("FirstSculptedPrim");
}
}
@ -275,6 +275,6 @@ void LLFirstUse::useMedia()
// Popup removed as a short-term fix for EXT-1643.
// Ultimately, the plan is to kill all First Use dialogs
//LLNotifications::instance().add("FirstMedia");
//LLNotificationsUtil::add("FirstMedia");
}
}

View File

@ -38,7 +38,7 @@
#include "lldatapacker.h"
#include "lldir.h"
#include "lleconomy.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llvfile.h"
#include "llapr.h"
#include "llstring.h"
@ -999,7 +999,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
else
{
llwarns << "Failure writing animation data." << llendl;
LLNotifications::instance().add("WriteAnimationFail");
LLNotificationsUtil::add("WriteAnimationFail");
}
}

View File

@ -47,6 +47,7 @@
#include "llagent.h"
#include "llcombobox.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llsavedsettingsglue.h"
#include "llviewertexturelist.h"
@ -252,7 +253,7 @@ void LLFloaterAuction::onClickStartAuction(void* data)
FALSE);
self->getWindow()->incBusyCount();
LLNotifications::instance().add("UploadingAuctionSnapshot");
LLNotificationsUtil::add("UploadingAuctionSnapshot");
}
LLMessageSystem* msg = gMessageSystem;
@ -479,7 +480,7 @@ void LLFloaterAuction::onClickSellToAnyone(void* data)
// Sell confirmation clicked
bool LLFloaterAuction::onSellToAnyoneConfirmed(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
doSellToAnyone();
@ -544,13 +545,13 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status
if (0 == status)
{
LLNotifications::instance().add("UploadWebSnapshotDone");
LLNotificationsUtil::add("UploadWebSnapshotDone");
}
else
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("UploadAuctionSnapshotFail", args);
LLNotificationsUtil::add("UploadAuctionSnapshotFail", args);
}
}
@ -565,12 +566,12 @@ void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status
if (0 == status)
{
LLNotifications::instance().add("UploadSnapshotDone");
LLNotificationsUtil::add("UploadSnapshotDone");
}
else
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("UploadAuctionSnapshotFail", args);
LLNotificationsUtil::add("UploadAuctionSnapshotFail", args);
}
}

View File

@ -46,6 +46,7 @@
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for get_item_icon
#include "llinventoryfunctions.h"
#include "llnotificationsutil.h"
#include "llselectmgr.h"
#include "llscrolllistctrl.h"
#include "llviewerobject.h"
@ -99,7 +100,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
if (selection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("BuyOneObjectOnly");
LLNotificationsUtil::add("BuyOneObjectOnly");
return;
}
@ -136,7 +137,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotifications::instance().add("BuyObjectOneOwner");
LLNotificationsUtil::add("BuyObjectOneOwner");
return;
}

View File

@ -49,6 +49,7 @@
#include "llinventorymodel.h" // for gInventory
#include "llfloaterreg.h"
#include "llfloaterinventory.h" // for get_item_icon
#include "llnotificationsutil.h"
#include "llselectmgr.h"
#include "llscrolllistctrl.h"
#include "llviewerobject.h"
@ -95,7 +96,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
if (selection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("BuyContentsOneOnly");
LLNotificationsUtil::add("BuyContentsOneOnly");
return;
}
@ -114,7 +115,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotifications::instance().add("BuyContentsOneOwner");
LLNotificationsUtil::add("BuyContentsOneOwner");
return;
}

View File

@ -38,7 +38,7 @@
#include "llcurrencyuimanager.h"
#include "llfloater.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstatusbar.h"
#include "lltextbox.h"
#include "llviewchildren.h"
@ -153,7 +153,7 @@ void LLFloaterBuyCurrencyUI::draw()
{
if (mManager.bought())
{
LLNotifications::instance().add("BuyLindenDollarSuccess");
LLNotificationsUtil::add("BuyLindenDollarSuccess");
closeFloater();
return;
}

View File

@ -48,7 +48,7 @@
#include "llframetimer.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llparcel.h"
#include "llslurl.h"
@ -216,7 +216,7 @@ void LLFloaterBuyLand::buyLand(
{
if(is_for_group && !gAgent.hasPowerInActiveGroup(GP_LAND_DEED))
{
LLNotifications::instance().add("OnlyOfficerCanBuyLand");
LLNotificationsUtil::add("OnlyOfficerCanBuyLand");
return;
}
@ -973,7 +973,7 @@ BOOL LLFloaterBuyLandUI::canClose()
if (!can_close)
{
// explain to user why they can't do this, see DEV-9605
LLNotifications::instance().add("CannotCloseFloaterBuyLand");
LLNotificationsUtil::add("CannotCloseFloaterBuyLand");
}
return can_close;
}

View File

@ -49,7 +49,7 @@
#include "llavataractions.h"
#include "llinventorymodel.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "llscrolllistctrl.h"
@ -536,7 +536,7 @@ void LLPanelFriends::onMaximumSelect()
{
LLSD args;
args["MAX_SELECT"] = llformat("%d", MAX_FRIEND_SELECT);
LLNotifications::instance().add("MaxListSelectMessage", args);
LLNotificationsUtil::add("MaxListSelectMessage", args);
};
// static
@ -640,14 +640,14 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
}
if (command == GRANT)
{
LLNotifications::instance().add("GrantModifyRights",
LLNotificationsUtil::add("GrantModifyRights",
args,
LLSD(),
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
}
else
{
LLNotifications::instance().add("RevokeModifyRights",
LLNotificationsUtil::add("RevokeModifyRights",
args,
LLSD(),
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
@ -657,14 +657,14 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
{
if (command == GRANT)
{
LLNotifications::instance().add("GrantModifyRightsMultiple",
LLNotificationsUtil::add("GrantModifyRightsMultiple",
args,
LLSD(),
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
}
else
{
LLNotifications::instance().add("RevokeModifyRightsMultiple",
LLNotificationsUtil::add("RevokeModifyRightsMultiple",
args,
LLSD(),
boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
@ -675,7 +675,7 @@ void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command
bool LLPanelFriends::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(0 == option)
{
sendRightsGrant(*rights);

View File

@ -39,6 +39,7 @@
#include "llframetimer.h"
#include "llgl.h"
#include "llhost.h"
#include "llnotificationsutil.h"
#include "llregionflags.h"
#include "llstring.h"
#include "message.h"
@ -847,17 +848,17 @@ void LLPanelGridTools::refresh()
void LLPanelGridTools::onClickKickAll()
{
LLNotifications::instance().add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
}
bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response)
{
if (LLNotification::getSelectedOption(notification, response) == 0)
if (LLNotificationsUtil::getSelectedOption(notification, response) == 0)
{
LLSD payload;
payload["kick_message"] = response["message"].asString();
LLNotifications::instance().add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick);
LLNotificationsUtil::add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick);
}
return false;
}
@ -866,7 +867,7 @@ bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& respons
// static
bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
@ -887,13 +888,13 @@ bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response
void LLPanelGridTools::onClickFlushMapVisibilityCaches()
{
LLNotifications::instance().add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm);
LLNotificationsUtil::add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm);
}
// static
bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
// HACK: Send this as an EstateOwnerRequest so it gets routed
@ -1101,7 +1102,7 @@ void LLPanelObjectTools::onClickDeletePublicOwnedBy()
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllScriptedPublicObjectsByUser",
LLNotificationsUtil::add( "GodDeleteAllScriptedPublicObjectsByUser",
args,
payload,
callbackSimWideDeletes);
@ -1121,7 +1122,7 @@ void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy()
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllScriptedObjectsByUser",
LLNotificationsUtil::add( "GodDeleteAllScriptedObjectsByUser",
args,
payload,
callbackSimWideDeletes);
@ -1141,7 +1142,7 @@ void LLPanelObjectTools::onClickDeleteAllOwnedBy()
payload["avatar_id"] = mTargetAvatar;
payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllObjectsByUser",
LLNotificationsUtil::add( "GodDeleteAllObjectsByUser",
args,
payload,
callbackSimWideDeletes);
@ -1151,7 +1152,7 @@ void LLPanelObjectTools::onClickDeleteAllOwnedBy()
// static
bool LLPanelObjectTools::callbackSimWideDeletes( const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
if (!notification["payload"]["avatar_id"].asUUID().isNull())
@ -1334,7 +1335,7 @@ void LLPanelRequestTools::onClickRequest()
void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
{
LLNotifications::instance().add("TerrainDownloaded");
LLNotificationsUtil::add("TerrainDownloaded");
}

View File

@ -40,6 +40,7 @@
#include "llalertdialog.h"
// Linden libs
#include "llnotificationsutil.h"
#include "lluictrlfactory.h"
@ -56,7 +57,7 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key)
// do not build the floater if there the url is empty
if (gSavedSettings.getString("TutorialURL") == "")
{
LLNotifications::instance().add("TutorialNotFound");
LLNotificationsUtil::add("TutorialNotFound");
return;
}

View File

@ -39,7 +39,7 @@
#include "llcachename.h"
#include "llfocusmgr.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "message.h"
#include "lluserauth.h"
@ -915,7 +915,7 @@ void LLPanelLandGeneral::onClickBuyPass(void* data)
args["PARCEL_NAME"] = parcel_name;
args["TIME"] = time;
LLNotifications::instance().add("LandBuyPass", args, LLSD(), cbBuyPass);
LLNotificationsUtil::add("LandBuyPass", args, LLSD(), cbBuyPass);
}
// static
@ -927,7 +927,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
{
if(parcelp->getForSale())
{
LLNotifications::instance().add("CannotStartAuctionAlreadyForSale");
LLNotificationsUtil::add("CannotStartAuctionAlreadyForSale");
}
else
{
@ -940,7 +940,7 @@ void LLPanelLandGeneral::onClickStartAuction(void* data)
// static
bool LLPanelLandGeneral::cbBuyPass(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
// User clicked OK
@ -1286,7 +1286,7 @@ void send_return_objects_message(S32 parcel_local_id, S32 return_type,
bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLParcel *parcel = mParcel->getParcel();
if (0 == option)
{
@ -1296,7 +1296,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
LLSD args;
if (owner_id == gAgentID)
{
LLNotifications::instance().add("OwnedObjectsReturned");
LLNotificationsUtil::add("OwnedObjectsReturned");
}
else
{
@ -1304,7 +1304,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
gCacheName->getName(owner_id, first, last);
args["FIRST"] = first;
args["LAST"] = last;
LLNotifications::instance().add("OtherObjectsReturned", args);
LLNotificationsUtil::add("OtherObjectsReturned", args);
}
send_return_objects_message(parcel->getLocalID(), RT_OWNER);
}
@ -1318,7 +1318,7 @@ bool LLPanelLandObjects::callbackReturnOwnerObjects(const LLSD& notification, co
bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLParcel *parcel = mParcel->getParcel();
if (0 == option)
{
@ -1328,7 +1328,7 @@ bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, co
gCacheName->getGroupName(parcel->getGroupID(), group_name);
LLSD args;
args["GROUPNAME"] = group_name;
LLNotifications::instance().add("GroupObjectsReturned", args);
LLNotificationsUtil::add("GroupObjectsReturned", args);
send_return_objects_message(parcel->getLocalID(), RT_GROUP);
}
}
@ -1340,13 +1340,13 @@ bool LLPanelLandObjects::callbackReturnGroupObjects(const LLSD& notification, co
bool LLPanelLandObjects::callbackReturnOtherObjects(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLParcel *parcel = mParcel->getParcel();
if (0 == option)
{
if (parcel)
{
LLNotifications::instance().add("UnOwnedObjectsReturned");
LLNotificationsUtil::add("UnOwnedObjectsReturned");
send_return_objects_message(parcel->getLocalID(), RT_OTHER);
}
}
@ -1358,7 +1358,7 @@ bool LLPanelLandObjects::callbackReturnOtherObjects(const LLSD& notification, co
bool LLPanelLandObjects::callbackReturnOwnerList(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLParcel *parcel = mParcel->getParcel();
if (0 == option)
{
@ -1372,12 +1372,12 @@ bool LLPanelLandObjects::callbackReturnOwnerList(const LLSD& notification, const
if (mSelectedIsGroup)
{
args["GROUPNAME"] = mSelectedName;
LLNotifications::instance().add("GroupObjectsReturned", args);
LLNotificationsUtil::add("GroupObjectsReturned", args);
}
else
{
args["NAME"] = mSelectedName;
LLNotifications::instance().add("OtherObjectsReturned2", args);
LLNotificationsUtil::add("OtherObjectsReturned2", args);
}
send_return_objects_message(parcel->getLocalID(), RT_LIST, &(mSelectedOwners));
@ -1414,11 +1414,11 @@ void LLPanelLandObjects::onClickReturnOwnerList(void* userdata)
args["N"] = llformat("%d",self->mSelectedCount);
if (self->mSelectedIsGroup)
{
LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
LLNotificationsUtil::add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
}
else
{
LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
LLNotificationsUtil::add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerList, self, _1, _2));
}
}
@ -1628,14 +1628,14 @@ void LLPanelLandObjects::onClickReturnOwnerObjects(void* userdata)
if (owner_id == gAgent.getID())
{
LLNotifications::instance().add("ReturnObjectsOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
}
else
{
std::string name;
gCacheName->getFullName(owner_id, name);
args["NAME"] = name;
LLNotifications::instance().add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOwnerObjects, panelp, _1, _2));
}
}
@ -1656,7 +1656,7 @@ void LLPanelLandObjects::onClickReturnGroupObjects(void* userdata)
args["N"] = llformat("%d", parcel->getGroupPrimCount());
// create and show confirmation textbox
LLNotifications::instance().add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnGroupObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsDeededToGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnGroupObjects, panelp, _1, _2));
}
// static
@ -1681,7 +1681,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
gCacheName->getGroupName(parcel->getGroupID(), group_name);
args["NAME"] = group_name;
LLNotifications::instance().add("ReturnObjectsNotOwnedByGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsNotOwnedByGroup", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
}
else
{
@ -1689,7 +1689,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
if (owner_id == gAgent.getID())
{
LLNotifications::instance().add("ReturnObjectsNotOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsNotOwnedBySelf", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
}
else
{
@ -1697,7 +1697,7 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata)
gCacheName->getFullName(owner_id, name);
args["NAME"] = name;
LLNotifications::instance().add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
LLNotificationsUtil::add("ReturnObjectsNotOwnedByUser", args, LLSD(), boost::bind(&LLPanelLandObjects::callbackReturnOtherObjects, panelp, _1, _2));
}
}
}
@ -2166,7 +2166,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
if (!allow_other_scripts && region && region->getAllowDamage())
{
LLNotifications::instance().add("UnableToDisableOutsideScripts");
LLNotificationsUtil::add("UnableToDisableOutsideScripts");
return;
}
@ -2210,7 +2210,7 @@ void LLPanelLandOptions::onClickSet(void* userdata)
if (agent_parcel->getLocalID() != selected_parcel->getLocalID())
{
LLNotifications::instance().add("MustBeInParcel");
LLNotificationsUtil::add("MustBeInParcel");
return;
}

View File

@ -233,7 +233,7 @@ void LLFloaterNotificationConsole::onClickAdd()
std::string message_name = getChild<LLComboBox>("notification_types")->getValue().asString();
if (!message_name.empty())
{
LLNotifications::instance().add(message_name, LLSD());
LLNotifications::instance().add(message_name, LLSD(), LLSD());
}
}

View File

@ -35,7 +35,7 @@
#include "llfloater.h"
#include "lllayoutstack.h"
//#include "llnotifications.h"
//#include "llnotificationsutil.h"
class LLNotification;

View File

@ -41,6 +41,7 @@
#include "llcachename.h"
#include "llbutton.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "llalertdialog.h"
@ -84,7 +85,7 @@ void LLFloaterOpenObject::onOpen(const LLSD& key)
LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
if (object_selection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("UnableToViewContentsMoreThanOne");
LLNotificationsUtil::add("UnableToViewContentsMoreThanOne");
closeFloater();
return;
}
@ -141,7 +142,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
{
if (mObjectSelection->getRootObjectCount() != 1)
{
LLNotifications::instance().add("OnlyCopyContentsOfSingleItem");
LLNotificationsUtil::add("OnlyCopyContentsOfSingleItem");
return;
}
@ -182,7 +183,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
delete data;
data = NULL;
LLNotifications::instance().add("OpenObjectCannotCopy");
LLNotificationsUtil::add("OpenObjectCannotCopy");
}
}

View File

@ -46,7 +46,7 @@
#include "llbutton.h"
#include "lltexteditor.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
#include "lluictrlfactory.h"
@ -223,20 +223,20 @@ void LLFloaterPostcard::onClickSend(void* data)
if (to.empty() || !boost::regex_match(to, emailFormat))
{
LLNotifications::instance().add("PromptRecipientEmail");
LLNotificationsUtil::add("PromptRecipientEmail");
return;
}
if (from.empty() || !boost::regex_match(from, emailFormat))
{
LLNotifications::instance().add("PromptSelfEmail");
LLNotificationsUtil::add("PromptSelfEmail");
return;
}
std::string subject(self->childGetValue("subject_form").asString());
if(subject.empty() || !self->mHasFirstMsgFocus)
{
LLNotifications::instance().add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2));
LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLFloaterPostcard::missingSubjMsgAlertCallback, self, _1, _2));
return;
}
@ -246,7 +246,7 @@ void LLFloaterPostcard::onClickSend(void* data)
}
else
{
LLNotifications::instance().add("ErrorProcessingSnapshot");
LLNotificationsUtil::add("ErrorProcessingSnapshot");
}
}
}
@ -262,7 +262,7 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
LLNotifications::instance().add("ErrorUploadingPostcard", args);
LLNotificationsUtil::add("ErrorUploadingPostcard", args);
}
else
{
@ -322,7 +322,7 @@ void LLFloaterPostcard::onMsgFormFocusRecieved(LLFocusableElement* receiver, voi
bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(0 == option)
{
// User clicked OK

View File

@ -36,7 +36,7 @@
#include "llsliderctrl.h"
#include "llcheckboxctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lluictrlfactory.h"
#include "llviewerdisplay.h"
#include "llpostprocess.h"
@ -161,7 +161,7 @@ void LLFloaterPostProcess::onSaveEffect(LLLineEditor* editBox)
{
LLSD payload;
payload["effect_name"] = effectName;
LLNotifications::instance().add("PPSaveEffectAlert", LLSD(), payload, boost::bind(&LLFloaterPostProcess::saveAlertCallback, this, _1, _2));
LLNotificationsUtil::add("PPSaveEffectAlert", LLSD(), payload, boost::bind(&LLFloaterPostProcess::saveAlertCallback, this, _1, _2));
}
else
{
@ -181,7 +181,7 @@ void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl)
bool LLFloaterPostProcess::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)

View File

@ -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()

View File

@ -64,6 +64,8 @@
#include "lllineeditor.h"
#include "llalertdialog.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistitem.h"
#include "llsliderctrl.h"
#include "llslurl.h"
@ -635,7 +637,7 @@ void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& name
void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
{
llinfos << "LLPanelRegionGeneralInfo::onClickKickAll" << llendl;
LLNotifications::instance().add("KickUsersFromRegion",
LLNotificationsUtil::add("KickUsersFromRegion",
LLSD(),
LLSD(),
boost::bind(&LLPanelRegionGeneralInfo::onKickAllCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
@ -643,7 +645,7 @@ void LLPanelRegionGeneralInfo::onClickKickAll(void* userdata)
bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
strings_t strings;
@ -663,7 +665,7 @@ bool LLPanelRegionGeneralInfo::onKickAllCommit(const LLSD& notification, const L
void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
{
llinfos << "LLPanelRegionGeneralInfo::onClickMessage" << llendl;
LLNotifications::instance().add("MessageRegion",
LLNotificationsUtil::add("MessageRegion",
LLSD(),
LLSD(),
boost::bind(&LLPanelRegionGeneralInfo::onMessageCommit, (LLPanelRegionGeneralInfo*)userdata, _1, _2));
@ -672,7 +674,7 @@ void LLPanelRegionGeneralInfo::onClickMessage(void* userdata)
// static
bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
{
if(LLNotification::getSelectedOption(notification, response) != 0) return false;
if(LLNotificationsUtil::getSelectedOption(notification, response) != 0) return false;
std::string text = response["message"].asString();
if (text.empty()) return false;
@ -775,7 +777,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate()
LLViewerRegion* region = gAgent.getRegion();
if (region && (childGetValue("access_combo").asInteger() != region->getSimAccess()) )
{
LLNotifications::instance().add("RegionMaturityChange");
LLNotificationsUtil::add("RegionMaturityChange");
}
return TRUE;
@ -882,13 +884,13 @@ void LLPanelRegionDebugInfo::onClickReturn(void* data)
}
payload["flags"] = int(flags);
payload["return_estate_wide"] = panelp->childGetValue("return_estate_wide").asBoolean();
LLNotifications::instance().add("EstateObjectReturn", args, payload,
LLNotificationsUtil::add("EstateObjectReturn", args, payload,
boost::bind(&LLPanelRegionDebugInfo::callbackReturn, panelp, _1, _2));
}
bool LLPanelRegionDebugInfo::callbackReturn(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
LLUUID target_avatar = notification["payload"]["avatar_id"].asUUID();
@ -948,13 +950,13 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
// static
void LLPanelRegionDebugInfo::onClickRestart(void* data)
{
LLNotifications::instance().add("ConfirmRestart", LLSD(), LLSD(),
LLNotificationsUtil::add("ConfirmRestart", LLSD(), LLSD(),
boost::bind(&LLPanelRegionDebugInfo::callbackRestart, (LLPanelRegionDebugInfo*)data, _1, _2));
}
bool LLPanelRegionDebugInfo::callbackRestart(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
strings_t strings;
@ -1122,7 +1124,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
LLSD args;
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8);
LLNotifications::instance().add("InvalidTerrainBitDepth", args);
LLNotificationsUtil::add("InvalidTerrainBitDepth", args);
return FALSE;
}
@ -1133,7 +1135,7 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
args["TEXTURE_NUM"] = i+1;
args["TEXTURE_SIZE_X"] = width;
args["TEXTURE_SIZE_Y"] = height;
LLNotifications::instance().add("InvalidTerrainSize", args);
LLNotificationsUtil::add("InvalidTerrainSize", args);
return FALSE;
}
@ -1311,21 +1313,18 @@ void LLPanelRegionTerrainInfo::onClickUploadRaw(void* data)
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
self->sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings);
LLNotifications::instance().add("RawUploadStarted");
LLNotificationsUtil::add("RawUploadStarted");
}
// static
void LLPanelRegionTerrainInfo::onClickBakeTerrain(void* data)
{
LLNotification::Params::Functor functor_params;
functor_params.function(boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2));
LLNotifications::instance().add(LLNotification::Params("ConfirmBakeTerrain").functor(functor_params));
LLNotificationsUtil::add("ConfirmBakeTerrain", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackBakeTerrain, (LLPanelRegionTerrainInfo*)data, _1, _2));
}
bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
strings_t strings;
@ -1412,7 +1411,7 @@ void LLPanelEstateInfo::onClickAddAllowedAgent(void* user_data)
LLSD args;
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
LLNotifications::instance().add("MaxAllowedAgentOnRegion", args);
LLNotificationsUtil::add("MaxAllowedAgentOnRegion", args);
return;
}
accessAddCore(ESTATE_ACCESS_ALLOWED_AGENT_ADD, "EstateAllowedAgentAdd");
@ -1432,7 +1431,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup()
{
LLSD args;
args["MAX_GROUPS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
LLNotifications::instance().add("MaxAllowedGroupsOnRegion", args);
LLNotificationsUtil::add("MaxAllowedGroupsOnRegion", args);
return;
}
@ -1450,7 +1449,7 @@ void LLPanelEstateInfo::onClickAddAllowedGroup()
bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) return false;
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
@ -1487,7 +1486,7 @@ void LLPanelEstateInfo::onClickAddBannedAgent(void* user_data)
{
LLSD args;
args["MAX_BANNED"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
LLNotifications::instance().add("MaxBannedAgentsOnRegion", args);
LLNotificationsUtil::add("MaxBannedAgentsOnRegion", args);
return;
}
accessAddCore(ESTATE_ACCESS_BANNED_AGENT_ADD, "EstateBannedAgentAdd");
@ -1509,7 +1508,7 @@ void LLPanelEstateInfo::onClickAddEstateManager(void* user_data)
{ // Tell user they can't add more managers
LLSD args;
args["MAX_MANAGER"] = llformat("%d",ESTATE_MAX_MANAGERS);
LLNotifications::instance().add("MaxManagersOnRegion", args);
LLNotificationsUtil::add("MaxManagersOnRegion", args);
}
else
{ // Go pick managers to add
@ -1567,13 +1566,13 @@ void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names,
args["EVIL_USER"] = names[0];
LLSD payload;
payload["agent_id"] = ids[0];
LLNotifications::instance().add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2));
LLNotificationsUtil::add("EstateKickUser", args, payload, boost::bind(&LLPanelEstateInfo::kickUserConfirm, self, _1, _2));
}
bool LLPanelEstateInfo::kickUserConfirm(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@ -1722,7 +1721,7 @@ void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dia
// static
bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
// abort change
@ -1766,7 +1765,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["LIST_TYPE"] = "Allowed Residents";
args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
@ -1782,7 +1781,7 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co
args["MAX_AGENTS"] = llformat("%d",ESTATE_MAX_ACCESS_IDS);
args["LIST_TYPE"] = "Banned Residents";
args["NUM_EXCESS"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS);
LLNotifications::instance().add("MaxAgentOnRegionBatch", args);
LLNotificationsUtil::add("MaxAgentOnRegionBatch", args);
delete change_info;
return;
}
@ -1851,7 +1850,7 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string&
// static
bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
// abort
@ -1868,7 +1867,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD&
{
LLSD args;
args["ALL_ESTATES"] = all_estates_text();
LLNotifications::instance().add(notification["payload"]["dialog_name"],
LLNotificationsUtil::add(notification["payload"]["dialog_name"],
args,
notification["payload"],
accessCoreConfirm);
@ -1881,7 +1880,7 @@ bool LLPanelEstateInfo::accessRemoveCore2(const LLSD& notification, const LLSD&
// static
bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
const U32 originalFlags = (U32)notification["payload"]["operation"].asInteger();
LLViewerRegion* region = gAgent.getRegion();
@ -1900,7 +1899,7 @@ bool LLPanelEstateInfo::accessCoreConfirm(const LLSD& notification, const LLSD&
if (((U32)notification["payload"]["operation"].asInteger() & ESTATE_ACCESS_BANNED_AGENT_ADD)
&& region && (region->getOwner() == id))
{
LLNotifications::instance().add("OwnerCanNotBeDenied");
LLNotificationsUtil::add("OwnerCanNotBeDenied");
break;
}
switch(option)
@ -2162,7 +2161,7 @@ BOOL LLPanelEstateInfo::sendUpdate()
bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@ -2551,12 +2550,12 @@ BOOL LLPanelEstateInfo::checkSunHourSlider(LLUICtrl* child_ctrl)
void LLPanelEstateInfo::onClickMessageEstate(void* userdata)
{
llinfos << "LLPanelEstateInfo::onClickMessageEstate" << llendl;
LLNotifications::instance().add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
LLNotificationsUtil::add("MessageEstate", LLSD(), LLSD(), boost::bind(&LLPanelEstateInfo::onMessageCommit, (LLPanelEstateInfo*)userdata, _1, _2));
}
bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
std::string text = response["message"].asString();
if(option != 0) return false;
if(text.empty()) return false;
@ -2685,7 +2684,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
{
LLSD payload;
payload["item_id"] = item->getUUID();
LLNotifications::instance().add("EstateChangeCovenant", LLSD(), payload,
LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), payload,
LLPanelEstateCovenant::confirmChangeCovenantCallback);
}
break;
@ -2700,7 +2699,7 @@ BOOL LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop
// static
bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryItem* item = gInventory.getItem(notification["payload"]["item_id"].asUUID());
LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
@ -2720,7 +2719,7 @@ bool LLPanelEstateCovenant::confirmChangeCovenantCallback(const LLSD& notificati
// static
void LLPanelEstateCovenant::resetCovenantID(void* userdata)
{
LLNotifications::instance().add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
LLNotificationsUtil::add("EstateChangeCovenant", LLSD(), LLSD(), confirmResetCovenantCallback);
}
// static
@ -2729,7 +2728,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio
LLPanelEstateCovenant* self = LLFloaterRegionInfo::getPanelCovenant();
if (!self) return false;
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:
@ -2793,7 +2792,7 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
if( !panelp->mEditor->importBuffer( &buffer[0], file_length+1 ) )
{
llwarns << "Problem importing estate covenant." << llendl;
LLNotifications::instance().add("ProblemImportingEstateCovenant");
LLNotificationsUtil::add("ProblemImportingEstateCovenant");
}
else
{
@ -2813,15 +2812,15 @@ void LLPanelEstateCovenant::onLoadComplete(LLVFS *vfs,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifications::instance().add("MissingNotecardAssetID");
LLNotificationsUtil::add("MissingNotecardAssetID");
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
LLNotifications::instance().add("NotAllowedToViewNotecard");
LLNotificationsUtil::add("NotAllowedToViewNotecard");
}
else
{
LLNotifications::instance().add("UnableToLoadNotecardAsset");
LLNotificationsUtil::add("UnableToLoadNotecardAsset");
}
llwarns << "Problem loading notecard: " << status << llendl;

View File

@ -42,7 +42,7 @@
#include "llfontgl.h"
#include "llgl.h" // for renderer
#include "llinventory.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstring.h"
#include "llsys.h"
#include "llversionviewer.h"
@ -124,11 +124,11 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg)
if ( email_to_estate_owner )
{
LLNotifications::instance().add("HelpReportAbuseEmailEO");
LLNotificationsUtil::add("HelpReportAbuseEmailEO");
}
else
{
LLNotifications::instance().add("HelpReportAbuseEmailLL");
LLNotificationsUtil::add("HelpReportAbuseEmailLL");
}
};
}
@ -380,7 +380,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
category_value == IP_CONTENT_REMOVAL ||
category_value == IP_PERMISSONS_EXPLOIT)
{
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
self->mCopyrightWarningSeen = TRUE;
return;
}
@ -389,7 +389,7 @@ void LLFloaterReporter::onClickSend(void *userdata)
{
// IP_CONTENT_REMOVAL *always* shows the dialog -
// ergo you can never send that abuse report type.
LLNotifications::instance().add("HelpReportAbuseContainsCopyright");
LLNotificationsUtil::add("HelpReportAbuseContainsCopyright");
return;
}
@ -525,39 +525,39 @@ bool LLFloaterReporter::validateReport()
U8 category = (U8)category_sd.asInteger();
if (category == 0)
{
LLNotifications::instance().add("HelpReportAbuseSelectCategory");
LLNotificationsUtil::add("HelpReportAbuseSelectCategory");
return false;
}
if ( childGetText("abuser_name_edit").empty() )
{
LLNotifications::instance().add("HelpReportAbuseAbuserNameEmpty");
LLNotificationsUtil::add("HelpReportAbuseAbuserNameEmpty");
return false;
};
if ( childGetText("abuse_location_edit").empty() )
{
LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty");
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
return false;
};
if ( childGetText("abuse_location_edit").empty() )
{
LLNotifications::instance().add("HelpReportAbuseAbuserLocationEmpty");
LLNotificationsUtil::add("HelpReportAbuseAbuserLocationEmpty");
return false;
};
if ( childGetText("summary_edit").empty() )
{
LLNotifications::instance().add("HelpReportAbuseSummaryEmpty");
LLNotificationsUtil::add("HelpReportAbuseSummaryEmpty");
return false;
};
if ( childGetText("details_edit") == mDefaultSummary )
{
LLNotifications::instance().add("HelpReportAbuseDetailsEmpty");
LLNotificationsUtil::add("HelpReportAbuseDetailsEmpty");
return false;
};
return true;
@ -830,7 +830,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
LLNotifications::instance().add("ErrorUploadingReportScreenshot", args);
LLNotificationsUtil::add("ErrorUploadingReportScreenshot", args);
std::string err_msg("There was a problem uploading a report screenshot");
err_msg += " due to the following reason: " + args["REASON"].asString();

View File

@ -38,6 +38,7 @@
#include "llfloaterland.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llparcel.h"
#include "llselectmgr.h"
@ -426,7 +427,7 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata)
send_parcel_select_objects(parcel->getLocalID(), RT_SELL);
LLNotifications::instance().add("TransferObjectsHighlighted",
LLNotificationsUtil::add("TransferObjectsHighlighted",
LLSD(), LLSD(),
&LLFloaterSellLandUI::callbackHighlightTransferable);
}
@ -461,7 +462,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
&& (sale_price == 0)
&& sell_to_anyone)
{
LLNotifications::instance().add("SalePriceRestriction");
LLNotificationsUtil::add("SalePriceRestriction");
return;
}
@ -494,7 +495,7 @@ void LLFloaterSellLandUI::doSellLand(void *userdata)
bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
{
return false;

View File

@ -76,7 +76,7 @@
#include "llimagebmp.h"
#include "llimagej2c.h"
#include "lllocalcliprect.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llresmgr.h" // LLLocale
#include "llvfile.h"
#include "llvfs.h"
@ -994,7 +994,7 @@ void LLSnapshotLivePreview::saveTexture()
}
else
{
LLNotifications::instance().add("ErrorEncodingSnapshot");
LLNotificationsUtil::add("ErrorEncodingSnapshot");
llwarns << "Error encoding snapshot" << llendl;
}

View File

@ -52,7 +52,7 @@
#include "llmediaentry.h"
#include "llmediactrl.h"
#include "llmenugl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpanelcontents.h"
#include "llpanelface.h"
#include "llpanelland.h"
@ -1278,7 +1278,7 @@ void LLFloaterTools::onClickBtnAddMedia()
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
if((tool != LLToolFace::getInstance()) || LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())
{
LLNotifications::instance().add("MultipleFacesSelected",LLSD(), LLSD(), multipleFacesSelectedConfirm);
LLNotificationsUtil::add("MultipleFacesSelected",LLSD(), LLSD(), multipleFacesSelectedConfirm);
}
else
@ -1291,7 +1291,7 @@ void LLFloaterTools::onClickBtnAddMedia()
// static
bool LLFloaterTools::multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
@ -1317,14 +1317,14 @@ void LLFloaterTools::onClickBtnEditMedia()
// called when a user wants to delete media from a prim or prim face
void LLFloaterTools::onClickBtnDeleteMedia()
{
LLNotifications::instance().add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
LLNotificationsUtil::add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
}
// static
bool LLFloaterTools::deleteMediaConfirm(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"

View File

@ -41,7 +41,7 @@
#include "llbutton.h"
#include "llfloatergodtools.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
@ -360,7 +360,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
//static
bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
if(!instance) return false;
if (option == 0)
@ -372,7 +372,7 @@ bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD
void LLFloaterTopObjects::onReturnAll()
{
LLNotifications::instance().add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll);
LLNotificationsUtil::add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll);
}
@ -385,7 +385,7 @@ void LLFloaterTopObjects::onReturnSelected()
//static
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
if(!instance) return false;
if (option == 0)
@ -397,7 +397,7 @@ bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLS
void LLFloaterTopObjects::onDisableAll()
{
LLNotifications::instance().add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll);
LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll);
}
void LLFloaterTopObjects::onDisableSelected()

View File

@ -40,9 +40,10 @@
// linden library includes
#include "llbutton.h"
#include "llevents.h"
#include "llhttpclient.h"
#include "llhttpstatuscodes.h" // for HTTP_FOUND
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llradiogroup.h"
#include "lltextbox.h"
#include "llui.h"
@ -208,7 +209,7 @@ void LLFloaterTOS::onCancel( void* userdata )
{
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
llinfos << "User disagrees with TOS." << llendl;
LLNotifications::instance().add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done);
if(self->mReplyPumpName != "")
{

View File

@ -49,7 +49,7 @@
// XUI
#include "lluictrlfactory.h"
#include "llcombobox.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llresizebar.h"
#include "llscrolllistitem.h"
#include "llscrolllistctrl.h"
@ -608,7 +608,7 @@ void LLFloaterUIPreview::popupAndPrintWarning(std::string& warning)
llwarns << warning << llendl;
LLSD args;
args["MESSAGE"] = warning;
LLNotifications::instance().add("GenericAlert", args);
LLNotificationsUtil::add("GenericAlert", args);
}
// Get localization string from drop-down menu

View File

@ -38,7 +38,7 @@
#include "llpanelface.h"
#include "llcombobox.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llurlhistory.h"
#include "lluictrlfactory.h"
#include "llwindow.h"
@ -263,13 +263,13 @@ void LLFloaterURLEntry::onBtnCancel( void* userdata )
//-----------------------------------------------------------------------------
void LLFloaterURLEntry::onBtnClear( void* userdata )
{
LLNotifications::instance().add( "ConfirmClearMediaUrlList", LLSD(), LLSD(),
LLNotificationsUtil::add( "ConfirmClearMediaUrlList", LLSD(), LLSD(),
boost::bind(&LLFloaterURLEntry::callback_clear_url_list, (LLFloaterURLEntry*)userdata, _1, _2) );
}
bool LLFloaterURLEntry::callback_clear_url_list(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( option == 0 ) // YES
{
// clear saved list

View File

@ -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;
}

View File

@ -41,7 +41,7 @@
#include "llsliderctrl.h"
#include "llmultislider.h"
#include "llmultisliderctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llspinctrl.h"
#include "llcheckboxctrl.h"
#include "lluictrlfactory.h"
@ -211,7 +211,7 @@ void LLFloaterWindLight::initCallbacks(void) {
bool LLFloaterWindLight::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 == "")
{
@ -261,7 +261,7 @@ bool LLFloaterWindLight::newPromptCallback(const LLSD& notification, const LLSD&
}
else
{
LLNotifications::instance().add("ExistsSkyPresetAlert");
LLNotificationsUtil::add("ExistsSkyPresetAlert");
}
}
return false;
@ -677,7 +677,7 @@ void LLFloaterWindLight::onStarAlphaMoved(LLUICtrl* ctrl)
void LLFloaterWindLight::onNewPreset()
{
LLNotifications::instance().add("NewSkyPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::newPromptCallback, this, _1, _2));
LLNotificationsUtil::add("NewSkyPreset", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::newPromptCallback, this, _1, _2));
}
void LLFloaterWindLight::onSavePreset()
@ -697,19 +697,19 @@ void LLFloaterWindLight::onSavePreset()
comboBox->getSelectedItemLabel());
if(sIt != sDefaultPresets.end() && !gSavedSettings.getBOOL("SkyEditPresets"))
{
LLNotifications::instance().add("WLNoEditDefault");
LLNotificationsUtil::add("WLNoEditDefault");
return;
}
LLWLParamManager::instance()->mCurParams.mName =
comboBox->getSelectedItemLabel();
LLNotifications::instance().add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::saveAlertCallback, this, _1, _2));
LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterWindLight::saveAlertCallback, this, _1, _2));
}
bool LLFloaterWindLight::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)
{
@ -735,13 +735,13 @@ void LLFloaterWindLight::onDeletePreset()
LLSD args;
args["SKY"] = combo_box->getSelectedValue().asString();
LLNotifications::instance().add("WLDeletePresetAlert", args, LLSD(),
LLNotificationsUtil::add("WLDeletePresetAlert", args, LLSD(),
boost::bind(&LLFloaterWindLight::deleteAlertCallback, this, _1, _2));
}
bool LLFloaterWindLight::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)
@ -763,7 +763,7 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS
std::set<std::string>::iterator sIt = sDefaultPresets.find(name);
if(sIt != sDefaultPresets.end())
{
LLNotifications::instance().add("WLNoEditDefault");
LLNotificationsUtil::add("WLNoEditDefault");
return false;
}

View File

@ -54,7 +54,7 @@
#include "llinventoryobserver.h"
#include "lllandmarklist.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llregionhandle.h"
#include "llscrolllistctrl.h"
#include "llslurl.h"
@ -1214,7 +1214,7 @@ void LLFloaterWorldMap::onCopySLURL()
LLSD args;
args["SLURL"] = mSLURL;
LLNotifications::instance().add("CopySLURL", args);
LLNotificationsUtil::add("CopySLURL", args);
}
// protected

View File

@ -42,7 +42,7 @@
#include "lldatapacker.h"
#include "llinventory.h"
#include "llmultigesture.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstl.h"
#include "llstring.h" // todo: remove
#include "llvfile.h"
@ -972,7 +972,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
// we're done with this set of deactivations
LLSD args;
args["NAMES"] = self.mDeactivateSimilarNames;
LLNotifications::instance().add("DeactivatedGesturesTrigger", args);
LLNotificationsUtil::add("DeactivatedGesturesTrigger", args);
}
}

View File

@ -40,7 +40,7 @@
#include "llfloaterreg.h"
#include "llgroupmgr.h"
#include "llimview.h" // for gIMMgr
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llsidetray.h"
#include "llstatusbar.h" // can_afford_transaction()
#include "llimfloater.h"
@ -132,11 +132,11 @@ void LLGroupActions::join(const LLUUID& group_id)
if (can_afford_transaction(cost))
{
LLNotifications::instance().add("JoinGroupCanAfford", args, payload, onJoinGroup);
LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup);
}
else
{
LLNotifications::instance().add("JoinGroupCannotAfford", args, payload);
LLNotificationsUtil::add("JoinGroupCannotAfford", args, payload);
}
}
else
@ -149,7 +149,7 @@ void LLGroupActions::join(const LLUUID& group_id)
// static
bool LLGroupActions::onJoinGroup(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 1)
{
@ -181,7 +181,7 @@ void LLGroupActions::leave(const LLUUID& group_id)
args["GROUP"] = gAgent.mGroups.get(i).mName;
LLSD payload;
payload["group_id"] = group_id;
LLNotifications::instance().add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
}
}
@ -346,7 +346,7 @@ bool LLGroupActions::isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID&
// static
bool LLGroupActions::onLeaveGroup(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLUUID group_id = notification["payload"]["group_id"].asUUID();
if(option == 0)
{

View File

@ -52,7 +52,7 @@
#include "llviewerwindow.h"
#include "llpanelgroup.h"
#include "llgroupactions.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lluictrlfactory.h"
#include <boost/regex.hpp>
@ -1295,7 +1295,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
// *TODO: Translate
LLSD args;
args["MESSAGE"] = message;
LLNotifications::instance().add("UnableToCreateGroup", args);
LLNotificationsUtil::add("UnableToCreateGroup", args);
}
}

View File

@ -71,6 +71,7 @@
#include "llviewermessage.h"
#include "llviewerwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llviewerregion.h"
#include "llvoicechannel.h"
@ -120,7 +121,7 @@ void toast_callback(const LLSD& msg){
args["FROM_ID"] = msg["from_id"];
args["SESSION_ID"] = msg["session_id"];
LLNotifications::instance().add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
}
void LLIMModel::setActiveSessionID(const LLUUID& session_id)
@ -1015,7 +1016,7 @@ LLIMMgr::showSessionStartError(
LLSD payload;
payload["session_id"] = session_id;
LLNotifications::instance().add(
LLNotificationsUtil::add(
"ChatterBoxSessionStartError",
args,
payload,
@ -1038,7 +1039,7 @@ LLIMMgr::showSessionEventError(
LLTrans::getString(event_string);
args["RECIPIENT"] = floater->getTitle();
LLNotifications::instance().add(
LLNotificationsUtil::add(
"ChatterBoxSessionEventError",
args);
}
@ -1059,7 +1060,7 @@ LLIMMgr::showSessionForceClose(
LLSD payload;
payload["session_id"] = session_id;
LLNotifications::instance().add(
LLNotificationsUtil::add(
"ForceCloseChatterBoxSession",
args,
payload,
@ -1363,7 +1364,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
LLUUID session_id = payload["session_id"].asUUID();
EInstantMessage type = (EInstantMessage)payload["type"].asInteger();
LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)payload["inv_type"].asInteger();
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // accept
@ -1870,7 +1871,7 @@ void LLIMMgr::inviteToSession(
args["NAME"] = caller_name;
args["GROUP"] = session_name;
LLNotifications::instance().add(notify_box_type, args, payload, &inviteUserResponse);
LLNotificationsUtil::add(notify_box_type, args, payload, &inviteUserResponse);
}
}
mPendingInvitations[session_id.asString()] = LLSD();
@ -1893,7 +1894,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri
LLSD args;
args["NAME"] = payload["caller_name"].asString();
LLNotifications::instance().add(
LLNotificationsUtil::add(
payload["notify_box_type"].asString(),
args,
payload,

View File

@ -36,7 +36,7 @@
// Viewer
#include "llinspect.h"
#include "llmediaentry.h"
#include "llnotifications.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper
#include "llselectmgr.h"
#include "llslurl.h"
#include "llviewermenu.h" // handle_object_touch(), handle_buy()
@ -631,7 +631,7 @@ void LLInspectObject::onClickOpen()
void LLInspectObject::onClickMoreInfo()
{
// *TODO: Show object info side panel, once that is implemented.
LLNotifications::instance().add("ClickUnimplemented");
LLNotificationsUtil::add("ClickUnimplemented");
closeFloater();
}

View File

@ -51,6 +51,7 @@
#include "llinventorymodel.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewtexture.h"
@ -1679,7 +1680,7 @@ void warn_move_inventory(LLViewerObject* object, LLMoveInv* move_inv)
{
dialog = "MoveInventoryFromObject";
}
LLNotifications::instance().add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv));
LLNotificationsUtil::add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv));
}
// Move/copy all inventory items from the Contents folder of an in-world
@ -2681,7 +2682,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
{
LLFloaterOpenObject::LLCatAndWear* cat_and_wear = (LLFloaterOpenObject::LLCatAndWear* )move_inv->mUserData;
LLViewerObject* object = gObjectList.findObject(move_inv->mObjectID);
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(option == 0 && object)
{
@ -3254,7 +3255,7 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
static bool open_landmark_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLUUID asset_id = notification["payload"]["asset_id"].asUUID();
if (option == 0)
@ -3284,7 +3285,7 @@ void LLLandmarkBridge::openItem()
// open_landmark(item);
LLSD payload;
payload["asset_id"] = item->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload);
}
*/
}
@ -3924,7 +3925,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
#if !ENABLE_MULTIATTACHMENTS
if (attachment && attachment->getNumObjects() > 0)
{
LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez);
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez);
}
else
#endif
@ -3941,11 +3942,11 @@ bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& respon
{
LLSD args;
args["MAX_ATTACHMENTS"] = llformat("%d", MAX_AGENT_ATTACHMENTS);
LLNotifications::instance().add("MaxAttachmentsOnOutfit", args);
LLNotificationsUtil::add("MaxAttachmentsOnOutfit", args);
return false;
}
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0/*YES*/)
{
LLViewerInventoryItem* itemp = gInventory.getItem(notification["payload"]["item_id"].asUUID());
@ -4363,7 +4364,7 @@ void LLWearableBridge::openItem()
/*
if( isInTrash() )
{
LLNotifications::instance().add("CannotWearTrash");
LLNotificationsUtil::add("CannotWearTrash");
}
else if(isAgentInventory())
{
@ -4392,7 +4393,7 @@ void LLWearableBridge::openItem()
{
// *TODO: We should fetch the item details, and then do
// the operation above.
LLNotifications::instance().add("CannotWearInfoNotComplete");
LLNotificationsUtil::add("CannotWearInfoNotComplete");
}
}
*/
@ -4511,7 +4512,7 @@ void LLWearableBridge::wearOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@ -4542,7 +4543,7 @@ void LLWearableBridge::wearAddOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@ -4843,7 +4844,7 @@ void LLLandmarkBridgeAction::doIt()
// but warns you the first time.
LLSD payload;
payload["asset_id"] = item->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload);
}
LLInvFVBridgeAction::doIt();
@ -4943,7 +4944,7 @@ void LLWearableBridgeAction::wearOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@ -4973,7 +4974,7 @@ void LLWearableBridgeAction::doIt()
{
if(isInTrash())
{
LLNotifications::instance().add("CannotWearTrash");
LLNotificationsUtil::add("CannotWearTrash");
}
else if(isAgentInventory())
{
@ -5002,7 +5003,7 @@ void LLWearableBridgeAction::doIt()
{
// *TODO: We should fetch the item details, and then do
// the operation above.
LLNotifications::instance().add("CannotWearInfoNotComplete");
LLNotificationsUtil::add("CannotWearInfoNotComplete");
}
}

View File

@ -40,7 +40,7 @@
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llwindow.h"
#include "llviewercontrol.h"
#include "llpreview.h"
@ -3417,7 +3417,7 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
bool LLInventoryModel::callbackEmptyFolderType(const LLSD& notification, const LLSD& response, LLFolderType::EType preferred_type)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0) // YES
{
const LLUUID folder_id = findCategoryUUIDForType(preferred_type);
@ -3431,7 +3431,7 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderT
{
if (!notification.empty())
{
LLNotifications::instance().add(notification, LLSD(), LLSD(),
LLNotificationsUtil::add(notification, LLSD(), LLSD(),
boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, preferred_type));
}
else

View File

@ -55,7 +55,7 @@
#include "lldbstrings.h"
#include "llviewerstats.h"
#include "llmutelist.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llcallbacklist.h"
#include "llpreview.h"
#include "llviewercontrol.h"

View File

@ -39,7 +39,7 @@
#include "lllandmark.h"
#include "llparcel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llagent.h"
#include "llagentui.h"
@ -267,7 +267,7 @@ void LLLandmarkActions::createLandmarkHere(
}
if (!canCreateLandmarkHere())
{
LLNotifications::instance().add("CannotCreateLandmarkNotOwner");
LLNotificationsUtil::add("CannotCreateLandmarkNotOwner");
return;
}
@ -420,5 +420,5 @@ void copy_slurl_to_clipboard_callback(const std::string& slurl)
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(slurl));
LLSD args;
args["SLURL"] = slurl;
LLNotifications::instance().add("CopySLURL", args);
LLNotificationsUtil::add("CopySLURL", args);
}

View File

@ -146,12 +146,12 @@ void LLLandmarkList::processGetAssetReply(
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LL_WARNS("Landmarks") << "Missing Landmark" << LL_ENDL;
//LLNotifications::instance().add("LandmarkMissing");
//LLNotificationsUtil::add("LandmarkMissing");
}
else
{
LL_WARNS("Landmarks") << "Unable to load Landmark" << LL_ENDL;
//LLNotifications::instance().add("UnableToLoadLandmark");
//LLNotificationsUtil::add("UnableToLoadLandmark");
}
gLandmarkList.mBadList.insert(uuid);

View File

@ -45,7 +45,7 @@
#include "llviewermedia.h"
#include "llviewertexture.h"
#include "llviewerwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llweb.h"
#include "llrender.h"
#include "llpluginclassmedia.h"
@ -839,7 +839,7 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
// static
bool LLMediaCtrl::onClickLinkExternalTarget(const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( 0 == option )
{
// open in external browser because we don't support
@ -969,7 +969,7 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self )
mExternalUrl = url;
LLSD payload;
payload["external_url"] = mExternalUrl;
LLNotifications::instance().add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget);
LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget);
return;
}
}

View File

@ -298,7 +298,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
if ((mute.mType == LLMute::AGENT)
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
{
LLNotifications::instance().add("MuteLinden");
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD());
return FALSE;
}
@ -517,7 +517,7 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n
args["FIRST"] = first_name;
args["LAST"] = last_name;
LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args);
LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args, LLSD());
if (notif_ptr)
{
std::string message = notif_ptr->getMessage();

View File

@ -34,6 +34,8 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llnotificationhandler.h"
#include "llnotifications.h"
#include "lltoastnotifypanel.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"

View File

@ -36,7 +36,7 @@
#include "llwindow.h"
//#include "llnotifications.h"
//#include "llnotificationsutil.h"
#include "llchannelmanager.h"
#include "llchat.h"

View File

@ -40,7 +40,7 @@
#include "llnearbychathandler.h"
#include "llnotifications.h"
#include "boost/bind.hpp"
#include <boost/bind.hpp>
using namespace LLNotificationsUI;

View File

@ -40,7 +40,7 @@
#include "llcombobox.h"
#include "lldateutil.h" // ageFromDate()
#include "llimview.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lltoggleablemenu.h"
@ -673,7 +673,7 @@ void LLPanelAvatarMeProfile::onStatusChanged()
{
gAgent.clearAFK();
gAgent.setBusy();
LLNotifications::instance().add("BusyModeSet");
LLNotificationsUtil::add("BusyModeSet");
}
}

View File

@ -37,7 +37,7 @@
// library include
#include "llfloater.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistctrl.h"
// project include
@ -201,7 +201,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text)
BOOL success = LLMuteList::getInstance()->add(mute);
if (!success)
{
LLNotifications::instance().add("MuteByNameFailed");
LLNotificationsUtil::add("MuteByNameFailed");
}
}

View File

@ -41,6 +41,8 @@
#include "lldir.h"
#include "lldispatcher.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "lltabcontainer.h"
#include "message.h"
@ -310,12 +312,12 @@ BOOL LLPanelClassified::titleIsValid()
const std::string& name = mNameEditor->getText();
if (name.empty())
{
LLNotifications::instance().add("BlankClassifiedName");
LLNotificationsUtil::add("BlankClassifiedName");
return FALSE;
}
if (!isalnum(name[0]))
{
LLNotifications::instance().add("ClassifiedMustBeAlphanumeric");
LLNotificationsUtil::add("ClassifiedMustBeAlphanumeric");
return FALSE;
}
@ -334,7 +336,7 @@ void LLPanelClassified::apply()
bool LLPanelClassified::saveCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
@ -370,7 +372,7 @@ BOOL LLPanelClassified::canClose()
LLSD args;
args["NAME"] = mNameEditor->getText();
LLNotifications::instance().add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassified::saveCallback, this, _1, _2));
LLNotificationsUtil::add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassified::saveCallback, this, _1, _2));
return FALSE;
}
@ -795,7 +797,7 @@ void LLPanelClassified::onClickUpdate(void* data)
if(self->mMatureCombo->getCurrentIndex() == DECLINE_TO_STATE)
{
// Tell user about it
LLNotifications::instance().add("SetClassifiedMature",
LLNotificationsUtil::add("SetClassifiedMature",
LLSD(),
LLSD(),
boost::bind(&LLPanelClassified::confirmMature, self, _1, _2));
@ -809,7 +811,7 @@ void LLPanelClassified::onClickUpdate(void* data)
// Callback from a dialog indicating response to mature notification
bool LLPanelClassified::confirmMature(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// 0 == Yes
// 1 == No
@ -864,7 +866,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text,
std::string price_text = llformat("%d", MINIMUM_PRICE_FOR_LISTING);
args["MIN_PRICE"] = price_text;
LLNotifications::instance().add("MinClassifiedPrice", args);
LLNotificationsUtil::add("MinClassifiedPrice", args);
return;
}
@ -874,7 +876,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text,
LLSD args;
args["AMOUNT"] = llformat("%d", price_for_listing);
LLNotifications::instance().add("PublishClassified", args, LLSD(),
LLNotificationsUtil::add("PublishClassified", args, LLSD(),
boost::bind(&LLPanelClassified::confirmPublish, self, _1, _2));
}
@ -901,7 +903,7 @@ void LLPanelClassified::resetDirty()
// invoked from callbackConfirmPublish
bool LLPanelClassified::confirmPublish(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// Option 0 = publish
if (option != 0) return false;

View File

@ -43,7 +43,7 @@
#include "llviewermessage.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llfloaterreg.h"
#include "llfloater.h"
#include "llgroupactions.h"
@ -245,7 +245,7 @@ void LLPanelGroup::onBtnCreate()
{
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotifications::instance().add("GenericAlert", args);
LLNotificationsUtil::add("GenericAlert", args);
}
}
@ -441,7 +441,7 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab)
{
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotifications::instance().add("GenericAlert", args);
LLNotificationsUtil::add("GenericAlert", args);
}
return false;
}

View File

@ -48,7 +48,7 @@
#include "lllineeditor.h"
#include "llnamebox.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistitem.h"
#include "llspinctrl.h"
#include "lltextbox.h"
@ -361,7 +361,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
if(mComboMature &&
mComboMature->getCurrentIndex() == DECLINE_TO_STATE)
{
LLNotifications::instance().add("SetGroupMature", LLSD(), LLSD(),
LLNotificationsUtil::add("SetGroupMature", LLSD(), LLSD(),
boost::bind(&LLPanelGroupGeneral::confirmMatureApply, this, _1, _2));
return false;
}
@ -380,7 +380,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
return false;
}
LLNotifications::instance().add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
return false;
}
@ -460,7 +460,7 @@ void LLPanelGroupGeneral::cancel()
// invoked from callbackConfirmMature
bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// 0 == Yes
// 1 == No
// 2 == Cancel
@ -483,7 +483,7 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS
{
LLSD args;
args["MESSAGE"] = mesg;
LLNotifications::instance().add("GenericAlert", args);
LLNotificationsUtil::add("GenericAlert", args);
}
return ret;
@ -492,7 +492,7 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS
// static
bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0:

View File

@ -40,7 +40,7 @@
#include "llgroupactions.h"
#include "llgroupmgr.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistitem.h"
#include "llspinctrl.h"
#include "lltextbox.h"
@ -165,7 +165,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
{
LLSD args;
args["MESSAGE"] = mOwnerWarning;
LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2));
LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2));
return; // we'll be called again if user confirms
}
}
@ -191,7 +191,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
{
LLSD msg;
msg["MESSAGE"] = mAlreadyInGroup;
LLNotifications::instance().add("GenericAlert", msg);
LLNotificationsUtil::add("GenericAlert", msg);
}
//then close
@ -200,7 +200,7 @@ void LLPanelGroupInvite::impl::submitInvitations()
bool LLPanelGroupInvite::impl::inviteOwnerCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{

View File

@ -58,7 +58,7 @@
#include "roles_constants.h"
#include "llviewerwindow.h"
#include "llviewermessage.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
@ -372,7 +372,7 @@ void LLPanelGroupNotices::onClickSendMessage(void* data)
if (self->mCreateSubject->getText().empty())
{
// Must supply a subject
LLNotifications::instance().add("MustSpecifyGroupNoticeSubject");
LLNotificationsUtil::add("MustSpecifyGroupNoticeSubject");
return;
}
send_group_notice(

View File

@ -42,7 +42,7 @@
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llpanelgrouproles.h"
#include "llscrolllistctrl.h"
@ -232,7 +232,7 @@ BOOL LLPanelGroupRoles::attemptTransition()
LLSD args;
args["NEEDS_APPLY_MESSAGE"] = mesg;
args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
LLNotifications::instance().add("PanelGroupApply", args, LLSD(),
LLNotificationsUtil::add("PanelGroupApply", args, LLSD(),
boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2));
mHasModal = TRUE;
// We need to reselect the current tab, since it isn't finished.
@ -276,7 +276,7 @@ void LLPanelGroupRoles::transitionToTab()
bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
mHasModal = FALSE;
switch (option)
{
@ -292,7 +292,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS
mHasModal = TRUE;
LLSD args;
args["MESSAGE"] = apply_mesg;
LLNotifications::instance().add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2));
LLNotificationsUtil::add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2));
}
// Skip switching tabs.
break;
@ -1280,7 +1280,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
{
mHasModal = TRUE;
args["ROLE_NAME"] = rd.mRoleName;
LLNotifications::instance().add("AddGroupOwnerWarning",
LLNotificationsUtil::add("AddGroupOwnerWarning",
args,
LLSD(),
boost::bind(&LLPanelGroupMembersSubTab::addOwnerCB, this, _1, _2));
@ -1305,7 +1305,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg)
bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
mHasModal = FALSE;
if (0 == option)
@ -2127,7 +2127,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force)
{
warning = "AssignDangerousAbilityWarning";
}
LLNotifications::instance().add(warning, args, LLSD(), boost::bind(&LLPanelGroupRolesSubTab::addActionCB, this, _1, _2, check));
LLNotificationsUtil::add(warning, args, LLSD(), boost::bind(&LLPanelGroupRolesSubTab::addActionCB, this, _1, _2, check));
}
else
{
@ -2155,7 +2155,7 @@ bool LLPanelGroupRolesSubTab::addActionCB(const LLSD& notification, const LLSD&
mHasModal = FALSE;
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
// User clicked "Yes"
@ -2301,7 +2301,7 @@ void LLPanelGroupRolesSubTab::handleDeleteRole()
{
LLSD args;
args["MESSAGE"] = mRemoveEveryoneTxt;
LLNotifications::instance().add("GenericAlert", args);
LLNotificationsUtil::add("GenericAlert", args);
return;
}

View File

@ -51,7 +51,7 @@
#include "llfloaterpreference.h"
#include "llfocusmgr.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstartup.h"
#include "lltextbox.h"
#include "llui.h"
@ -893,12 +893,12 @@ void LLPanelLogin::onClickConnect(void *)
if (first.empty() || last.empty())
{
LLNotifications::instance().add("MustHaveAccountToLogIn");
LLNotificationsUtil::add("MustHaveAccountToLogIn");
}
else if( (combo_text=="<Type region name>" || combo_text =="")
&& LLURLSimString::sInstance.mSimString =="")
{
LLNotifications::instance().add("StartRegionEmpty");
LLNotificationsUtil::add("StartRegionEmpty");
}
else
{
@ -912,7 +912,7 @@ void LLPanelLogin::onClickConnect(void *)
// static
bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
llinfos << "Going to account creation URL" << llendl;
@ -953,7 +953,7 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE)
{
LLNotifications::instance().add("CapsKeyOn");
LLNotificationsUtil::add("CapsKeyOn");
sCapslockDidNotification = TRUE;
}
}

View File

@ -37,7 +37,7 @@
// library includes
#include "llcombobox.h"
#include "llcheckboxctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llspinctrl.h"
#include "lluictrlfactory.h"
@ -365,7 +365,7 @@ void LLPanelMediaSettingsGeneral::onCommitHomeURL( LLUICtrl* ctrl, void *userdat
std::string home_url = self->mHomeURL->getValue().asString();
if ( ! self->mParent->passesWhiteList( home_url ) )
{
LLNotifications::instance().add("WhiteListInvalidatesHomeUrl");
LLNotificationsUtil::add("WhiteListInvalidatesHomeUrl");
return;
};

View File

@ -37,7 +37,7 @@
#include "llfloaterreg.h"
#include "llpanelcontents.h"
#include "llcheckboxctrl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "lluictrlfactory.h"
@ -319,7 +319,7 @@ void LLPanelMediaSettingsSecurity::addWhiteListItem(const std::string& url)
else
// display a message indicating you can't do that
{
LLNotifications::instance().add("WhiteListInvalidatesHomeUrl");
LLNotificationsUtil::add("WhiteListInvalidatesHomeUrl");
};
}

View File

@ -42,7 +42,7 @@
#include "llpanelobjectinventory.h"
#include "llmenugl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "roles_constants.h"
#include "llagent.h"
@ -208,7 +208,7 @@ void LLTaskInvFVBridge::buyItem()
LLViewerObject* obj;
if( ( obj = gObjectList.findObject( mPanel->getTaskUUID() ) ) && obj->isAttachment() )
{
LLNotifications::instance().add("Cannot_Purchase_an_Attachment");
LLNotificationsUtil::add("Cannot_Purchase_an_Attachment");
llinfos << "Attempt to purchase an attachment" << llendl;
delete inv;
}
@ -220,9 +220,9 @@ void LLTaskInvFVBridge::buyItem()
if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS)
{
U32 next_owner_mask = perm.getMaskNextOwner();
args["MODIFYPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo");
args["COPYPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo");
args["RESELLPERM"] = LLNotifications::instance().getGlobalString((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo");
args["MODIFYPERM"] = LLTrans::getString((next_owner_mask & PERM_MODIFY) ? "PermYes" : "PermNo");
args["COPYPERM"] = LLTrans::getString((next_owner_mask & PERM_COPY) ? "PermYes" : "PermNo");
args["RESELLPERM"] = LLTrans::getString((next_owner_mask & PERM_TRANSFER) ? "PermYes" : "PermNo");
}
std::string alertdesc;
@ -244,7 +244,7 @@ void LLTaskInvFVBridge::buyItem()
payload["task_id"] = inv->mTaskID;
payload["item_id"] = inv->mItemID;
payload["type"] = inv->mType;
LLNotifications::instance().add(alertdesc, args, payload, LLTaskInvFVBridge::commitBuyItem);
LLNotificationsUtil::add(alertdesc, args, payload, LLTaskInvFVBridge::commitBuyItem);
}
}
@ -264,7 +264,7 @@ S32 LLTaskInvFVBridge::getPrice()
// static
bool LLTaskInvFVBridge::commitBuyItem(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(0 == option)
{
LLViewerObject* object = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
@ -424,7 +424,7 @@ BOOL LLTaskInvFVBridge::isItemRemovable()
bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLViewerObject* object = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
if(option == 0 && object)
{
@ -469,7 +469,7 @@ BOOL LLTaskInvFVBridge::removeItem()
LLSD payload;
payload["task_id"] = mPanel->getTaskUUID();
payload["inventory_ids"].append(mUUID);
LLNotifications::instance().add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel));
LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel));
return FALSE;
}
}
@ -499,7 +499,7 @@ void LLTaskInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>&
LLTaskInvFVBridge* itemp = (LLTaskInvFVBridge*)batch[i];
payload["inventory_ids"].append(itemp->getUUID());
}
LLNotifications::instance().add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel));
LLNotificationsUtil::add("RemoveItemWarn", LLSD(), payload, boost::bind(&remove_task_inventory_callback, _1, _2, mPanel));
}
else
@ -1170,7 +1170,7 @@ void LLTaskLSLBridge::openItem()
}
else
{
LLNotifications::instance().add("CannotOpenScriptObjectNoMod");
LLNotificationsUtil::add("CannotOpenScriptObjectNoMod");
}
}

View File

@ -42,7 +42,7 @@
#include "llcategory.h"
#include "llclickaction.h"
#include "llfocusmgr.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstring.h"
// project includes
@ -894,7 +894,7 @@ void LLPanelPermissions::cbGroupID(LLUUID group_id)
bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LLUUID group_id;
@ -910,7 +910,7 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
void LLPanelPermissions::onClickDeedToGroup(void* data)
{
LLNotifications::instance().add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
LLNotificationsUtil::add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
}
///----------------------------------------------------------------------------
@ -1087,7 +1087,7 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*)
LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
if (!sale_info.isForSale())
{
LLNotifications::instance().add("CantSetBuyObject");
LLNotificationsUtil::add("CantSetBuyObject");
// Set click action back to its old value
U8 click_action = 0;
@ -1105,7 +1105,7 @@ void LLPanelPermissions::onCommitClickAction(LLUICtrl* ctrl, void*)
if (!can_pay)
{
// Warn, but do it anyway.
LLNotifications::instance().add("ClickActionNotPayable");
LLNotificationsUtil::add("ClickActionNotPayable");
}
}
LLSelectMgr::getInstance()->selectionSetClickAction(click_action);

View File

@ -40,7 +40,7 @@
#include "llflatlistview.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lltexturectrl.h"
#include "lltoggleablemenu.h"
#include "llviewergenericmessage.h" // send_generic_message
@ -433,7 +433,7 @@ void LLPanelPicks::onClickDelete()
{
LLSD args;
args["PICK"] = value[PICK_NAME];
LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeletePick, this, _1, _2));
LLNotificationsUtil::add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeletePick, this, _1, _2));
return;
}
@ -442,14 +442,14 @@ void LLPanelPicks::onClickDelete()
{
LLSD args;
args["NAME"] = value[CLASSIFIED_NAME];
LLNotifications::instance().add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeleteClassified, this, _1, _2));
LLNotificationsUtil::add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeleteClassified, this, _1, _2));
return;
}
}
bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLSD pick_value = mPicksList->getSelectedValue();
if (0 == option)
@ -463,7 +463,7 @@ bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& resp
bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLSD value = mClassifiedsList->getSelectedValue();
if (0 == option)
@ -477,7 +477,7 @@ bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD
bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
@ -542,7 +542,7 @@ void LLPanelPicks::onDoubleClickPickItem(LLUICtrl* item)
LLSD args;
args["PICK"] = pick_value[PICK_NAME];
LLNotifications::instance().add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
LLNotificationsUtil::add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
}
void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
@ -552,7 +552,7 @@ void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
LLSD args;
args["CLASSIFIED"] = value[CLASSIFIED_NAME];
LLNotifications::instance().add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
LLNotificationsUtil::add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
}
void LLPanelPicks::updateButtons()

View File

@ -46,7 +46,7 @@
#include "llbutton.h"
#include "llfloaterworldmap.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lluiconstants.h"
#include "lltextbox.h"
#include "lltexteditor.h"
@ -402,13 +402,13 @@ void LLPanelPlace::onClickAuction(void* data)
LLSD args;
args["AUCTION_ID"] = self->mAuctionID;
LLNotifications::instance().add("GoToAuctionPage", args);
LLNotificationsUtil::add("GoToAuctionPage", args);
}
/*
// static
bool LLPanelPlace::callbackAuctionWebPage(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
std::string url;

View File

@ -43,7 +43,7 @@
#include "llcombobox.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lltabcontainer.h"
#include "lltexteditor.h"
#include "lltrans.h"
@ -417,7 +417,7 @@ void LLPanelPlaces::onTeleportButtonClicked()
{
LLSD payload;
payload["asset_id"] = mItem->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload);
}
else if (mPlaceInfoType == AGENT_INFO_TYPE ||
mPlaceInfoType == REMOTE_PLACE_INFO_TYPE ||
@ -906,5 +906,5 @@ static void onSLURLBuilt(std::string& slurl)
LLSD args;
args["SLURL"] = slurl;
LLNotifications::instance().add("CopySLURL", args);
LLNotificationsUtil::add("CopySLURL", args);
}

View File

@ -35,7 +35,7 @@
#include "llwindow.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llbutton.h"
#include "llslurl.h"
@ -82,5 +82,5 @@ void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
LLSD args;
args["SLURL"] = sl_url;
LLNotifications::instance().add("CopySLURL", args);
LLNotificationsUtil::add("CopySLURL", args);
}

View File

@ -41,7 +41,7 @@
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llflatlistview.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lltextbox.h"
#include "llviewermenu.h"
#include "llviewerinventory.h"
@ -716,13 +716,13 @@ void LLTeleportHistoryPanel::onCollapseAllFolders()
void LLTeleportHistoryPanel::onClearTeleportHistory()
{
LLNotifications::instance().add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
}
bool LLTeleportHistoryPanel::onClearTeleportHistoryDialog(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{

View File

@ -43,7 +43,7 @@
#include "lldir.h"
#include "llfloaterreg.h"
#include "llmultigesture.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llvfile.h"
// newview
@ -255,7 +255,7 @@ BOOL LLPreviewGesture::canClose()
else
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(),
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(),
boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) );
return FALSE;
}
@ -284,7 +284,7 @@ void LLPreviewGesture::onVisibilityChange ( const LLSD& new_visibility )
bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // "Yes"
@ -1055,14 +1055,14 @@ void LLPreviewGesture::saveIfNeeded()
if (dp.getCurrentSize() > 1000)
{
LLNotifications::instance().add("GestureSaveFailedTooManySteps");
LLNotificationsUtil::add("GestureSaveFailedTooManySteps");
delete gesture;
gesture = NULL;
}
else if (!ok)
{
LLNotifications::instance().add("GestureSaveFailedTryAgain");
LLNotificationsUtil::add("GestureSaveFailedTryAgain");
delete gesture;
gesture = NULL;
}
@ -1201,7 +1201,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
}
else
{
LLNotifications::instance().add("GestureSaveFailedObjectNotFound");
LLNotificationsUtil::add("GestureSaveFailedObjectNotFound");
}
}
@ -1217,7 +1217,7 @@ void LLPreviewGesture::onSaveComplete(const LLUUID& asset_uuid, void* user_data,
llwarns << "Problem saving gesture: " << status << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("GestureSaveFailedReason", args);
LLNotificationsUtil::add("GestureSaveFailedReason", args);
}
delete info;
info = NULL;

View File

@ -43,7 +43,7 @@
#include "llfloaterreg.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llresmgr.h"
#include "roles_constants.h"
@ -154,7 +154,7 @@ BOOL LLPreviewNotecard::canClose()
else
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2));
return FALSE;
}
@ -331,15 +331,15 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifications::instance().add("NotecardMissing");
LLNotificationsUtil::add("NotecardMissing");
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
LLNotifications::instance().add("NotecardNoPermissions");
LLNotificationsUtil::add("NotecardNoPermissions");
}
else
{
LLNotifications::instance().add("UnableToLoadNotecard");
LLNotificationsUtil::add("UnableToLoadNotecard");
}
llwarns << "Problem loading notecard: " << status << llendl;
@ -494,7 +494,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
}
else
{
LLNotifications::instance().add("SaveNotecardFailObjectNotFound");
LLNotificationsUtil::add("SaveNotecardFailObjectNotFound");
}
}
// Perform item copy to inventory
@ -520,7 +520,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
llwarns << "Problem saving notecard: " << status << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("SaveNotecardFailReason", args);
LLNotificationsUtil::add("SaveNotecardFailReason", args);
}
std::string uuid_string;
@ -533,7 +533,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case 0: // "Yes"

View File

@ -45,7 +45,7 @@
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llhelp.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llresmgr.h"
#include "llscrollbar.h"
#include "llscrollcontainer.h"
@ -618,14 +618,14 @@ BOOL LLScriptEdCore::canClose()
else
{
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
LLNotifications::instance().add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2));
return FALSE;
}
}
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
@ -798,7 +798,7 @@ void LLScriptEdCore::onBtnUndoChanges()
{
if( !mEditor->tryToRevertToPristineState() )
{
LLNotifications::instance().add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, this, _1, _2));
LLNotificationsUtil::add("ScriptCannotUndo", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleReloadFromServerDialog, this, _1, _2));
}
}
@ -827,7 +827,7 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
bool LLScriptEdCore::handleReloadFromServerDialog(const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch( option )
{
case 0: // "Yes"
@ -1281,7 +1281,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32
llwarns << "Problem saving script: " << status << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("SaveScriptFailReason", args);
LLNotificationsUtil::add("SaveScriptFailReason", args);
}
delete info;
}
@ -1319,7 +1319,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d
llwarns << "Problem saving LSL Bytecode (Preview)" << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("SaveBytecodeFailReason", args);
LLNotificationsUtil::add("SaveBytecodeFailReason", args);
}
delete instance_uuid;
}
@ -1364,15 +1364,15 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifications::instance().add("ScriptMissing");
LLNotificationsUtil::add("ScriptMissing");
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
LLNotifications::instance().add("ScriptNoPermissions");
LLNotificationsUtil::add("ScriptNoPermissions");
}
else
{
LLNotifications::instance().add("UnableToLoadScript");
LLNotificationsUtil::add("UnableToLoadScript");
}
preview->mAssetStatus = PREVIEW_ASSET_ERROR;
@ -1605,15 +1605,15 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
LLNotifications::instance().add("ScriptMissing");
LLNotificationsUtil::add("ScriptMissing");
}
else if (LL_ERR_INSUFFICIENT_PERMISSIONS == status)
{
LLNotifications::instance().add("ScriptNoPermissions");
LLNotificationsUtil::add("ScriptNoPermissions");
}
else
{
LLNotifications::instance().add("UnableToLoadScript");
LLNotificationsUtil::add("UnableToLoadScript");
}
instance->mAssetStatus = PREVIEW_ASSET_ERROR;
}
@ -1698,7 +1698,7 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata )
else
{
runningCheckbox->set(!running);
LLNotifications::instance().add("CouldNotStartStopScript");
LLNotificationsUtil::add("CouldNotStartStopScript");
}
}
@ -1721,7 +1721,7 @@ void LLLiveLSLEditor::onReset(void *userdata)
}
else
{
LLNotifications::instance().add("CouldNotStartStopScript");
LLNotificationsUtil::add("CouldNotStartStopScript");
}
}
@ -1814,7 +1814,7 @@ void LLLiveLSLEditor::saveIfNeeded()
LLViewerObject* object = gObjectList.findObject(mObjectUUID);
if(!object)
{
LLNotifications::instance().add("SaveScriptFailObjectNotFound");
LLNotificationsUtil::add("SaveScriptFailObjectNotFound");
return;
}
@ -1822,7 +1822,7 @@ void LLLiveLSLEditor::saveIfNeeded()
{
// $NOTE: While the error message may not be exactly correct,
// it's pretty close.
LLNotifications::instance().add("SaveScriptFailObjectNotFound");
LLNotificationsUtil::add("SaveScriptFailObjectNotFound");
return;
}
@ -2023,7 +2023,7 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da
llwarns << "Unable to save text for a script." << llendl;
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("CompileQueueSaveText", args);
LLNotificationsUtil::add("CompileQueueSaveText", args);
}
else
{
@ -2082,7 +2082,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(status));
LLNotifications::instance().add("CompileQueueSaveBytecode", args);
LLNotificationsUtil::add("CompileQueueSaveBytecode", args);
}
std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,asset_uuid.asString());

View File

@ -43,7 +43,7 @@
#include "llfloaterreg.h"
#include "llimagetga.h"
#include "llinventory.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llresmgr.h"
#include "lltrans.h"
#include "lltextbox.h"
@ -353,13 +353,13 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
{
LLSD args;
args["FILE"] = self->mSaveFileName;
LLNotifications::instance().add("CannotEncodeFile", args);
LLNotificationsUtil::add("CannotEncodeFile", args);
}
else if( !image_tga->save( self->mSaveFileName ) )
{
LLSD args;
args["FILE"] = self->mSaveFileName;
LLNotifications::instance().add("CannotWriteFile", args);
LLNotificationsUtil::add("CannotWriteFile", args);
}
else
{
@ -372,7 +372,7 @@ void LLPreviewTexture::onFileLoadedForSave(BOOL success,
if( self && !success )
{
LLNotifications::instance().add("CannotDownloadFile");
LLNotificationsUtil::add("CannotDownloadFile");
}
}

View File

@ -41,7 +41,7 @@
#include "llcategory.h"
#include "llclickaction.h"
#include "llfocusmgr.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llstring.h"
#include "llviewerwindow.h"
@ -866,7 +866,7 @@ void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id)
static bool callback_deed_to_group(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LLUUID group_id;
@ -882,7 +882,7 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
void LLSidepanelTaskInfo::onClickDeedToGroup()
{
LLNotifications::instance().add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
LLNotificationsUtil::add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
}
///----------------------------------------------------------------------------
@ -1015,7 +1015,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
if (!sale_info.isForSale())
{
LLNotifications::instance().add("CantSetBuyObject");
LLNotificationsUtil::add("CantSetBuyObject");
// Set click action back to its old value
U8 click_action = 0;
@ -1033,7 +1033,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
if (!can_pay)
{
// Warn, but do it anyway.
LLNotifications::instance().add("ClickActionNotPayable");
LLNotificationsUtil::add("ClickActionNotPayable");
}
}
LLSelectMgr::getInstance()->selectionSetClickAction(click_action);

View File

@ -67,6 +67,7 @@
#include "llmessageconfig.h"
#include "llmoveview.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llteleporthistory.h"
#include "llregionhandle.h"
#include "llsd.h"
@ -445,16 +446,16 @@ bool idle_startup()
if (LLFeatureManager::getInstance()->isSafe())
{
LLNotifications::instance().add("DisplaySetToSafe");
LLNotificationsUtil::add("DisplaySetToSafe");
}
else if ((gSavedSettings.getS32("LastFeatureVersion") < LLFeatureManager::getInstance()->getVersion()) &&
(gSavedSettings.getS32("LastFeatureVersion") != 0))
{
LLNotifications::instance().add("DisplaySetToRecommended");
LLNotificationsUtil::add("DisplaySetToRecommended");
}
else if (!gViewerWindow->getInitAlert().empty())
{
LLNotifications::instance().add(gViewerWindow->getInitAlert());
LLNotificationsUtil::add(gViewerWindow->getInitAlert());
}
gSavedSettings.setS32("LastFeatureVersion", LLFeatureManager::getInstance()->getVersion());
@ -1157,7 +1158,7 @@ bool idle_startup()
LLSD args;
args["ERROR_MESSAGE"] = emsg.str();
LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL;
LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
}
//setup map of datetime strings to codes and slt & local time offset from utc
@ -1180,7 +1181,7 @@ bool idle_startup()
LLSD args;
args["ERROR_MESSAGE"] = emsg.str();
LL_INFOS("LLStartup") << "Notification: " << args << LL_ENDL;
LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
LLNotificationsUtil::add("ErrorMessage", args, LLSD(), login_alert_done);
transition_back_to_login_panel(emsg.str());
show_connect_box = true;
}
@ -1900,7 +1901,7 @@ bool idle_startup()
{
msg = "AvatarMovedLast";
}
LLNotifications::instance().add(msg);
LLNotificationsUtil::add(msg);
}
}
@ -1985,7 +1986,7 @@ bool idle_startup()
// initial outfit, but if the load hasn't started
// already then something is wrong so fall back
// to generic outfits. JC
LLNotifications::instance().add("WelcomeChooseSex", LLSD(), LLSD(),
LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(),
callback_choose_gender);
LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE;
@ -1993,7 +1994,7 @@ bool idle_startup()
if (wearables_time > MAX_WEARABLES_TIME)
{
LLNotifications::instance().add("ClothingLoading");
LLNotificationsUtil::add("ClothingLoading");
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_WEARABLES_TOO_LONG);
LLStartUp::setStartupState( STATE_CLEANUP );
return TRUE;
@ -2319,12 +2320,12 @@ bool is_hex_string(U8* str, S32 len)
void show_first_run_dialog()
{
LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
}
bool first_run_dialog_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL;
@ -2347,7 +2348,7 @@ void set_startup_status(const F32 frac, const std::string& string, const std::st
bool login_alert_status(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
// Buttons
switch( option )
{
@ -2381,7 +2382,7 @@ void use_circuit_callback(void**, S32 result)
{
// Make sure user knows something bad happened. JC
LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL;
LLNotifications::instance().add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
reset_login();
}
else
@ -2586,7 +2587,7 @@ const S32 OPT_FEMALE = 1;
bool callback_choose_gender(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
switch(option)
{
case OPT_MALE:

View File

@ -79,7 +79,7 @@
#include "llfontgl.h"
#include "llrect.h"
#include "llerror.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
#include "llstring.h"
#include "message.h"
@ -498,7 +498,7 @@ static void onClickBuyCurrency(void* data)
static void onClickHealth(void* )
{
LLNotifications::instance().add("NotSafe");
LLNotificationsUtil::add("NotSafe");
}
static void onClickScriptDebug(void*)

View File

@ -206,7 +206,7 @@ void LLToastGroupNotifyPanel::onClickAttachment()
//if attachment isn't openable - notify about saving
if (!isAttachmentOpenable(mInventoryOffer->mType)) {
LLNotifications::instance().add("AttachmentSaved");
LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD());
}
mInventoryOffer = NULL;

View File

@ -37,7 +37,7 @@
// library headers
#include "llgl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llrender.h"
#include "message.h"
@ -673,7 +673,7 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp)
LLSD args;
args["REGION"] = regionp->getName();
LLNotifications::instance().add("RegionNoTerraforming", args);
LLNotificationsUtil::add("RegionNoTerraforming", args);
}

View File

@ -39,7 +39,7 @@
#include "llfloaterreg.h"
#include "llinstantmessage.h"
#include "lldir.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
// project headers
#include "llagent.h"
@ -1074,7 +1074,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
hit_obj->fetchInventoryFromServer();
LLSD args;
args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again.";
LLNotifications::instance().add("ErrorMessage", args);
LLNotificationsUtil::add("ErrorMessage", args);
return FALSE;
}
if (hit_obj->getInventoryItemByAsset(item->getAssetUUID()))
@ -1527,14 +1527,14 @@ void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent,
LLSD payload;
payload["agent_id"] = to_agent;
payload["item_id"] = item->getUUID();
LLNotifications::instance().add("CannotCopyWarning", LLSD(), payload,
LLNotificationsUtil::add("CannotCopyWarning", LLSD(), payload,
&LLToolDragAndDrop::handleCopyProtectedItem);
}
}
// static
bool LLToolDragAndDrop::handleCopyProtectedItem(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryItem* item = NULL;
switch(option)
{
@ -1551,12 +1551,12 @@ bool LLToolDragAndDrop::handleCopyProtectedItem(const LLSD& notification, const
}
else
{
LLNotifications::instance().add("CannotGiveItem");
LLNotificationsUtil::add("CannotGiveItem");
}
break;
default: // no, cancel, whatever, who cares, not yes.
LLNotifications::instance().add("TransactionCancelled");
LLNotificationsUtil::add("TransactionCancelled");
break;
}
return false;
@ -1652,18 +1652,18 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent,
}
if(!complete)
{
LLNotifications::instance().add("IncompleteInventory");
LLNotificationsUtil::add("IncompleteInventory");
return;
}
count = items.count() + cats.count();
if(count > MAX_ITEMS)
{
LLNotifications::instance().add("TooManyItems");
LLNotificationsUtil::add("TooManyItems");
return;
}
else if(count == 0)
{
LLNotifications::instance().add("NoItems");
LLNotificationsUtil::add("NoItems");
return;
}
else
@ -1681,7 +1681,7 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent,
LLSD payload;
payload["agent_id"] = to_agent;
payload["folder_id"] = cat->getUUID();
LLNotifications::instance().add("CannotCopyCountItems", args, payload, &LLToolDragAndDrop::handleCopyProtectedCategory);
LLNotificationsUtil::add("CannotCopyCountItems", args, payload, &LLToolDragAndDrop::handleCopyProtectedCategory);
}
}
}
@ -1690,7 +1690,7 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent,
// static
bool LLToolDragAndDrop::handleCopyProtectedCategory(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLInventoryCategory* cat = NULL;
switch(option)
{
@ -1717,12 +1717,12 @@ bool LLToolDragAndDrop::handleCopyProtectedCategory(const LLSD& notification, co
}
else
{
LLNotifications::instance().add("CannotGiveCategory");
LLNotificationsUtil::add("CannotGiveCategory");
}
break;
default: // no, cancel, whatever, who cares, not yes.
LLNotifications::instance().add("TransactionCancelled");
LLNotificationsUtil::add("TransactionCancelled");
break;
}
return false;
@ -1757,12 +1757,12 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent,
S32 count = items.count() + cats.count();
if(count > MAX_ITEMS)
{
LLNotifications::instance().add("TooManyItems");
LLNotificationsUtil::add("TooManyItems");
return;
}
else if(count == 0)
{
LLNotifications::instance().add("NoItems");
LLNotificationsUtil::add("NoItems");
return;
}
else
@ -2400,7 +2400,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return ACCEPT_NO;
}
@ -2495,7 +2495,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return ACCEPT_NO;
}
}

View File

@ -49,7 +49,7 @@
#include "llworldmapmessage.h"
// library includes
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llsd.h"
class LLURLDispatcherImpl
@ -163,7 +163,7 @@ bool LLURLDispatcherImpl::dispatchApp(const std::string& url,
// (but still return true because it is a valid app SLURL)
if (! handled)
{
LLNotifications::instance().add("UnsupportedCommandSLURL");
LLNotificationsUtil::add("UnsupportedCommandSLURL");
}
return true;
}

View File

@ -33,7 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llviewerinventory.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "message.h"
#include "indra_constants.h"
@ -420,7 +420,7 @@ void LLViewerInventoryCategory::updateServer(BOOL is_new) const
if (LLFolderType::lookupIsProtectedType(mPreferredType))
{
LLNotifications::instance().add("CannotModifyProtectedCategories");
LLNotificationsUtil::add("CannotModifyProtectedCategories");
return;
}
@ -444,7 +444,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
// communicate that change with the server.
if(LLFolderType::lookupIsProtectedType(mPreferredType))
{
LLNotifications::instance().add("CannotRemoveProtectedCategories");
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
return;
}

View File

@ -47,7 +47,7 @@
#include "llpluginclassmedia.h"
#include "llevent.h" // LLSimpleListener
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "lluuid.h"
#include "llkeyboard.h"
#include "llmutelist.h"
@ -981,7 +981,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL;
LLSD args;
args["MIME_TYPE"] = media_type;
LLNotifications::instance().add("NoPlugin", args);
LLNotificationsUtil::add("NoPlugin", args);
return NULL;
}
@ -1947,7 +1947,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
// TODO: may want a different message for this case?
LLSD args;
args["PLUGIN"] = LLMIMETypes::implType(mMimeType);
LLNotifications::instance().add("MediaPluginFailed", args);
LLNotificationsUtil::add("MediaPluginFailed", args);
}
break;
@ -1962,7 +1962,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
LLSD args;
args["PLUGIN"] = LLMIMETypes::implType(mMimeType);
// SJB: This is getting called every frame if the plugin fails to load, continuously respawining the alert!
//LLNotifications::instance().add("MediaPluginFailed", args);
//LLNotificationsUtil::add("MediaPluginFailed", args);
}
break;

View File

@ -52,6 +52,7 @@
#include "llinstantmessage.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpermissionsflags.h"
#include "llrect.h"
#include "llsecondlifeurls.h"
@ -2939,7 +2940,7 @@ class LLAvatarReportAbuse : public view_listener_t
bool callback_freeze(const LLSD& notification, const LLSD& response)
{
LLUUID avatar_id = notification["payload"]["avatar_id"].asUUID();
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option || 1 == option)
{
@ -2993,14 +2994,14 @@ void handle_avatar_freeze(const LLSD& avatar_id)
{
LLSD args;
args["AVATAR_NAME"] = fullname;
LLNotifications::instance().add("FreezeAvatarFullname",
LLNotificationsUtil::add("FreezeAvatarFullname",
args,
payload,
callback_freeze);
}
else
{
LLNotifications::instance().add("FreezeAvatar",
LLNotificationsUtil::add("FreezeAvatar",
LLSD(),
payload,
callback_freeze);
@ -3040,7 +3041,7 @@ class LLAvatarDebug : public view_listener_t
bool callback_eject(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (2 == option)
{
// Cancel button.
@ -3122,14 +3123,14 @@ void handle_avatar_eject(const LLSD& avatar_id)
{
LLSD args;
args["AVATAR_NAME"] = fullname;
LLNotifications::instance().add("EjectAvatarFullname",
LLNotificationsUtil::add("EjectAvatarFullname",
args,
payload,
callback_eject);
}
else
{
LLNotifications::instance().add("EjectAvatarFullname",
LLNotificationsUtil::add("EjectAvatarFullname",
LLSD(),
payload,
callback_eject);
@ -3142,14 +3143,14 @@ void handle_avatar_eject(const LLSD& avatar_id)
{
LLSD args;
args["AVATAR_NAME"] = fullname;
LLNotifications::instance().add("EjectAvatarFullnameNoBan",
LLNotificationsUtil::add("EjectAvatarFullnameNoBan",
args,
payload,
callback_eject);
}
else
{
LLNotifications::instance().add("EjectAvatarNoBan",
LLNotificationsUtil::add("EjectAvatarNoBan",
LLSD(),
payload,
callback_eject);
@ -3232,11 +3233,11 @@ class LLAvatarGiveCard : public view_listener_t
transaction_id.generate();
msg->addUUIDFast(_PREHASH_TransactionID, transaction_id);
msg->sendReliable(dest_host);
LLNotifications::instance().add("OfferedCard", args);
LLNotificationsUtil::add("OfferedCard", args);
}
else
{
LLNotifications::instance().add("CantOfferCallingCard", old_args);
LLNotificationsUtil::add("CantOfferCallingCard", old_args);
}
}
return true;
@ -3255,7 +3256,7 @@ void login_done(S32 which, void *user)
bool callback_leave_group(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
LLMessageSystem *msg = gMessageSystem;
@ -3322,7 +3323,7 @@ void handle_buy_object(LLSaleInfo sale_info)
{
if(!LLSelectMgr::getInstance()->selectGetAllRootsValid())
{
LLNotifications::instance().add("UnableToBuyWhileDownloading");
LLNotificationsUtil::add("UnableToBuyWhileDownloading");
return;
}
@ -3331,7 +3332,7 @@ void handle_buy_object(LLSaleInfo sale_info)
BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name);
if (!owners_identical)
{
LLNotifications::instance().add("CannotBuyObjectsFromDifferentOwners");
LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners");
return;
}
@ -3341,7 +3342,7 @@ void handle_buy_object(LLSaleInfo sale_info)
valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm);
if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID()))
{
LLNotifications::instance().add("ObjectNotForSale");
LLNotificationsUtil::add("ObjectNotForSale");
return;
}
@ -3505,12 +3506,12 @@ void set_god_level(U8 god_level)
if(god_level > GOD_NOT)
{
args["LEVEL"] = llformat("%d",(S32)god_level);
LLNotifications::instance().add("EnteringGodMode", args);
LLNotificationsUtil::add("EnteringGodMode", args);
}
else
{
args["LEVEL"] = llformat("%d",(S32)old_god_level);
LLNotifications::instance().add("LeavingGodMode", args);
LLNotificationsUtil::add("LeavingGodMode", args);
}
// changing god-level can affect which menus we see
@ -3631,7 +3632,7 @@ void request_friendship(const LLUUID& dest_id)
}
else
{
LLNotifications::instance().add("CantOfferFriendship");
LLNotificationsUtil::add("CantOfferFriendship");
}
}
}
@ -3962,7 +3963,7 @@ void handle_claim_public_land(void*)
{
if (LLViewerParcelMgr::getInstance()->getSelectionRegion() != gAgent.getRegion())
{
LLNotifications::instance().add("ClaimPublicLand");
LLNotificationsUtil::add("ClaimPublicLand");
return;
}
@ -4158,7 +4159,7 @@ void derez_objects(EDeRezDestination dest, const LLUUID& dest_id)
}
else if(!error.empty())
{
LLNotifications::instance().add(error);
LLNotificationsUtil::add(error);
}
}
@ -4179,13 +4180,13 @@ class LLObjectReturn : public view_listener_t
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
LLNotifications::instance().add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
LLNotificationsUtil::add("ReturnToOwner", LLSD(), LLSD(), boost::bind(&LLObjectReturn::onReturnToOwner, this, _1, _2));
return true;
}
bool onReturnToOwner(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
// Ignore category ID for this derez destination.
@ -4362,7 +4363,7 @@ void handle_take()
bool confirm_take(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(enable_take() && (option == 0))
{
derez_objects(DRD_TAKE_INTO_AGENT_INVENTORY, notification["payload"]["folder_id"].asUUID());
@ -4537,7 +4538,7 @@ S32 selection_price()
/*
bool callback_show_buy_currency(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
llinfos << "Loading page " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL") << llendl;
@ -4563,7 +4564,7 @@ void show_buy_currency(const char* extra)
{
args["EXTRA"] = extra;
}
LLNotifications::instance().add("PromptGoToCurrencyPage", args);//, LLSD(), callback_show_buy_currency);
LLNotificationsUtil::add("PromptGoToCurrencyPage", args);//, LLSD(), callback_show_buy_currency);
}
void handle_buy()
@ -4833,7 +4834,7 @@ class LLToolsLink : public view_listener_t
{
if(!LLSelectMgr::getInstance()->selectGetAllRootsValid())
{
LLNotifications::instance().add("UnableToLinkWhileDownloading");
LLNotificationsUtil::add("UnableToLinkWhileDownloading");
return true;
}
@ -4844,18 +4845,18 @@ class LLToolsLink : public view_listener_t
args["COUNT"] = llformat("%d", object_count);
int max = MAX_CHILDREN_PER_TASK+1;
args["MAX"] = llformat("%d", max);
LLNotifications::instance().add("UnableToLinkObjects", args);
LLNotificationsUtil::add("UnableToLinkObjects", args);
return true;
}
if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() < 2)
{
LLNotifications::instance().add("CannotLinkIncompleteSet");
LLNotificationsUtil::add("CannotLinkIncompleteSet");
return true;
}
if(!LLSelectMgr::getInstance()->selectGetRootsModify())
{
LLNotifications::instance().add("CannotLinkModify");
LLNotificationsUtil::add("CannotLinkModify");
return true;
}
LLUUID owner_id;
@ -4865,7 +4866,7 @@ class LLToolsLink : public view_listener_t
// we don't actually care if you're the owner, but novices are
// the most likely to be stumped by this one, so offer the
// easiest and most likely solution.
LLNotifications::instance().add("CannotLinkDifferentOwners");
LLNotificationsUtil::add("CannotLinkDifferentOwners");
return true;
}
LLSelectMgr::getInstance()->sendLink();
@ -5349,7 +5350,7 @@ class LLWorldSetBusy : public view_listener_t
else
{
gAgent.setBusy();
LLNotifications::instance().add("BusyModeSet");
LLNotificationsUtil::add("BusyModeSet");
}
return true;
}
@ -5465,7 +5466,7 @@ class LLAvatarAddContact : public view_listener_t
bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
gAgent.clearBusy();
@ -5691,7 +5692,7 @@ class LLShowSidetrayPanel : public view_listener_t
bool callback_show_url(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LLWeb::loadURL(notification["payload"]["url"].asString());
@ -5714,7 +5715,7 @@ class LLPromptShowURL : public view_listener_t
{
LLSD payload;
payload["url"] = url;
LLNotifications::instance().add(alert, LLSD(), payload, callback_show_url);
LLNotificationsUtil::add(alert, LLSD(), payload, callback_show_url);
}
else
{
@ -5731,7 +5732,7 @@ class LLPromptShowURL : public view_listener_t
bool callback_show_file(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LLWeb::loadURL(notification["payload"]["url"]);
@ -5752,7 +5753,7 @@ class LLPromptShowFile : public view_listener_t
LLSD payload;
payload["url"] = file;
LLNotifications::instance().add(alert, LLSD(), payload, callback_show_file);
LLNotificationsUtil::add(alert, LLSD(), payload, callback_show_file);
}
else
{
@ -6323,12 +6324,12 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
if ( !func.scripted )
{
std::string noscriptmsg = std::string("Cannot") + msg + "SelectObjectsNoScripts";
LLNotifications::instance().add(noscriptmsg);
LLNotificationsUtil::add(noscriptmsg);
}
else if ( !func.modifiable )
{
std::string nomodmsg = std::string("Cannot") + msg + "SelectObjectsNoPermission";
LLNotifications::instance().add(nomodmsg);
LLNotificationsUtil::add(nomodmsg);
}
else
{
@ -7137,7 +7138,7 @@ void handle_save_to_xml(void*)
LLFloater* frontmost = gFloaterView->getFrontmost();
if (!frontmost)
{
LLNotifications::instance().add("NoFrontmostFloater");
LLNotificationsUtil::add("NoFrontmostFloater");
return;
}

View File

@ -61,7 +61,7 @@
#include "llassetuploadresponders.h"
#include "lleconomy.h"
#include "llhttpclient.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "llstring.h"
#include "lltransactiontypes.h"
@ -176,7 +176,7 @@ const std::string upload_pick(void* data)
// No extension
LLSD args;
args["FILE"] = short_name;
LLNotifications::instance().add("NoFileExtension", args);
LLNotificationsUtil::add("NoFileExtension", args);
return std::string();
}
else
@ -219,7 +219,7 @@ const std::string upload_pick(void* data)
LLSD args;
args["EXTENSION"] = ext;
args["VALIDS"] = valid_extensions;
LLNotifications::instance().add("InvalidFileExtension", args);
LLNotificationsUtil::add("InvalidFileExtension", args);
return std::string();
}
}//end else (non-null extension)
@ -237,7 +237,7 @@ const std::string upload_pick(void* data)
llinfos << error_msg << ": " << filename << llendl;
LLSD args;
args["FILE"] = filename;
LLNotifications::instance().add( error_msg, args );
LLNotificationsUtil::add( error_msg, args );
return std::string();
}
}//end if a wave/sound file
@ -339,7 +339,7 @@ class LLFileUploadBulk : public view_listener_t
void upload_error(const std::string& error_message, const std::string& label, const std::string& filename, const LLSD& args)
{
llwarns << error_message << llendl;
LLNotifications::instance().add(label, args);
LLNotificationsUtil::add(label, args);
if(LLFile::remove(filename) == -1)
{
lldebugs << "unable to remove temp file" << llendl;
@ -793,7 +793,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
llwarns << error_message << llendl;
LLSD args;
args["ERROR_MESSAGE"] = error_message;
LLNotifications::instance().add("ErrorMessage", args);
LLNotificationsUtil::add("ErrorMessage", args);
if(LLFile::remove(filename) == -1)
{
lldebugs << "unable to remove temp file" << llendl;
@ -882,7 +882,7 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt
LLSD args;
args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType);
args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
LLNotifications::instance().add("CannotUploadReason", args);
LLNotificationsUtil::add("CannotUploadReason", args);
}
LLUploadDialog::modalUploadFinished();

View File

@ -97,6 +97,7 @@
#include "llmutelist.h"
#include "llnearbychat.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llnotify.h"
#include "llpanelgrouplandmoney.h"
#include "llpanelplaces.h"
@ -211,7 +212,7 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLMessageSystem* msg = gMessageSystem;
const LLSD& payload = notification["payload"];
@ -636,7 +637,7 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain)
bool join_group_response(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
BOOL delete_context_data = TRUE;
bool accept_invite = false;
@ -651,7 +652,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
LLGroupActions::show(group_id);
LLSD args;
args["MESSAGE"] = message;
LLNotifications::instance().add("JoinGroup", args, notification["payload"]);
LLNotificationsUtil::add("JoinGroup", args, notification["payload"]);
return false;
}
if(option == 0 && !group_id.isNull())
@ -670,7 +671,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
LLSD args;
args["NAME"] = name;
args["INVITE"] = message;
LLNotifications::instance().add("JoinedTooManyGroupsMember", args, notification["payload"]);
LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]);
}
}
@ -687,7 +688,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response)
// asking about a fee.
LLSD next_payload = notification["payload"];
next_payload["fee"] = 0;
LLNotifications::instance().add("JoinGroupCanAfford",
LLNotificationsUtil::add("JoinGroupCanAfford",
args,
next_payload);
}
@ -913,7 +914,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
LLSD args;
args["LANDMARK_NAME"] = item->getName();
args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
LLNotifications::instance().add("LandmarkCreated", args);
LLNotificationsUtil::add("LandmarkCreated", args);
// Created landmark is passed to Places panel to allow its editing.
LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
@ -1070,7 +1071,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
{
LLChat chat;
std::string log_message;
S32 button = LLNotification::getSelectedOption(notification, response);
S32 button = LLNotificationsUtil::getSelectedOption(notification, response);
// For muting, we need to add the mute, then decline the offer.
// This must be done here because:
@ -1402,7 +1403,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
}
else
{
option = LLNotification::getSelectedOption(notification, response);
option = LLNotificationsUtil::getSelectedOption(notification, response);
}
LLUUID from_id = notification["payload"]["from_id"].asUUID();
@ -1433,7 +1434,7 @@ static LLNotificationFunctorRegistration lure_callback_reg("TeleportOffered", lu
bool goto_url_callback(const LLSD& notification, const LLSD& response)
{
std::string url = notification["payload"]["url"].asString();
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if(1 == option)
{
LLWeb::loadURL(url);
@ -1444,7 +1445,7 @@ static LLNotificationFunctorRegistration goto_url_callback_reg("GotoURL", goto_u
bool inspect_remote_object_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
LLFloaterReg::showInstance("inspect_remote_object", notification["payload"]);
@ -1532,7 +1533,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Note: don't put the message in the IM history, even though was sent
// via the IM mechanism.
LLNotifications::instance().add("SystemMessageTip",args);
LLNotificationsUtil::add("SystemMessageTip",args);
break;
case IM_NOTHING_SPECIAL:
@ -1604,7 +1605,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Message to everyone from GOD
args["NAME"] = name;
args["MESSAGE"] = message;
LLNotifications::instance().add("GodMessage", args);
LLNotificationsUtil::add("GodMessage", args);
// Treat like a system message and put in chat history.
// Claim to be from a local agent so it doesn't go into
@ -1683,7 +1684,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// This is a block, modeless dialog.
//*TODO: Translate
args["MESSAGE"] = message;
LLNotifications::instance().add("SystemMessage", args);
LLNotificationsUtil::add("SystemMessage", args);
}
break;
case IM_GROUP_NOTICE:
@ -1816,7 +1817,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD args;
args["MESSAGE"] = message;
LLNotifications::instance().add("JoinGroup", args, payload, join_group_response);
LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response);
}
}
break;
@ -1893,13 +1894,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
args["NAME"] = name;
LLNotifications::instance().add("InventoryAccepted", args);
LLNotificationsUtil::add("InventoryAccepted", args);
break;
}
case IM_INVENTORY_DECLINED:
{
args["NAME"] = name;
LLNotifications::instance().add("InventoryDeclined", args);
LLNotificationsUtil::add("InventoryDeclined", args);
break;
}
// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856
@ -1981,7 +1982,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
payload["groupowned"] = "true";
}
LLNotifications::instance().add("ServerObjectMessage", substitutions, payload);
LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload);
}
break;
case IM_FROM_TASK_AS_ALERT:
@ -1993,7 +1994,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Construct a viewer alert for this message.
args["NAME"] = name;
args["MESSAGE"] = message;
LLNotifications::instance().add("ObjectMessage", args);
LLNotificationsUtil::add("ObjectMessage", args);
}
break;
case IM_BUSY_AUTO_RESPONSE:
@ -2030,7 +2031,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["from_id"] = from_id;
payload["lure_id"] = session_id;
payload["godlike"] = FALSE;
LLNotifications::instance().add("TeleportOffered", args, payload);
LLNotificationsUtil::add("TeleportOffered", args, payload);
}
}
break;
@ -2067,7 +2068,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
args["URL"] = url;
LLSD payload;
payload["url"] = url;
LLNotifications::instance().add("GotoURL", args, payload );
LLNotificationsUtil::add("GotoURL", args, payload );
}
break;
@ -2094,12 +2095,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if(message.empty())
{
//support for frienship offers from clients before July 2008
LLNotifications::instance().add("OfferFriendshipNoMessage", args, payload);
LLNotificationsUtil::add("OfferFriendshipNoMessage", args, payload);
}
else
{
args["[MESSAGE]"] = message;
LLNotifications::instance().add("OfferFriendship", args, payload);
LLNotificationsUtil::add("OfferFriendship", args, payload);
}
}
}
@ -2119,7 +2120,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
args["NAME"] = name;
LLSD payload;
payload["from_id"] = from_id;
LLNotifications::instance().add("FriendshipAccepted", args, payload);
LLNotificationsUtil::add("FriendshipAccepted", args, payload);
}
break;
@ -2160,7 +2161,7 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id)
bool callingcard_offer_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLUUID fid;
LLUUID from_id;
LLMessageSystem* msg = gMessageSystem;
@ -2239,7 +2240,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
}
else
{
LLNotifications::instance().add("OfferCallingCard", args, payload);
LLNotificationsUtil::add("OfferCallingCard", args, payload);
}
}
else
@ -2250,12 +2251,12 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
void process_accept_callingcard(LLMessageSystem* msg, void**)
{
LLNotifications::instance().add("CallingCardAccepted");
LLNotificationsUtil::add("CallingCardAccepted");
}
void process_decline_callingcard(LLMessageSystem* msg, void**)
{
LLNotifications::instance().add("CallingCardDeclined");
LLNotificationsUtil::add("CallingCardDeclined");
}
@ -2590,13 +2591,13 @@ public:
{ // Show notification that they can now teleport to landmarks. Use a random landmark from the inventory
S32 random_land = ll_rand( land_items.count() - 1 );
args["NAME"] = land_items[random_land]->getName();
LLNotifications::instance().add("TeleportToLandmark",args);
LLNotificationsUtil::add("TeleportToLandmark",args);
}
if ( card_items.count() > 0 )
{ // Show notification that they can now contact people. Use a random calling card from the inventory
S32 random_card = ll_rand( card_items.count() - 1 );
args["NAME"] = card_items[random_card]->getName();
LLNotifications::instance().add("TeleportToPerson",args);
LLNotificationsUtil::add("TeleportToPerson",args);
}
gInventory.removeObserver(this);
@ -2973,7 +2974,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
LLSD args;
args["URL"] = url;
LLNotifications::instance().add("ServerVersionChanged", args);
LLNotificationsUtil::add("ServerVersionChanged", args);
}
gLastVersionChannel = version_channel;
@ -4192,7 +4193,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
// *TODO: Translate
LLSD args;
args["MESSAGE"] = desc;
LLNotifications::instance().add("SystemMessage", args);
LLNotificationsUtil::add("SystemMessage", args);
// Once the 'recent' container gets large enough, chop some
// off the beginning.
@ -4210,7 +4211,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
bool handle_special_notification_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
@ -4231,18 +4232,18 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess);
// we're going to throw the LLSD in there in case anyone ever wants to use it
LLNotifications::instance().add(notificationID+"_Notify", llsdBlock);
LLNotificationsUtil::add(notificationID+"_Notify", llsdBlock);
if (regionAccess == SIM_ACCESS_MATURE)
{
if (gAgent.isTeen())
{
LLNotifications::instance().add(notificationID+"_KB", llsdBlock);
LLNotificationsUtil::add(notificationID+"_KB", llsdBlock);
return true;
}
else if (gAgent.prefersPG())
{
LLNotifications::instance().add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
LLNotificationsUtil::add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
return true;
}
}
@ -4250,12 +4251,12 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
{
if (!gAgent.isAdult())
{
LLNotifications::instance().add(notificationID+"_KB", llsdBlock);
LLNotificationsUtil::add(notificationID+"_KB", llsdBlock);
return true;
}
else if (gAgent.prefersPG() || gAgent.prefersMature())
{
LLNotifications::instance().add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
LLNotificationsUtil::add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
return true;
}
}
@ -4315,7 +4316,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
}
}
LLNotifications::instance().add(notificationID, llsdBlock);
LLNotificationsUtil::add(notificationID, llsdBlock);
return true;
}
return false;
@ -4381,14 +4382,14 @@ void process_alert_core(const std::string& message, BOOL modal)
// Allow the server to spawn a named alert so that server alerts can be
// translated out of English.
std::string alert_name(message.substr(ALERT_PREFIX.length()));
LLNotifications::instance().add(alert_name);
LLNotificationsUtil::add(alert_name);
}
else if (message.find(NOTIFY_PREFIX) == 0)
{
// Allow the server to spawn a named notification so that server notifications can be
// translated out of English.
std::string notify_name(message.substr(NOTIFY_PREFIX.length()));
LLNotifications::instance().add(notify_name);
LLNotificationsUtil::add(notify_name);
}
else if (message[0] == '/')
{
@ -4400,20 +4401,20 @@ void process_alert_core(const std::string& message, BOOL modal)
S32 mins = 0;
LLStringUtil::convertToS32(text.substr(18), mins);
args["MINUTES"] = llformat("%d",mins);
LLNotifications::instance().add("RegionRestartMinutes", args);
LLNotificationsUtil::add("RegionRestartMinutes", args);
}
else if (text.substr(0,17) == "RESTART_X_SECONDS")
{
S32 secs = 0;
LLStringUtil::convertToS32(text.substr(18), secs);
args["SECONDS"] = llformat("%d",secs);
LLNotifications::instance().add("RegionRestartSeconds", args);
LLNotificationsUtil::add("RegionRestartSeconds", args);
}
else
{
std::string new_msg =LLNotifications::instance().getGlobalString(text);
args["MESSAGE"] = new_msg;
LLNotifications::instance().add("SystemMessage", args);
LLNotificationsUtil::add("SystemMessage", args);
}
}
else if (modal)
@ -4421,14 +4422,14 @@ void process_alert_core(const std::string& message, BOOL modal)
LLSD args;
std::string new_msg =LLNotifications::instance().getGlobalString(message);
args["ERROR_MESSAGE"] = new_msg;
LLNotifications::instance().add("ErrorMessage", args);
LLNotificationsUtil::add("ErrorMessage", args);
}
else
{
LLSD args;
std::string new_msg =LLNotifications::instance().getGlobalString(message);
args["MESSAGE"] = new_msg;
LLNotifications::instance().add("SystemMessageTip", args);
LLNotificationsUtil::add("SystemMessageTip", args);
}
}
@ -4644,7 +4645,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
bool script_question_cb(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLMessageSystem *msg = gMessageSystem;
S32 orig = notification["payload"]["questions"].asInteger();
S32 new_questions = orig;
@ -4708,10 +4709,10 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
if (response["Details"])
{
// respawn notification...
LLNotifications::instance().add(notification["name"], notification["substitutions"], notification["payload"]);
LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]);
// ...with description on top
LLNotifications::instance().add("DebitPermissionDetails");
LLNotificationsUtil::add("DebitPermissionDetails");
}
return false;
}
@ -4808,12 +4809,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
{
// display the caution permissions prompt
LLNotifications::instance().add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
}
else
{
// fall back to default behavior if cautions are entirely disabled
LLNotifications::instance().add("ScriptQuestion", args, payload);
LLNotificationsUtil::add("ScriptQuestion", args, payload);
}
}
@ -5013,7 +5014,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
}
LLNotifications::instance().add("CouldNotTeleportReason", args);
LLNotificationsUtil::add("CouldNotTeleportReason", args);
// Let the interested parties know that teleport failed.
LLViewerParcelMgr::getInstance()->onTeleportFailed();
@ -5146,7 +5147,7 @@ void send_group_notice(const LLUUID& group_id,
bool handle_lure_callback(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(0 == option)
{
@ -5193,11 +5194,11 @@ void handle_lure(const std::vector<LLUUID>& ids)
}
if (gAgent.isGodlike())
{
LLNotifications::instance().add("OfferTeleportFromGod", edit_args, payload, handle_lure_callback);
LLNotificationsUtil::add("OfferTeleportFromGod", edit_args, payload, handle_lure_callback);
}
else
{
LLNotifications::instance().add("OfferTeleport", edit_args, payload, handle_lure_callback);
LLNotificationsUtil::add("OfferTeleport", edit_args, payload, handle_lure_callback);
}
}
@ -5401,7 +5402,7 @@ std::vector<LLSD> gLoadUrlList;
bool callback_load_url(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
@ -5446,7 +5447,7 @@ void callback_load_url_name(const LLUUID& id, const std::string& first, const st
args["OBJECTNAME"] = load_url_info["object_name"].asString();
args["NAME"] = owner_name;
LLNotifications::instance().add("LoadWebPage", args, load_url_info);
LLNotificationsUtil::add("LoadWebPage", args, load_url_info);
}
else
{
@ -5501,7 +5502,7 @@ void callback_download_complete(void** data, S32 result, LLExtStat ext_status)
std::string* filepath = (std::string*)data;
LLSD args;
args["DOWNLOAD_PATH"] = *filepath;
LLNotifications::instance().add("FinishedRawDownload", args);
LLNotificationsUtil::add("FinishedRawDownload", args);
delete filepath;
}

View File

@ -43,7 +43,7 @@
#include "message.h"
#include "llviewermediafocus.h"
#include "llviewerparcelmediaautoplay.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llfirstuse.h"
#include "llpluginclassmedia.h"
#include "llviewertexture.h"
@ -111,7 +111,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
// First use warning
if( ! mediaUrl.empty() && gWarningSettings.getBOOL("FirstStreamingVideo") )
{
LLNotifications::instance().add("ParcelCanPlayMedia", LLSD(), LLSD(),
LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
boost::bind(callback_play_media, _1, _2, parcel));
return;
@ -167,7 +167,7 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
{
gWarningSettings.setBOOL("QuickTimeInstalled", FALSE);
LLNotifications::instance().add("NoQuickTime" );
LLNotificationsUtil::add("NoQuickTime" );
};
}
}
@ -590,7 +590,7 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);

Some files were not shown because too many files have changed in this diff Show More