diff options
Diffstat (limited to 'linden/indra/newview/llnotify.cpp')
-rw-r--r-- | linden/indra/newview/llnotify.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
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 | |||
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 | |||