From 612c7a2960492a7838b55dd3706a3ddcec0d0c30 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 11 Dec 2009 22:49:16 +0200 Subject: Additional commit for normal sub-task EXT-3142("new message" indicator for object chiclets) --HG-- branch : product-engine --- indra/newview/llscriptfloater.cpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'indra/newview/llscriptfloater.cpp') diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 5c4f6e8860..9884aec2e3 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -66,6 +66,7 @@ LLScriptFloater::LLScriptFloater(const LLSD& key) : LLDockableFloater(NULL, true, key) , mScriptForm(NULL) { + setMouseDownCallback(boost::bind(&LLScriptFloater::onMouseDown, this)); } bool LLScriptFloater::toggle(const LLUUID& object_id) @@ -180,6 +181,23 @@ void LLScriptFloater::setVisible(BOOL visible) hideToastsIfNeeded(); } +void LLScriptFloater::onMouseDown() +{ + if(getObjectId().notNull()) + { + // Remove new message icon + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet(getObjectId()); + if (chiclet == NULL) + { + llerror("Dock chiclet for LLScriptFloater doesn't exist", 0); + } + else + { + chiclet->setShowNewMessagesIcon(false); + } + } +} + void LLScriptFloater::hideToastsIfNeeded() { using namespace LLNotificationsUI; @@ -217,11 +235,18 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) script_notification_map_t::iterator it = mNotifications.find(object_id); if(it != mNotifications.end()) { + LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet(object_id); + if(chiclet) + { + // Pass the new_message icon state further. + set_new_message = chiclet->getShowNewMessagesIcon(); + } + LLScriptFloater* floater = LLFloaterReg::findTypedInstance("script_floater", it->second.notification_id); if(floater) { - // Generate chiclet with a "new message" indicator if a docked window was opened. See EXT-3142. - set_new_message = floater->isShown(); + // Generate chiclet with a "new message" indicator if a docked window was opened but not in focus. See EXT-3142. + set_new_message |= !floater->hasFocus(); } onRemoveNotification(it->second.notification_id); -- cgit v1.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 ++++++-- indra/newview/llscriptfloater.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llscriptfloater.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) diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 9884aec2e3..1962d871a6 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -209,6 +209,7 @@ void LLScriptFloater::hideToastsIfNeeded() if(channel) { channel->updateShowToastsState(); + channel->redrawToasts(); } } -- cgit v1.3