From e76dd651d4be87c9afb37b2d5d7c9931209fd712 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Mon, 1 Feb 2010 18:43:26 -0500 Subject: EXT-4613: No longer get to throttle for quite folders (COF, trash, outfits, etc) -Reviewed by nyx --- indra/newview/llviewermessage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9240833632..b0952dd698 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -870,8 +870,7 @@ void open_inventory_offer(const std::vector& items, const std::string& f //////////////////////////////////////////////////////////////////////////////// // Don't highlight if it's in certain "quiet" folders which don't need UI // notification (e.g. trash, cof, lost-and-found). - const BOOL user_is_away = gAwayTimer.getStarted(); - if(!user_is_away) + if(!gAgent.getAFK()) { const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(item_id); if (parent) -- cgit v1.2.3 From e367c412988a55515fb68179d21f5d1c19249969 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 2 Feb 2010 18:48:40 +0200 Subject: Working on (EXT-4347) Moving object contents to inventory opens files, changes menu. - Removing LLPanelPlaces dependency from open_inventory_offer handler. - Added landmark offer handling to Places panel. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 53 ++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 20 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b0952dd698..26c9a1dd79 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -860,28 +860,12 @@ void open_inventory_offer(const std::vector& items, const std::string& f ++item_iter) { const LLUUID& item_id = (*item_iter); - LLInventoryItem* item = gInventory.getItem(item_id); - if(!item) + if(!highlight_offered_item(item_id)) { - LL_WARNS("Messaging") << "Unable to show inventory item: " << item_id << LL_ENDL; continue; } - //////////////////////////////////////////////////////////////////////////////// - // Don't highlight if it's in certain "quiet" folders which don't need UI - // notification (e.g. trash, cof, lost-and-found). - if(!gAgent.getAFK()) - { - const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(item_id); - if (parent) - { - const LLFolderType::EType parent_type = parent->getPreferredType(); - if (LLViewerFolderType::lookupIsQuietType(parent_type)) - { - continue; - } - } - } + LLInventoryItem* item = gInventory.getItem(item_id); //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. @@ -928,10 +912,11 @@ void open_inventory_offer(const std::vector& items, const std::string& f LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_places")); if (places_panel) { - // we are creating a landmark + // 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); + //places_panel->setItem(item); } // we are opening a group notice attachment else @@ -981,6 +966,34 @@ void open_inventory_offer(const std::vector& items, const std::string& f } } +bool highlight_offered_item(const LLUUID& item_id) +{ + LLInventoryItem* item = gInventory.getItem(item_id); + if(!item) + { + LL_WARNS("Messaging") << "Unable to show inventory item: " << item_id << LL_ENDL; + return false; + } + + //////////////////////////////////////////////////////////////////////////////// + // Don't highlight if it's in certain "quiet" folders which don't need UI + // notification (e.g. trash, cof, lost-and-found). + if(!gAgent.getAFK()) + { + const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(item_id); + if (parent) + { + const LLFolderType::EType parent_type = parent->getPreferredType(); + if (LLViewerFolderType::lookupIsQuietType(parent_type)) + { + return false; + } + } + } + + return true; +} + void inventory_offer_mute_callback(const LLUUID& blocked_id, const std::string& first_name, const std::string& last_name, -- cgit v1.2.3 From e563a07659b74b2dca850834a44c3b92ff993b44 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 2 Feb 2010 17:19:14 +0000 Subject: DEV-32540: Lots of object IM and SLurl improvements - Don't let object names that are URLs override links to display the remote object inspector - Don't hyperlink the object name in the remote object inspector - Made the ... regex more robust and made it support non-URLs between the tags, so that we don't get random tags when trying to disable URLs in user-typed text. - Improved the llurlentry unit test and added some more test cases. - Hooked up another LLViewerMessage code path to objectim SLapps to pass down the owner and slurl information. - Made a few LLUrlEntryBase methods be const methods, because they are - Fixed a bug in the remote object inspector where it would never show the teleport URL. --- indra/newview/llviewermessage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b0952dd698..aa9d0f469d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2189,7 +2189,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); if(nearby_chat) { - nearby_chat->addMessage(chat); + LLSD args; + args["owner_id"] = from_id; + args["slurl"] = location; + nearby_chat->addMessage(chat, true, args); } -- cgit v1.2.3 From 2a755eca16567e9566007e9771cce78b3f92bc0b Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 3 Feb 2010 14:44:32 +0200 Subject: Fixed normal bug EXT-4766 - System notifications in nearby chat has default avatar icon and behave like sent from object --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 26c9a1dd79..3bf0fb6f71 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2181,6 +2181,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mFromID = from_id ^ gAgent.getSessionID(); } + if(SYSTEM_FROM == name) + { + // System's UUID is NULL (fixes EXT-4766) + chat.mFromID = from_id = LLUUID::null; + } + LLSD query_string; query_string["owner"] = from_id; query_string["slurl"] = location; -- cgit v1.2.3 From 8c1618ca5ae81eec0a5fa6229e89cd0f1a072a27 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 3 Feb 2010 19:38:12 +0200 Subject: Fixed major bug EXT-4876 (Switch from slurl.com to maps.secondlife.com) --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e525561b7d..143d95d27e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1478,6 +1478,11 @@ void inventory_offer_handler(LLOfferInfo* info) // Strip any SLURL from the message display. (DEV-2754) std::string msg = info->mDesc; int indx = msg.find(" ( http://slurl.com/secondlife/"); + if(indx == std::string::npos) + { + // try to find new slurl host + indx = msg.find(" ( http://maps.secondlife.com/secondlife/"); + } if(indx >= 0) { LLStringUtil::truncate(msg, indx); -- cgit v1.2.3 From ec0dd8968c7bbfd469d7400920f93c68ba168d5d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sat, 6 Feb 2010 19:19:07 +0000 Subject: Update the rest of the LLEventTimer users to #include lleventtimer.h. I think. --- indra/newview/llviewermessage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 143d95d27e..204a20ae6a 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" -- cgit v1.2.3 From 4e28c10971dc4f9a52a7b3f109143dbce3528d21 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Mon, 8 Feb 2010 14:11:24 +0200 Subject: Fixed major bug (EXT-5017) Landmark Info panel opens immediately after retrieving data about landmarking location. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 204a20ae6a..c5d3d7cb25 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -915,12 +915,13 @@ void open_inventory_offer(const std::vector& 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"; -- cgit v1.2.3 From d2d6af3dfa0f8a423016f5972d44a9721b1be1ee Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 8 Feb 2010 18:06:41 +0200 Subject: Fixed critical bug EXT-4970 - Inventory offers by scripted objects are discarded when offered objects got the same name. Had to do minor refactoring of LLScripFloaterManager in order to fix this issue. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c5d3d7cb25..42f7793b5a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1263,10 +1263,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; } @@ -1440,10 +1436,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; } @@ -1594,7 +1586,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()); } } } -- cgit v1.2.3 From b16030e204df225e81c88c97bcdb691dbaef77a3 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Tue, 9 Feb 2010 14:44:26 +0200 Subject: fix for major EXT-5099 Blocked IM text comes from "Second Life" in nearby chat --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 42f7793b5a..d9b5344dd4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1842,6 +1842,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. @@ -1849,6 +1854,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["MESSAGE"] = buffer; LLNotificationsUtil::add("SystemMessageTip", args); + */ } } break; -- cgit v1.2.3 From 7786c8638a107953b779dbbedc39a4dfa85f5848 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:21:08 +0000 Subject: CID-420 Checker: NULL_RETURNS Function: open_inventory_offer(const std::vector> &, const std::basic_string, std::allocator>&) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d9b5344dd4..29301e4d1c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -867,6 +867,10 @@ void open_inventory_offer(const std::vector& items, const std::string& f } LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. -- cgit v1.2.3 From 1562b12b6ca7aa5687e44ef0a99cbfbce3bb1cb4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:23:53 +0000 Subject: CID-408 Checker: UNUSED_VALUE Function: LLOfferInfo::inventory_task_offer_callback(const LLSD &, const LLSD &) File: /indra/newview/llviewermessage.cpp dead code. --- indra/newview/llviewermessage.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 29301e4d1c..8aa642bdb6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1306,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. -- cgit v1.2.3 From c4a3bee33562f607bbd56a420bfcb424e00f2f41 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 18 Feb 2010 20:21:02 +0200 Subject: =?UTF-8?q?fixed=20major=20EXT-5493=20=E2=80=9CllInstantMessage=20?= =?UTF-8?q?sends=20message=20to=20"nearby=20chat"=20window,=20but=20not=20?= =?UTF-8?q?to=20toasts=20in=20viewer=E2=80=9D,=20made=20llInstantMessage?= =?UTF-8?q?=20logged=20into=20nearby=20chat=20window=20and=20nearby=20chat?= =?UTF-8?q?=20toast;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8aa642bdb6..cf7fb8d7eb 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2212,7 +2212,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["owner_id"] = from_id; args["slurl"] = location; - nearby_chat->addMessage(chat, true, args); + args["type"] = LLNotificationsUI::NT_NEARBYCHAT; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); } -- cgit v1.2.3 From e492a24a198a9a66169cf71fcfacf74ff71ed33b Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 19 Feb 2010 10:57:27 +0200 Subject: =?UTF-8?q?fixed=20EXT-5101=20=E2=80=9CNo=20feedback=20provided=20?= =?UTF-8?q?when=20accepting=20a=20friend=20request=E2=80=9D,=20added=20log?= =?UTF-8?q?ging=20of=20friendship=20offer=20accept/decline;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index cf7fb8d7eb..05ef060ec5 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -193,9 +193,16 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) msg->nextBlockFast(_PREHASH_FolderData); msg->addUUIDFast(_PREHASH_FolderID, fid); msg->sendReliable(LLHost(payload["sender"].asString())); + + LLNotificationsUtil::add("FriendshipAcceptedByMe", + notification["substitutions"], notification["payload"]); break; } case 1: // Decline + { + LLNotificationsUtil::add("FriendshipDeclinedByMe", + notification["substitutions"], notification["payload"]); + } case 2: // Send IM - decline and start IM session { // decline -- cgit v1.2.3 From 5d0993193b1266513e2a119e5f9baab7add7f0e4 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 19 Feb 2010 14:04:25 +0200 Subject: =?UTF-8?q?EXT-5101=20=E2=80=9CNo=20feedback=20provided=20when=20a?= =?UTF-8?q?ccepting=20a=20friend=20request=E2=80=9D,=20suppresed=20toastin?= =?UTF-8?q?g=20when=20logging=20=20accept/decline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 05ef060ec5..b36f58f8ff 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -194,14 +194,18 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response) msg->addUUIDFast(_PREHASH_FolderID, fid); msg->sendReliable(LLHost(payload["sender"].asString())); + LLSD payload = notification["payload"]; + payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("FriendshipAcceptedByMe", - notification["substitutions"], notification["payload"]); + notification["substitutions"], payload); break; } case 1: // Decline { + LLSD payload = notification["payload"]; + payload["SUPPRESS_TOAST"] = true; LLNotificationsUtil::add("FriendshipDeclinedByMe", - notification["substitutions"], notification["payload"]); + notification["substitutions"], payload); } case 2: // Send IM - decline and start IM session { -- cgit v1.2.3