diff options
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index fbd86d0edf..266fa4dd74 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -35,10 +35,13 @@ #include "message.h" #include "lltooldraganddrop.h" +// library headers #include "llfloaterreg.h" #include "llinstantmessage.h" #include "lldir.h" +#include "llnotificationsutil.h" +// project headers #include "llagent.h" #include "llagentwearables.h" #include "llviewercontrol.h" @@ -1071,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())) @@ -1524,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) { @@ -1548,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; @@ -1649,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 @@ -1678,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); } } } @@ -1687,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) { @@ -1714,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; @@ -1754,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 @@ -2397,7 +2400,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( // destroy clothing items. if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } @@ -2492,7 +2495,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( // destroy clothing items. if (!gAgentWearables.areWearablesLoaded()) { - LLNotifications::instance().add("CanNotChangeAppearanceUntilLoaded"); + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } } |