aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llnotify.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llnotify.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/newview/llnotify.cpp')
-rw-r--r--linden/indra/newview/llnotify.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp
index 7c206bb..92224b8 100644
--- a/linden/indra/newview/llnotify.cpp
+++ b/linden/indra/newview/llnotify.cpp
@@ -2,6 +2,8 @@
2 * @file llnotify.cpp 2 * @file llnotify.cpp
3 * @brief Non-blocking notification that doesn't take keyboard focus. 3 * @brief Non-blocking notification that doesn't take keyboard focus.
4 * 4 *
5 * $LicenseInfo:firstyear=2003&license=viewergpl$
6 *
5 * Copyright (c) 2003-2007, Linden Research, Inc. 7 * Copyright (c) 2003-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -584,11 +587,14 @@ void LLNotifyBox::moveToBack()
584 if (gNotifyBoxView->getChildCount() > 0) 587 if (gNotifyBoxView->getChildCount() > 0)
585 { 588 {
586 LLNotifyBox* front = gNotifyBoxView->getFirstNontipBox(); 589 LLNotifyBox* front = gNotifyBoxView->getFirstNontipBox();
587 gNotifyBoxView->showOnly(front); 590 if (front)
588 // assuming that moveToBack is only called by clicking the next button, 591 {
589 // we give focus to the next next button 592 gNotifyBoxView->showOnly(front);
590 front->mNextBtn->setFocus(TRUE); 593 // assuming that moveToBack is only called by clicking the next button,
591 gFocusMgr.triggerFocusFlash(); // TODO: it's ugly to call this here 594 // we give focus to the next next button
595 front->mNextBtn->setFocus(TRUE);
596 gFocusMgr.triggerFocusFlash(); // TODO: it's ugly to call this here
597 }
592 } 598 }
593 } 599 }
594} 600}
@@ -910,7 +916,7 @@ bool LLNotifyBox::parseNotify(const LLString& xml_filename)
910 } 916 }
911 } 917 }
912 918
913 //XUI:translate 919 //*TODO:translate
914 if (xml_template->mOptions.empty()) 920 if (xml_template->mOptions.empty())
915 { 921 {
916 xml_template->addOption("OK", FALSE); 922 xml_template->addOption("OK", FALSE);
@@ -927,12 +933,17 @@ LLNotifyBoxView::LLNotifyBoxView(const LLString& name, const LLRect& rect, BOOL
927 933
928LLNotifyBox * LLNotifyBoxView::getFirstNontipBox() const 934LLNotifyBox * LLNotifyBoxView::getFirstNontipBox() const
929{ 935{
936 // *TODO: Don't make assumptions like this!
930 // assumes every child is a notify box 937 // assumes every child is a notify box
931 for(child_list_const_iter_t iter = getChildList()->begin(); 938 for(child_list_const_iter_t iter = getChildList()->begin();
932 iter != getChildList()->end(); 939 iter != getChildList()->end();
933 iter++) 940 iter++)
934 { 941 {
935 LLNotifyBox * box = static_cast<LLNotifyBox*>(*iter); 942 // hack! *TODO: Integrate llnotify and llgroupnotify
943 LLView* view = *iter;
944 if (view->getName() == "groupnotify")
945 continue;
946 LLNotifyBox* box = static_cast<LLNotifyBox*>(view);
936 if(!box->isTip() && !box->isDead()) 947 if(!box->isTip() && !box->isDead())
937 { 948 {
938 return box; 949 return box;