diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llnotify.cpp | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index f703736..9e837a6 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2003&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2003-2008, Linden Research, Inc. | 7 | * Copyright (c) 2003-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -509,7 +509,7 @@ void LLNotifyBox::drawBackground() const | |||
509 | LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); | 509 | LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga"); |
510 | if (imagep) | 510 | if (imagep) |
511 | { | 511 | { |
512 | LLViewerImage::bindTexture(imagep->getImage()); | 512 | gGL.getTexUnit(0)->bind(imagep->getImage()); |
513 | // set proper background color depending on whether notify box is a caution or not | 513 | // set proper background color depending on whether notify box is a caution or not |
514 | LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); | 514 | LLColor4 color = mIsCaution? gColors.getColor("NotifyCautionBoxColor") : gColors.getColor("NotifyBoxColor"); |
515 | if(gFocusMgr.childHasKeyboardFocus( this )) | 515 | if(gFocusMgr.childHasKeyboardFocus( this )) |
@@ -971,10 +971,12 @@ LLNotifyBox * LLNotifyBoxView::getFirstNontipBox() const | |||
971 | iter++) | 971 | iter++) |
972 | { | 972 | { |
973 | // hack! *TODO: Integrate llnotify and llgroupnotify | 973 | // hack! *TODO: Integrate llnotify and llgroupnotify |
974 | LLView* view = *iter; | 974 | if(isGroupNotifyBox(*iter)) |
975 | if (view->getName() == "groupnotify") | 975 | { |
976 | continue; | 976 | continue; |
977 | LLNotifyBox* box = static_cast<LLNotifyBox*>(view); | 977 | } |
978 | |||
979 | LLNotifyBox* box = (LLNotifyBox*)(*iter); | ||
978 | if(!box->isTip() && !box->isDead()) | 980 | if(!box->isTip() && !box->isDead()) |
979 | { | 981 | { |
980 | return box; | 982 | return box; |
@@ -988,13 +990,23 @@ void LLNotifyBoxView::showOnly(LLView * view) | |||
988 | if(view) | 990 | if(view) |
989 | { | 991 | { |
990 | // assumes that the argument is actually a child | 992 | // assumes that the argument is actually a child |
991 | LLNotifyBox * shown = static_cast<LLNotifyBox*>(view); | 993 | LLNotifyBox * shown = dynamic_cast<LLNotifyBox*>(view); |
994 | if(!shown) | ||
995 | { | ||
996 | return ; | ||
997 | } | ||
998 | |||
992 | // make every other notification invisible | 999 | // make every other notification invisible |
993 | for(child_list_const_iter_t iter = getChildList()->begin(); | 1000 | for(child_list_const_iter_t iter = getChildList()->begin(); |
994 | iter != getChildList()->end(); | 1001 | iter != getChildList()->end(); |
995 | iter++) | 1002 | iter++) |
996 | { | 1003 | { |
997 | LLNotifyBox * box = static_cast<LLNotifyBox*>(*iter); | 1004 | if(isGroupNotifyBox(*iter)) |
1005 | { | ||
1006 | continue; | ||
1007 | } | ||
1008 | |||
1009 | LLNotifyBox * box = (LLNotifyBox*)(*iter); | ||
998 | if(box != view && box->getVisible() && !box->isTip()) | 1010 | if(box != view && box->getVisible() && !box->isTip()) |
999 | { | 1011 | { |
1000 | box->setVisible(FALSE); | 1012 | box->setVisible(FALSE); |
@@ -1014,6 +1026,11 @@ void LLNotifyBoxView::purgeMessagesMatching(const Matcher& matcher) | |||
1014 | iter != notification_queue.end(); | 1026 | iter != notification_queue.end(); |
1015 | iter++) | 1027 | iter++) |
1016 | { | 1028 | { |
1029 | if(isGroupNotifyBox(*iter)) | ||
1030 | { | ||
1031 | continue; | ||
1032 | } | ||
1033 | |||
1017 | LLNotifyBox* notification = (LLNotifyBox*)*iter; | 1034 | LLNotifyBox* notification = (LLNotifyBox*)*iter; |
1018 | if(matcher.matches(notification->getNotifyCallback(), notification->getUserData())) | 1035 | if(matcher.matches(notification->getNotifyCallback(), notification->getUserData())) |
1019 | { | 1036 | { |
@@ -1021,3 +1038,14 @@ void LLNotifyBoxView::purgeMessagesMatching(const Matcher& matcher) | |||
1021 | } | 1038 | } |
1022 | } | 1039 | } |
1023 | } | 1040 | } |
1041 | |||
1042 | bool LLNotifyBoxView::isGroupNotifyBox(const LLView* view) const | ||
1043 | { | ||
1044 | if (view->getName() == "groupnotify") | ||
1045 | { | ||
1046 | return TRUE ; | ||
1047 | } | ||
1048 | |||
1049 | return FALSE ; | ||
1050 | } | ||
1051 | |||