summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-01 12:52:21 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-01 12:52:21 -0500
commit27351b8bf59c3b2cfc31c27947397055a40b52d7 (patch)
tree6720e5dc77c8fee7f7fdecb46f220fb30247efb0 /indra/newview/lltooldraganddrop.cpp
parentc361ee133761412acf766f6680b14e29e60f8a1e (diff)
parent677938e6531209ca9ccd29146454af67f1c743c7 (diff)
automated merge for viewer-2.0 -> avp.
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 0790838d3d..81dcfb6a4f 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -33,6 +33,9 @@
#include "llviewerprecompiledheaders.h"
#include "lltooldraganddrop.h"
+// library headers
+#include "llnotificationsutil.h"
+// project headers
#include "llagent.h"
#include "llagentui.h"
#include "llagentwearables.h"
@@ -978,7 +981,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()))
@@ -1431,14 +1434,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)
{
@@ -1455,12 +1458,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;
@@ -1556,18 +1559,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
@@ -1585,7 +1588,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);
}
}
}
@@ -1594,7 +1597,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)
{
@@ -1621,12 +1624,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;
@@ -1661,12 +1664,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
@@ -2305,7 +2308,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
- LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+ LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return ACCEPT_NO;
}
@@ -2400,7 +2403,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
// destroy clothing items.
if (!gAgentWearables.areWearablesLoaded())
{
- LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded");
+ LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded");
return ACCEPT_NO;
}
}