Added LLNotificationsUtil and switched LLNotifications::instance().add to LLNotificationsUtil::add in a bazillion places.

This commit is contained in:
Shyotl
2011-09-03 19:30:42 -05:00
parent 7b2aa741aa
commit 417f5084b4
124 changed files with 912 additions and 623 deletions

View File

@@ -67,6 +67,8 @@
#include "llinventoryclipboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewlandmark.h"
@@ -1876,7 +1878,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
@@ -2932,7 +2934,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)
{
@@ -3412,7 +3414,7 @@ void open_landmark(LLViewerInventoryItem* inv_item,
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();
LLUUID item_id = notification["payload"]["item_id"].asUUID();
@@ -3446,7 +3448,7 @@ void LLLandmarkBridge::openItem()
LLSD payload;
payload["asset_id"] = item->getAssetUUID();
payload["item_id"] = item->getUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload);
}
}
@@ -4192,7 +4194,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach
if ( (rlv_handler_t::isEnabled()) && ((gRlvAttachmentLocks.canAttach(attachment) & RLV_WEAR_REPLACE) == 0) )
return;
// [/RLVa:KB]
LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez);
LLNotificationsUtil::add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez);
}
else
{
@@ -4211,11 +4213,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*/)
{
LLUUID item_id = notification["payload"]["item_id"].asUUID();
@@ -4848,7 +4850,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
if( !wearable_count && !obj_count && !gest_count)
{
LLNotifications::instance().add("CouldNotPutOnOutfit");
LLNotificationsUtil::add("CouldNotPutOnOutfit");
delete wear_info;
return;
}
@@ -5260,7 +5262,7 @@ void LLWearableBridge::openItem()
{
if( isItemInTrash() )
{
LLNotifications::instance().add("CannotWearTrash");
LLNotificationsUtil::add("CannotWearTrash");
}
else if(isAgentInventory())
{
@@ -5293,7 +5295,7 @@ void LLWearableBridge::openItem()
{
// *TODO: We should fetch the item details, and then do
// the operation above.
LLNotifications::instance().add("CannotWearInfoNotComplete");
LLNotificationsUtil::add("CannotWearInfoNotComplete");
}
}
}
@@ -5417,7 +5419,7 @@ void LLWearableBridge::wearOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}