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/llscreenchannel.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'indra/newview/llscreenchannel.cpp') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index f66f725070..790be83e74 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -151,6 +151,33 @@ LLScreenChannel::~LLScreenChannel() } +std::list LLScreenChannel::findToasts(const Matcher& matcher) +{ + std::list res; + + // collect stored toasts + for (std::vector::iterator it = mStoredToastList.begin(); it + != mStoredToastList.end(); it++) + { + if (matcher.matches(it->toast->getNotification())) + { + res.push_back(it->toast); + } + } + + // collect displayed toasts + for (std::vector::iterator it = mToastList.begin(); it + != mToastList.end(); it++) + { + if (matcher.matches(it->toast->getNotification())) + { + res.push_back(it->toast); + } + } + + return res; +} + //-------------------------------------------------------------------------- void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect) { @@ -375,6 +402,16 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) } } +void LLScreenChannel::killMatchedToasts(const Matcher& matcher) +{ + std::list to_delete = findToasts(matcher); + for (std::list::iterator it = to_delete.begin(); it + != to_delete.end(); it++) + { + killToastByNotificationID((*it)-> getNotificationID()); + } +} + //-------------------------------------------------------------------------- void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) { -- cgit v1.2.3 From 28b507dd605724af21d2cf587aaf0c9dfb8dd25e Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 11 Dec 2009 12:20:38 +0200 Subject: Updated comment. --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llscreenchannel.cpp') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 790be83e74..79bae76e5f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -813,8 +813,6 @@ void LLScreenChannel::updateShowToastsState() return; } - // *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow? - // See EXT-3081 for details // for Message Well floater showed in a docked state - adjust channel's height if(dynamic_cast(floater) || dynamic_cast(floater)) { -- cgit v1.2.3 From c159d9165dda268f3d8d16e95dac81bc8a9e12be Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Mon, 14 Dec 2009 16:09:29 +0200 Subject: fixed normal bug (EXT-1093) Dialog boxes should be centered in the viewport(game area) Alert dialogs' behavior was broken in 6132:32b8dcff3b67 of PE brunch --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llscreenchannel.cpp') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 79bae76e5f..78cc7c54dc 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -184,15 +184,16 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo S32 right_delta = old_world_rect.mRight - new_world_rect.mRight; LLRect this_rect = getRect(); - this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); switch(mChannelAlignment) { case CA_LEFT : + this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); break; case CA_CENTRE : - this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight()); - break; + LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect); + return; case CA_RIGHT : + this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio()); this_rect.mLeft -= right_delta; this_rect.mRight -= right_delta; } -- cgit v1.2.3 From c157c1176a570ab61978063dcc8d0ce3fe31483d Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 15 Dec 2009 10:54:37 +0200 Subject: Update for normal task EXT-3089 - Notification toasts positioning, layering and stacking. Docked LLDialogs are part of toasts positioning rules. --HG-- branch : product-engine --- indra/newview/llscreenchannel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llscreenchannel.cpp') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 78cc7c54dc..bd256ec9c2 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -815,14 +815,18 @@ void LLScreenChannel::updateShowToastsState() } // for Message Well floater showed in a docked state - adjust channel's height - if(dynamic_cast(floater) || dynamic_cast(floater)) + if(dynamic_cast(floater) || dynamic_cast(floater) + || dynamic_cast(floater)) { S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");; LLRect this_rect = getRect(); if(floater->getVisible() && floater->isDocked()) { channel_bottom += floater->getRect().getHeight(); - channel_bottom += floater->getDockControl()->getTongueHeight(); + if(floater->getDockControl()) + { + channel_bottom += floater->getDockControl()->getTongueHeight(); + } } if(channel_bottom != this_rect.mBottom) -- cgit v1.2.3