From 0ef11cf31364456ec247b0fc7ad8f6d1de408400 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Wed, 28 Jan 2009 20:04:52 -0600 Subject: Second Life viewer sources 1.22.6-RC --- linden/indra/newview/llnotify.cpp | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'linden/indra/newview/llnotify.cpp') diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index d584120..9e837a6 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -971,10 +971,12 @@ LLNotifyBox * LLNotifyBoxView::getFirstNontipBox() const iter++) { // hack! *TODO: Integrate llnotify and llgroupnotify - LLView* view = *iter; - if (view->getName() == "groupnotify") + if(isGroupNotifyBox(*iter)) + { continue; - LLNotifyBox* box = static_cast(view); + } + + LLNotifyBox* box = (LLNotifyBox*)(*iter); if(!box->isTip() && !box->isDead()) { return box; @@ -988,13 +990,23 @@ void LLNotifyBoxView::showOnly(LLView * view) if(view) { // assumes that the argument is actually a child - LLNotifyBox * shown = static_cast(view); + LLNotifyBox * shown = dynamic_cast(view); + if(!shown) + { + return ; + } + // make every other notification invisible for(child_list_const_iter_t iter = getChildList()->begin(); iter != getChildList()->end(); iter++) { - LLNotifyBox * box = static_cast(*iter); + if(isGroupNotifyBox(*iter)) + { + continue; + } + + LLNotifyBox * box = (LLNotifyBox*)(*iter); if(box != view && box->getVisible() && !box->isTip()) { box->setVisible(FALSE); @@ -1014,6 +1026,11 @@ void LLNotifyBoxView::purgeMessagesMatching(const Matcher& matcher) iter != notification_queue.end(); iter++) { + if(isGroupNotifyBox(*iter)) + { + continue; + } + LLNotifyBox* notification = (LLNotifyBox*)*iter; if(matcher.matches(notification->getNotifyCallback(), notification->getUserData())) { @@ -1021,3 +1038,14 @@ void LLNotifyBoxView::purgeMessagesMatching(const Matcher& matcher) } } } + +bool LLNotifyBoxView::isGroupNotifyBox(const LLView* view) const +{ + if (view->getName() == "groupnotify") + { + return TRUE ; + } + + return FALSE ; +} + -- cgit v1.1