From 367b77eb1b87ba55fd4a94e9b2630a7d002d4399 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 12 May 2010 14:10:26 +0300 Subject: EXT-6783 FIXED Made notifications that are saved into notification well window be persisted and offer notifications non-persisted. reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/368/ --HG-- branch : product-engine --- indra/newview/llfloatersellland.cpp | 8 +- indra/newview/llnotificationstorage.cpp | 5 +- indra/newview/lltoastnotifypanel.cpp | 5 +- indra/newview/llviewermessage.cpp | 3 +- .../newview/skins/default/xui/en/notifications.xml | 93 +++++++++++++++++++++- 5 files changed, 102 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 980b456497..9dddbd998a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -94,7 +94,6 @@ private: static void doSellLand(void *userdata); bool onConfirmSale(const LLSD& notification, const LLSD& response); static void doShowObjects(void *userdata); - static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); void callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids); @@ -102,6 +101,7 @@ public: virtual BOOL postBuild(); bool setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel); + static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); }; // static @@ -423,11 +423,13 @@ void LLFloaterSellLandUI::doShowObjects(void *userdata) send_parcel_select_objects(parcel->getLocalID(), RT_SELL); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration LLNotificationsUtil::add("TransferObjectsHighlighted", - LLSD(), LLSD(), - &LLFloaterSellLandUI::callbackHighlightTransferable); + LLSD(), LLSD()); } +static LLNotificationFunctorRegistration tr("TransferObjectsHighlighted", &LLFloaterSellLandUI::callbackHighlightTransferable); + // static bool LLFloaterSellLandUI::callbackHighlightTransferable(const LLSD& notification, const LLSD& data) { diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index 316ff4324c..20b40b4e1d 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -112,8 +112,8 @@ void LLPersistentNotificationStorage::saveNotifications() LLNotificationPtr notification = *it; // After a notification was placed in Persist channel, it can become - // responded, expired - in this case we are should not save it - if(notification->isRespondedTo() + // responded, expired or canceled - in this case we are should not save it + if(notification->isRespondedTo() || notification->isCancelled() || notification->isExpired()) { continue; @@ -208,7 +208,6 @@ LLNotificationResponderInterface* LLResponderRegistry::createResponder(const std build_map_t::const_iterator it = sBuildMap.find(notification_name); if(sBuildMap.end() == it) { - llwarns << "Responder for notification \'" << notification_name << "\' is not registered" << llendl; return NULL; } responder_constructor_t ctr = it->second; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 089163929e..9275ca4f42 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -291,7 +291,10 @@ LLToastNotifyPanel::~LLToastNotifyPanel() { // let reusable notification be deleted mNotification->setReusable(false); - LLNotifications::getInstance()->cancel(mNotification); + if (!mNotification->isPersistent()) + { + LLNotifications::getInstance()->cancel(mNotification); + } } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 71e50cacfd..742516f351 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2328,7 +2328,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, payload, join_group_response); + // we shouldn't pass callback functor since it is registered in LLFunctorRegistration + LLNotificationsUtil::add("JoinGroup", args, payload); } } break; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index cf7cec04de..f5e56c2f46 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1199,6 +1199,7 @@ Eject [AVATAR_NAME] from your land? You ejected [AVATAR_NAME] from group [GROUP_NAME] @@ -2441,6 +2442,7 @@ Please choose the male or female avatar. You can change your mind later. [NAME] has given you permission to edit their objects. @@ -2448,6 +2450,7 @@ Please choose the male or female avatar. You can change your mind later. Your privilege to modify [NAME]'s objects has been revoked @@ -4362,6 +4365,7 @@ Replaced missing clothing/body part with default. Topic: [SUBJECT], Message: [MESSAGE] @@ -4410,6 +4414,7 @@ Do you wish to proceed? You paid L$[AMOUNT] to upload. @@ -4697,6 +4702,7 @@ Please select at least one type of content to search (General, Moderate, or Adul [MESSAGE] @@ -4704,10 +4710,13 @@ Please select at least one type of content to search (General, Moderate, or Adul [MESSAGE] + All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted. @@ -4750,6 +4760,7 @@ All objects on this parcel that will transfer to the purchaser of this parcel ar Deactivated gestures with same trigger: [NAMES] @@ -4758,6 +4769,7 @@ Deactivated gestures with same trigger: Apple's QuickTime software does not appear to be installed on your system. If you want to view streaming media on parcels that support it you should go to the [http://www.apple.com/quicktime QuickTime site] and install the QuickTime Player. @@ -4765,6 +4777,7 @@ If you want to view streaming media on parcels that support it you should go to No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable. @@ -4784,6 +4797,7 @@ Please re-install the plugin or contact the vendor if you continue to experience The objects you own on the selected parcel of land have been returned back to your inventory. @@ -4791,6 +4805,7 @@ The objects you own on the selected parcel of land have been returned back to yo The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory. @@ -4798,6 +4813,7 @@ The objects on the selected parcel of land that is owned by [FIRST] [LAST] have The objects on the selected parcel of land owned by the Resident '[NAME]' have been returned to their owner. @@ -4805,6 +4821,7 @@ The objects on the selected parcel of land owned by the Resident '[NAME]&ap The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. @@ -4814,6 +4831,7 @@ Non-transferable objects that are deeded to the group have been deleted. The objects on the selected parcel that are NOT owned by you have been returned to their owners. @@ -4821,6 +4839,7 @@ The objects on the selected parcel that are NOT owned by you have been returned Message from [NAME]: <nolink>[MSG]</nolink> @@ -4829,6 +4848,7 @@ Message from [NAME]: This land has damage enabled. You can be hurt here. If you die, you will be teleported to your home location. @@ -4838,6 +4858,7 @@ You can be hurt here. If you die, you will be teleported to your home location. This area has flying disabled. You can't fly here. @@ -4847,6 +4868,7 @@ You can't fly here. This area does not allow pushing. You can't push others here unless you own the land. @@ -4855,6 +4877,7 @@ This area does not allow pushing. You can't push others here unless you own This area has voice chat disabled. You won't be able to hear anyone talking. @@ -4863,6 +4886,7 @@ This area has voice chat disabled. You won't be able to hear anyone talking This area has building disabled. You can't build or rez objects here. @@ -4871,6 +4895,7 @@ This area has building disabled. You can't build or rez objects here. An administrator has temporarily stopped scripts in this region. @@ -4878,6 +4903,7 @@ An administrator has temporarily stopped scripts in this region. This region is not running any scripts. @@ -4885,6 +4911,7 @@ This region is not running any scripts. This land has outside scripts disabled. @@ -4894,6 +4921,7 @@ No scripts will work here except those belonging to the land owner. You can only claim public land in the Region you're in. @@ -4901,6 +4929,7 @@ You can only claim public land in the Region you're in. You aren't allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. @@ -4910,6 +4939,7 @@ Please go to the Knowledge Base for details on accessing areas with this maturit You are banned from the region. @@ -4917,6 +4947,7 @@ You are banned from the region. Your account cannot connect to this teen grid region. @@ -4924,6 +4955,7 @@ Your account cannot connect to this teen grid region. You do not have proper payment status to enter this region. @@ -4931,6 +4963,7 @@ You do not have proper payment status to enter this region. You must be age-verified to enter this region. @@ -4938,6 +4971,7 @@ You must be age-verified to enter this region. You must be age-verified to enter this parcel. @@ -4945,6 +4979,7 @@ You must be age-verified to enter this parcel. No destination region found. @@ -4952,6 +4987,7 @@ No destination region found. You are not allowed into the destination. @@ -4959,6 +4995,7 @@ You are not allowed into the destination. Cannot region cross into banned parcel. Try another way. @@ -4966,6 +5003,7 @@ Cannot region cross into banned parcel. Try another way. You have been redirected to a telehub. @@ -4973,6 +5011,7 @@ You have been redirected to a telehub. Could not teleport closer to destination. @@ -4980,6 +5019,7 @@ Could not teleport closer to destination. Teleport cancelled. @@ -4987,6 +5027,7 @@ Teleport cancelled. The region you are attempting to enter is currently full. Please try again in a few moments. @@ -4995,6 +5036,7 @@ Please try again in a few moments. General failure. @@ -5002,6 +5044,7 @@ General failure. Routed to wrong region. Please try again. @@ -5009,6 +5052,7 @@ Routed to wrong region. Please try again. No valid agent id. @@ -5016,6 +5060,7 @@ No valid agent id. No valid session id. @@ -5023,6 +5068,7 @@ No valid session id. No valid circuit code. @@ -5030,6 +5076,7 @@ No valid circuit code. No valid timestamp. @@ -5037,6 +5084,7 @@ No valid timestamp. Unable to create pending connection. @@ -5044,6 +5092,7 @@ Unable to create pending connection. Internal error attempting to connect agent usher. @@ -5051,6 +5100,7 @@ Internal error attempting to connect agent usher. Unable to find a good teleport destination in this region. @@ -5058,6 +5108,7 @@ Unable to find a good teleport destination in this region. Internal error attempting to activate region resolver. @@ -5065,6 +5116,7 @@ Internal error attempting to activate region resolver. A valid landing point could not be found. @@ -5072,6 +5124,7 @@ A valid landing point could not be found. No valid parcel could be found. @@ -5079,7 +5132,6 @@ No valid parcel could be found. An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5102,7 +5154,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] has given you this [OBJECTTYPE]: [ITEM_SLURL] @@ -5125,6 +5176,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] @@ -5134,6 +5186,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [MESSAGE]
@@ -5155,7 +5208,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] has offered to teleport you to their location: @@ -5183,6 +5235,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [MESSAGE] [URL] @@ -5201,7 +5254,6 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME_SLURL] is offering friendship. @@ -5230,6 +5282,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] is offering friendship. @@ -5256,6 +5309,7 @@ An object named [OBJECTFROMNAME] owned by [NAME_SLURL] has given you this [OBJEC [NAME] declined your friendship offer. @@ -5277,6 +5331,7 @@ Friendship offer declined. [FIRST] [LAST] is offering their calling card. This will add a bookmark in your inventory so you can quickly IM this Resident. @@ -5297,6 +5352,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident. name="RegionRestartMinutes" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [MINUTES] minutes. If you stay in this region you will be logged out. @@ -5307,6 +5363,7 @@ If you stay in this region you will be logged out. name="RegionRestartSeconds" priority="high" sound="UISndAlert" + persist="true" type="notify"> This region will restart in [SECONDS] seconds. If you stay in this region you will be logged out. @@ -5315,6 +5372,7 @@ If you stay in this region you will be logged out. Load web page [URL]? @@ -5336,6 +5394,7 @@ From object: [OBJECTNAME], owner: [NAME]? Failed to find [TYPE] in database. @@ -5343,6 +5402,7 @@ Failed to find [TYPE] in database. Failed to find [TYPE] named [DESC] in database. @@ -5350,6 +5410,7 @@ Failed to find [TYPE] named [DESC] in database. Failed to upload image to web. @@ -5357,6 +5418,7 @@ Failed to find [TYPE] named [DESC] in database. The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. @@ -5364,6 +5426,7 @@ The item you are trying to wear uses a feature that your Viewer can't read. '[OBJECTNAME]', an object owned by '[NAME]', would like to: @@ -5389,6 +5452,7 @@ Is this OK? icon="notify.tga" name="ScriptQuestionCaution" priority="high" + persist="true" type="notify"> An object named '[OBJECTNAME]', owned by '[NAME]' would like to: @@ -5416,6 +5480,7 @@ Grant this request? [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5430,6 +5495,7 @@ Grant this request? [GROUPNAME]'s '[TITLE]' [MESSAGE] @@ -5445,6 +5511,7 @@ Grant this request? You just received L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5453,6 +5520,7 @@ Your L$ balance is shown in the upper-right. You just paid L$[AMOUNT]. Your L$ balance is shown in the upper-right. @@ -5462,6 +5530,7 @@ Your L$ balance is shown in the upper-right. Thank you for your payment! @@ -5474,6 +5543,7 @@ The status of your payment can be checked on your Transaction History page on yo You are sitting. Use your arrow keys (or AWSD) to look around. @@ -5483,6 +5553,7 @@ Click the 'Stand Up' button to stand. Click and drag the map to look around. Double-click to teleport. @@ -5492,6 +5563,7 @@ Use the controls on the right to find things and display different backgrounds. You have opened the Build Tools. Every object you see around you was created using these tools. @@ -5501,6 +5573,7 @@ You have opened the Build Tools. Every object you see around you was created usi Left-clicking interacts with special objects. If the mouse pointer changes to a hand, you can interact with the object. @@ -5510,6 +5583,7 @@ You have opened the Build Tools. Every object you see around you was created usi You can only teleport to certain areas in this region. The arrow points to your specific destination. Click the arrow to dismiss it. @@ -5519,6 +5593,7 @@ You can only teleport to certain areas in this region. The arrow points to your Your movement keys are now being handled by an object. Try the arrow keys or AWSD to see what they do. @@ -5530,6 +5605,7 @@ Press 'M' to do this. You are editing your Appearance. Use the arrow keys to look around. @@ -5539,6 +5615,7 @@ When you are done, press 'Save All'. This is your Inventory, which contains items you own. @@ -5551,6 +5628,7 @@ This is your Inventory, which contains items you own. This is a sandbox area, and is meant to help Residents learn how to build. @@ -5561,6 +5639,7 @@ Things you build here will be deleted after you leave, so don't forget to r This object is flexible. Flexis must be phantom and not physical. @@ -5568,6 +5647,7 @@ This object is flexible. Flexis must be phantom and not physical. You opened the Advanced menu. @@ -5580,6 +5660,7 @@ To toggle this menu, You are editing a Sculpted prim. Sculpties require a special texture to define their shape. @@ -5589,6 +5670,7 @@ You are editing a Sculpted prim. Sculpties require a special texture to define t You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust. @@ -5629,6 +5711,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was sent an instant message and has been automatically unblocked. @@ -5636,6 +5719,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was given money and has been automatically unblocked. @@ -5643,6 +5727,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block [FIRST] [LAST] was offered inventory and has been automatically unblocked. -- cgit v1.2.3