diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-17 12:02:54 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-17 12:02:54 +0100 |
| commit | 06884cf1371d4c1ee02d337242e46b0f3bbe8837 (patch) | |
| tree | 9255ad9db22916ae0add7cae37705e58aa9c465e /indra/newview/llviewermessage.cpp | |
| parent | 663d8f7870c2858956aea8ab20129fd084a96dc8 (diff) | |
| parent | d69084d5d86d551adbc9721276aa60959b7d7899 (diff) | |
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ab35df1101..360c6be2c6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1636,6 +1636,18 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const return false; } +class LLPostponedOfferNotification: public LLPostponedNotification +{ +protected: + /* virtual */ + void modifyNotificationParams() + { + LLSD substitutions = mParams.substitutions; + substitutions["NAME"] = mName; + mParams.substitutions = substitutions; + } +}; + void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1785,7 +1797,10 @@ void inventory_offer_handler(LLOfferInfo* info) // Inform user that there is a script floater via toast system { payload["give_inventory_notification"] = TRUE; - LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); + LLNotification::Params params(p.name); + params.substitutions = p.substitutions; + params.payload = p.payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, info->mFromID, false); } } } @@ -2557,7 +2572,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; - LLNotificationsUtil::add("TeleportOffered", args, payload); + + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } break; @@ -2626,7 +2645,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { args["[MESSAGE]"] = message; - LLNotificationsUtil::add("OfferFriendship", args, payload); + LLNotification::Params params("OfferFriendship"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } } |
