diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 143d95d27e..8aa642bdb6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -38,6 +38,7 @@ #include "llavataractions.h" #include "lscript_byteformat.h" #include "lleconomy.h" +#include "lleventtimer.h" #include "llfloaterreg.h" #include "llfollowcamparams.h" #include "llregionhandle.h" @@ -866,6 +867,10 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f } LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. @@ -914,12 +919,13 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f { // Landmark creation handling is moved to LLPanelPlaces::showAddedLandmarkInfo() // TODO* LLPanelPlaces dependency is going to be removed. See EXT-4347. - if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem()) - { - //places_panel->setItem(item); - } + //if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem()) + //{ + // places_panel->setItem(item); + //} + //else // we are opening a group notice attachment - else + if("create_landmark" != places_panel->getPlaceInfoType()) { LLSD args; args["type"] = "landmark"; @@ -1261,10 +1267,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& gInventory.addObserver(opener); } - // Remove script dialog because there is no need in it no more. - LLUUID object_id = notification["payload"]["object_id"].asUUID(); - LLScriptFloaterManager::instance().removeNotificationByObjectId(object_id); - delete this; return false; } @@ -1304,13 +1306,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); LLInventoryObserver* opener = NULL; - LLViewerInventoryCategory* catp = NULL; - catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID); - LLViewerInventoryItem* itemp = NULL; - if(!catp) - { - itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); - } std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. @@ -1438,10 +1433,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const gInventory.addObserver(opener); } - // Remove script dialog because there is no need in it no more. - LLUUID object_id = notification["payload"]["object_id"].asUUID(); - LLScriptFloaterManager::instance().removeNotificationByObjectId(object_id); - delete this; return false; } @@ -1592,7 +1583,6 @@ void inventory_offer_handler(LLOfferInfo* info) { payload["give_inventory_notification"] = TRUE; LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); - LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID()); } } } @@ -1849,6 +1839,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { + /* + EXT-5099 + currently there is no way to store in history only... + using LLNotificationsUtil::add will add message to Nearby Chat + // muted user, so don't start an IM session, just record line in chat // history. Pretend the chat is from a local agent, // so it will go into the history but not be shown on screen. @@ -1856,6 +1851,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = buffer; LLNotificationsUtil::add("SystemMessageTip", args); + */ } } break; |