diff options
author | Leslie Linden <leslie@lindenlab.com> | 2012-01-17 14:59:18 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2012-01-17 14:59:18 -0800 |
commit | e4b63c96b83a1ed8c18946ecd64c21d6bd7c26fe (patch) | |
tree | d9c5e7a8f15a8d7fa3bf1d20aded3dee34a7f058 /indra/newview/llinventoryfunctions.cpp | |
parent | accf83394513c82e98fffa15bc0131ee25f63f00 (diff) |
EXP-1804 FIX -- Drag and drop operations can be blocked by modal dialogs
* Added support for marketplace notifications that don't display the dialog
until the next frame, leaving room for the drag and drop operation to
properly complete before the notification shows up and interferes.
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 40bc3b76c9..dd92188e9d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -58,6 +58,7 @@ #include "llinventorymodel.h" #include "llinventorypanel.h" #include "lllineeditor.h" +#include "llmarketplacenotifications.h" #include "llmenugl.h" #include "llnotificationsutil.h" #include "llpanelmaininventory.h" @@ -533,9 +534,6 @@ void show_item_original(const LLUUID& item_uuid) } -static S32 move_to_outbox_operation_id = -1; -static std::list<LLSD> move_to_outbox_payloads; - void open_outbox() { LLFloaterReg::showInstance("outbox"); @@ -614,24 +612,6 @@ void move_to_outbox_cb_action(const LLSD& payload) } } -void move_to_outbox_cb(const LLSD& notification, const LLSD& response) -{ - const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - if (option == 0) - { - llassert(move_to_outbox_payloads.size() > 0); - - BOOST_FOREACH(const LLSD& payload, move_to_outbox_payloads) - { - move_to_outbox_cb_action(payload); - } - } - - move_to_outbox_operation_id = -1; - move_to_outbox_payloads.clear(); -} - void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder, S32 operation_id) { // Collapse links directly to items/folders @@ -668,25 +648,14 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL open_outbox(); } else - { - LLSD args; - args["ITEM_NAME"] = inv_item->getName(); - + { LLSD payload; payload["item_id"] = inv_item->getUUID(); payload["dest_folder_id"] = dest_folder; payload["top_level_folder"] = top_level_folder; payload["operation_id"] = operation_id; - - if (move_to_outbox_operation_id != operation_id) - { - LLNotificationsUtil::add("ConfirmNoCopyToOutbox", args, payload, boost::bind(&move_to_outbox_cb, _1, _2)); - - move_to_outbox_operation_id = operation_id; - move_to_outbox_payloads.clear(); - } - - move_to_outbox_payloads.push_back(payload); + + LLMarketplaceInventoryNotifications::addNoCopyNotification(payload, move_to_outbox_cb_action); } } } |