summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5b49ccb5df..a44ce07d76 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -50,6 +50,8 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorypanel.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
#include "llpreviewtexture.h"
@@ -1703,7 +1705,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
@@ -2762,7 +2764,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)
{
@@ -2851,7 +2853,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
BOOL drop)
{
LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
+ if(!model || !inv_item) return FALSE;
// cannot drag into library
if(!isAgentInventory())
@@ -3335,7 +3337,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)
@@ -3365,7 +3367,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);
}
*/
}
@@ -3992,7 +3994,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
@@ -4009,11 +4011,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());
@@ -4426,7 +4428,7 @@ void LLWearableBridge::openItem()
/*
if( isInTrash() )
{
- LLNotifications::instance().add("CannotWearTrash");
+ LLNotificationsUtil::add("CannotWearTrash");
}
else if(isAgentInventory())
{
@@ -4455,7 +4457,7 @@ void LLWearableBridge::openItem()
{
// *TODO: We should fetch the item details, and then do
// the operation above.
- LLNotifications::instance().add("CannotWearInfoNotComplete");
+ LLNotificationsUtil::add("CannotWearInfoNotComplete");
}
}
*/
@@ -4569,7 +4571,7 @@ void LLWearableBridge::wearOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
- LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+ LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@@ -4600,7 +4602,7 @@ void LLWearableBridge::wearAddOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
- LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+ LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@@ -4901,7 +4903,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();
@@ -5001,7 +5003,7 @@ void LLWearableBridgeAction::wearOnAvatar()
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
- LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+ LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return;
}
@@ -5031,7 +5033,7 @@ void LLWearableBridgeAction::doIt()
{
if(isInTrash())
{
- LLNotifications::instance().add("CannotWearTrash");
+ LLNotificationsUtil::add("CannotWearTrash");
}
else if(isAgentInventory())
{
@@ -5060,7 +5062,7 @@ void LLWearableBridgeAction::doIt()
{
// *TODO: We should fetch the item details, and then do
// the operation above.
- LLNotifications::instance().add("CannotWearInfoNotComplete");
+ LLNotificationsUtil::add("CannotWearInfoNotComplete");
}
}