From 1ea60591a9b5f46a66527497b7b14b843a663de8 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 13 Nov 2009 20:33:59 -0500 Subject: Refactoring of llviewerprecompiledheaders.h to hopefully increase stability and reduce unnecessary dependencies and incredibuild wedging. Hopefully in the long run this will reduce build time. Also cleaned up a lot of header file usage to conform better to the coding standard. reviewed by james and steve. --- indra/newview/llviewermessage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 23d02af73d..33361f72cd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -59,6 +59,8 @@ #include "llteleportflags.h" #include "lltracker.h" #include "lltransactionflags.h" +#include "llvfile.h" +#include "llvfs.h" #include "llxfermanager.h" #include "message.h" #include "sound_ids.h" -- cgit v1.2.3 From 7c69928ff8892f0cb4a3a6ad155106ebef7e1f8a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 7 Dec 2009 18:43:47 -0800 Subject: Fixups for things broken after the last merge and for the linux build. --- 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 f72bbb70bf..d15214ed4b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -38,10 +38,14 @@ #include "lleconomy.h" #include "llfloaterreg.h" #include "llfollowcamparams.h" +#include "llregionhandle.h" #include "llsdserialize.h" +#include "llteleportflags.h" #include "lltransactionflags.h" #include "llvfile.h" #include "llvfs.h" +#include "llxfermanager.h" +#include "mean_collision_data.h" #include "llagent.h" #include "llcallingcard.h" -- cgit v1.2.3 From 1967034ca0a71f95ddcd793187a3e07d3acc6639 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 10 Dec 2009 21:40:46 +0200 Subject: implemented task EXT-2609 Implement 'block' option for inventory offers --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 31bd264e3a..93d040844c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -926,34 +926,40 @@ void open_inventory_offer(const std::vector& items, const std::string& f void inventory_offer_mute_callback(const LLUUID& blocked_id, const std::string& first_name, const std::string& last_name, - BOOL is_group) + BOOL is_group, LLOfferInfo* offer = NULL) { std::string from_name; LLMute::EType type; - if (is_group) { type = LLMute::GROUP; from_name = first_name; } + else if(offer && offer->mFromObject) + { + //we have to block object by name because blocked_id is an id of owner + type = LLMute::BY_NAME; + from_name = offer->mFromName; + } else { type = LLMute::AGENT; from_name = first_name + " " + last_name; } - LLMute mute(blocked_id, from_name, type); + // id should be null for BY_NAME mute, see LLMuteList::add for details + LLMute mute(type == LLMute::BY_NAME ? LLUUID::null : blocked_id, from_name, type); if (LLMuteList::getInstance()->add(mute)) { LLPanelBlockedList::showPanelAndSelect(blocked_id); } // purge the message queue of any previously queued inventory offers from the same source. - class OfferMatcher : public LLNotifyBoxView::Matcher + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher { public: OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - BOOL matches(const LLNotificationPtr notification) const + bool matches(const LLNotificationPtr notification) const { if(notification->getName() == "ObjectGiveItem" || notification->getName() == "ObjectGiveItemUnknownUser" @@ -966,7 +972,17 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, private: const LLUUID& blocked_id; }; - gNotifyBoxView->purgeMessagesMatching(OfferMatcher(blocked_id)); + + using namespace LLNotificationsUI; + LLChannelManager* channel_manager = LLChannelManager::getInstance(); + LLScreenChannel + * screen_channel = + dynamic_cast (channel_manager->findChannelByID( + LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); + if (screen_channel != NULL) + { + screen_channel->killMatchedToasts(OfferMatcher(blocked_id)); + } } LLOfferInfo::LLOfferInfo(const LLSD& sd) @@ -1196,7 +1212,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const // * we can't build two messages at once. if (2 == button) { - gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); + gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this)); } LLMessageSystem* msg = gMessageSystem; -- cgit v1.2.3 From 791465bab968a738568ddf0abaa5fa6766eb020d Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 11 Dec 2009 09:20:58 +0200 Subject: no ticket. fixing at least win build --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 93d040844c..bdc996c7d9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1078,7 +1078,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // * we can't build two messages at once. if (2 == button) { - gCacheName->get(mFromID, mFromGroup, &inventory_offer_mute_callback); + gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this)); } std::string from_string; // Used in the pop-up. -- cgit v1.2.3 From 4fc7b91a795fb4ad0eaf3b6c7a1779679889fcbf Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 11 Dec 2009 14:26:27 +0200 Subject: =?UTF-8?q?implemented=20EXT-2323=20=E2=80=9CGet=20rid=20from=20ob?= =?UTF-8?q?solete=20notification=20widgets=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bdc996c7d9..8fe18c56c9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -59,7 +59,6 @@ #include "llnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelgrouplandmoney.h" #include "llpanelplaces.h" #include "llrecentpeople.h" @@ -973,16 +972,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, const LLUUID& blocked_id; }; - using namespace LLNotificationsUI; - LLChannelManager* channel_manager = LLChannelManager::getInstance(); - LLScreenChannel - * screen_channel = - dynamic_cast (channel_manager->findChannelByID( - LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - if (screen_channel != NULL) - { - screen_channel->killMatchedToasts(OfferMatcher(blocked_id)); - } + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } LLOfferInfo::LLOfferInfo(const LLSD& sd) @@ -4847,24 +4838,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT)); // purge the message queue of any previously queued requests from the same source. DEV-4879 - class OfferMatcher : public LLNotifyBoxView::Matcher + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher { public: OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - BOOL matches(const LLNotificationPtr notification) const + bool matches(const LLNotificationPtr notification) const { if (notification->getName() == "ScriptQuestionCaution" || notification->getName() == "ScriptQuestion") { return (notification->getPayload()["item_id"].asUUID() == blocked_id); } - return FALSE; + return false; } private: const LLUUID& blocked_id; }; - // should do this via the channel - gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id)); + + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); } if (response["Details"]) -- cgit v1.2.3 From 7863d7d412ecd4dbbb7a27978493e85f446250fb Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 11 Dec 2009 20:36:32 +0200 Subject: Related to normal sub-task EXT-2478: Implemened chiclet + chiclet window should spawn only for offers from objects. Offers from persons should be shown as toasts --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8fe18c56c9..d1f1d781ee 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1480,6 +1480,8 @@ void inventory_offer_handler(LLOfferInfo* info) // Note: sets inventory_task_offer_callback as the callback p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_task_offer_callback, info, _1, _2)); p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; + // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. + LLNotifications::instance().add(p); } else // Agent -> Agent Inventory Offer { @@ -1503,18 +1505,14 @@ void inventory_offer_handler(LLOfferInfo* info) // In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages). info->send_auto_receive_response(); - } - - // Pop up inv offer notification and let the user accept (keep), or reject (and silently delete) the inventory. - LLNotifications::instance().add(p); - // TODO(EM): Recheck this after we will know how script notifications should look like. - // Inform user that there is a script floater via toast system - // { - // payload["give_inventory_notification"] = TRUE; - // LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); - // LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID()); - // } + // Inform user that there is a script floater via toast system + { + payload["give_inventory_notification"] = TRUE; + LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); + LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID()); + } + } } bool lure_callback(const LLSD& notification, const LLSD& response) -- cgit v1.2.3 From f2e2f1a7a7a93de404b56fa73d6672a32381906d Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 14 Dec 2009 12:20:41 +0200 Subject: =?UTF-8?q?mplemented=20EXT-3392=20=E2=80=9CTeleport=20offers=20re?= =?UTF-8?q?corded=20in=20IM=20history=20should=20include=20a=20SLURL=20to?= =?UTF-8?q?=20the=20TP=20location=E2=80=9D,=20teleport=20offer=20message?= =?UTF-8?q?=20supplement=20with=20teleport=20location=20URL;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- 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 d1f1d781ee..487db16e6e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5298,6 +5298,7 @@ void send_group_notice(const LLUUID& group_id, bool handle_lure_callback(const LLSD& notification, const LLSD& response) { std::string text = response["message"].asString(); + text.append("\r\n").append(LLAgentUI::buildSLURL()); S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if(0 == option) -- cgit v1.2.3