From f54bf2a1eac3bc61222e5cceba77755bd340f996 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 4 Mar 2010 11:35:34 +0200 Subject: =?UTF-8?q?fixed=20EXT-5904=20=E2=80=9COffers=20embedding=20into?= =?UTF-8?q?=20IM=20windows=E2=80=9D,=20made=20all=20type=20offers=20be=20e?= =?UTF-8?q?mbedded=20to=20the=20IM=20floater;=20made=20showing=20offer=20t?= =?UTF-8?q?oast=20if=20IM=20floater=20isn't=20visible;=20corrected=20IM=20?= =?UTF-8?q?message=20counter=20on=20showing=20offer=20toast;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 42 ++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 9 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 8ebd5de258..42e42d4f0a 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -113,36 +113,53 @@ bool LLOfferHandler::processNotification(const LLSD& notify) session_id = LLHandlerUtil::spawnIMSession(name, from_id); } - if (LLHandlerUtil::canAddNotifPanelToIM(notification)) + bool show_toast = true; + bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification); + if (add_notid_to_im) { LLHandlerUtil::addNotifPanelToIM(notification); - LLHandlerUtil::logToIMP2P(notification, true); + if (LLHandlerUtil::isIMFloaterOpened(notification)) + { + show_toast = false; + } } - else if (notification->getPayload().has("SUPPRESS_TOAST") + + if (notification->getPayload().has("SUPPRESS_TOAST") && notification->getPayload()["SUPPRESS_TOAST"]) { - LLHandlerUtil::logToIMP2P(notification); LLNotificationsUtil::cancel(notification); } - else + else if(show_toast) { LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); - + // don't close notification on panel destroy since it will be used by IM floater + notify_box->setCloseNotificationOnDestroy(!add_notid_to_im); LLToast::Params p; p.notif_id = notification->getID(); p.notification = notification; p.panel = notify_box; p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1); + // we not save offer notifications to the syswell floater that should be added to the IM floater + p.can_be_stored = !add_notid_to_im; LLScreenChannel* channel = dynamic_cast(mChannel); if(channel) channel->addToast(p); - LLHandlerUtil::logToIMP2P(notification); - // send a signal to the counter manager mNewNotificationSignal(); } + + if (LLHandlerUtil::canLogToIM(notification)) + { + LLHandlerUtil::logToIMP2P(notification); + } + + // update IM floater messages if need + if (add_notid_to_im) + { + LLHandlerUtil::updateVisibleIMFLoaterMesages(notification); + } } } else if (notify["sigtype"].asString() == "delete") @@ -155,6 +172,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { + if (LLHandlerUtil::canAddNotifPanelToIM(notification) + && !LLHandlerUtil::isIMFloaterOpened(notification)) + { + LLHandlerUtil::decIMMesageCounter(notification); + } mChannel->killToastByNotificationID(notification->getID()); } } @@ -181,7 +203,9 @@ void LLOfferHandler::onRejectToast(LLUUID& id) if (notification && LLNotificationManager::getInstance()->getHandlerForNotification( - notification->getType()) == this) + notification->getType()) == this + // don't delete notification since it may be used by IM floater + && !LLHandlerUtil::canAddNotifPanelToIM(notification)) { LLNotifications::instance().cancel(notification); } -- cgit v1.2.3 From 462ab1c7523b1cc0987bc596df4fd3e4b32e5e54 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 5 Mar 2010 12:37:06 +0200 Subject: =?UTF-8?q?fixed=20EXT-5908=20=E2=80=9CAccepted=20friendship=20not?= =?UTF-8?q?ification=20shouldn't=20spawn=20chiclet=E2=80=9D,=20made=20not?= =?UTF-8?q?=20spawn=20IM=20chiclet=20friendship=20accepted=20notification;?= =?UTF-8?q?=20added=20friendship=20accepted=20notification=20to=20syswell?= =?UTF-8?q?=20chiclet;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 42e42d4f0a..3304d7f030 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -146,8 +146,12 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(channel) channel->addToast(p); - // send a signal to the counter manager - mNewNotificationSignal(); + // if we not add notification to IM - add it to notification well + if (!add_notid_to_im) + { + // send a signal to the counter manager + mNewNotificationSignal(); + } } if (LLHandlerUtil::canLogToIM(notification)) -- cgit v1.2.3 From 2f9cc80c2e0a6ca648871ed74cc10b813d2c4940 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 5 Mar 2010 17:53:32 +0200 Subject: =?UTF-8?q?fixed=20EXT-5910=20=E2=80=9COffers=20logging=E2=80=9D,?= =?UTF-8?q?=20fixed=20IM=20message=20counter=20when=20received=20interacti?= =?UTF-8?q?ve=20notification(offer);=20corrected=20logging=20to=20file=20o?= =?UTF-8?q?f=20offer=20notification;=20enabled=20logging=20for=20FRIENDSHI?= =?UTF-8?q?P=5FACCEPTED=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 3304d7f030..97a1df66df 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -156,7 +156,14 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if (LLHandlerUtil::canLogToIM(notification)) { - LLHandlerUtil::logToIMP2P(notification); + if (LLHandlerUtil::isIMFloaterOpened(notification)) + { + LLHandlerUtil::logToIMP2P(notification, true); + } + else + { + LLHandlerUtil::logToIMP2P(notification); + } } // update IM floater messages if need @@ -192,8 +199,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify) void LLOfferHandler::onDeleteToast(LLToast* toast) { - // send a signal to the counter manager - mDelNotificationSignal(); + if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification())) + { + // send a signal to the counter manager + mDelNotificationSignal(); + } // send a signal to a listener to let him perform some action // in this case listener is a SysWellWindow and it will remove a corresponding item from its list -- cgit v1.2.3 From e7027a57e17b565f98f401f3f2cd1af8c91f2af7 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 11 Mar 2010 17:53:49 +0200 Subject: =?UTF-8?q?fixed=20EXT-5904=20=E2=80=9COffers=20embedding=20into?= =?UTF-8?q?=20IM=20windows=E2=80=9D,=20revised=20embedding=20and=20logging?= =?UTF-8?q?=20offer=20notification=20to=20provide=20loading=20log=20entry?= =?UTF-8?q?=20in=20case=20notification=20doesn't=20exist;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 97a1df66df..0a42d8adbe 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -156,7 +156,8 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if (LLHandlerUtil::canLogToIM(notification)) { - if (LLHandlerUtil::isIMFloaterOpened(notification)) + // log only to file if notif panel can be embedded to IM and IM is opened + if (add_notid_to_im && LLHandlerUtil::isIMFloaterOpened(notification)) { LLHandlerUtil::logToIMP2P(notification, true); } @@ -165,12 +166,6 @@ bool LLOfferHandler::processNotification(const LLSD& notify) LLHandlerUtil::logToIMP2P(notification); } } - - // update IM floater messages if need - if (add_notid_to_im) - { - LLHandlerUtil::updateVisibleIMFLoaterMesages(notification); - } } } else if (notify["sigtype"].asString() == "delete") -- cgit v1.2.3 From a2150863f97bf4fc49ecc17a2405177abe9d8f73 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 19 Mar 2010 17:18:53 +0200 Subject: Updated normal task EXT-5905 - Resolving offers. Reusable notifications are deleted when user closes IM floater(old - when user closes Viewer). --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 0a42d8adbe..e93aec9d01 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -103,6 +103,8 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { + notification->setReusable(LLHandlerUtil::isNotificationReusable(notification)); + LLUUID session_id; if (LLHandlerUtil::canSpawnIMSession(notification)) { -- cgit v1.2.3