diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llnotify.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index be1b378..f486ca5 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -47,6 +47,7 @@ | |||
47 | #include "llxmlnode.h" | 47 | #include "llxmlnode.h" |
48 | #include "llalertdialog.h" | 48 | #include "llalertdialog.h" |
49 | #include "llviewercontrol.h" | 49 | #include "llviewercontrol.h" |
50 | #include "llviewerdisplay.h" | ||
50 | #include "llviewerimagelist.h" | 51 | #include "llviewerimagelist.h" |
51 | #include "llfloaterchat.h" // for add_chat_history() | 52 | #include "llfloaterchat.h" // for add_chat_history() |
52 | #include "lloverlaybar.h" // for gOverlayBar | 53 | #include "lloverlaybar.h" // for gOverlayBar |
@@ -217,10 +218,9 @@ LLNotifyBox::LLNotifyBox(LLPointer<LLNotifyBoxTemplate> xml_template, const LLSt | |||
217 | // call to the c'tor, or it can be set implicitly if the | 218 | // call to the c'tor, or it can be set implicitly if the |
218 | // notify xml template specifies that it is a caution | 219 | // notify xml template specifies that it is a caution |
219 | // | 220 | // |
220 | // (but a tip-style notification cannot be a caution notification, | 221 | // tip-style notification handle 'caution' differently - |
221 | // since the rendering of the additional top textbox doesn't | 222 | // they display the tip in a different color |
222 | // account for the special layout of a tip notification) | 223 | mIsCaution = (xml_template->mIsCaution || is_caution); |
223 | mIsCaution = ((xml_template->mIsCaution | is_caution) && (!mIsTip)); | ||
224 | 224 | ||
225 | // Don't animate if behind other windows | 225 | // Don't animate if behind other windows |
226 | if( gNotifyBoxView->getChildCount() > 0 ) | 226 | if( gNotifyBoxView->getChildCount() > 0 ) |
@@ -269,7 +269,7 @@ LLNotifyBox::LLNotifyBox(LLPointer<LLNotifyBoxTemplate> xml_template, const LLSt | |||
269 | 269 | ||
270 | // add a caution textbox at the top of a caution notification | 270 | // add a caution textbox at the top of a caution notification |
271 | LLTextBox* caution_box = NULL; | 271 | LLTextBox* caution_box = NULL; |
272 | if (mIsCaution) | 272 | if (mIsCaution && !mIsTip) |
273 | { | 273 | { |
274 | S32 caution_height = ((S32)sFont->getLineHeight() * 2) + VPAD; | 274 | S32 caution_height = ((S32)sFont->getLineHeight() * 2) + VPAD; |
275 | caution_box = new LLTextBox( | 275 | caution_box = new LLTextBox( |
@@ -309,7 +309,7 @@ LLNotifyBox::LLNotifyBox(LLPointer<LLNotifyBoxTemplate> xml_template, const LLSt | |||
309 | sFont, | 309 | sFont, |
310 | FALSE); | 310 | FALSE); |
311 | text->setWordWrap(TRUE); | 311 | text->setWordWrap(TRUE); |
312 | text->setTakesFocus(FALSE); | 312 | text->setTabStop(FALSE); |
313 | text->setMouseOpaque(FALSE); | 313 | text->setMouseOpaque(FALSE); |
314 | text->setBorderVisible(FALSE); | 314 | text->setBorderVisible(FALSE); |
315 | text->setTakesNonScrollClicks(FALSE); | 315 | text->setTakesNonScrollClicks(FALSE); |
@@ -427,6 +427,11 @@ BOOL LLNotifyBox::handleMouseUp(S32 x, S32 y, MASK mask) | |||
427 | { | 427 | { |
428 | if (mIsTip) | 428 | if (mIsTip) |
429 | { | 429 | { |
430 | if (mBehavior->mCallback) | ||
431 | { | ||
432 | mBehavior->mCallback(0, mBehavior->mData); | ||
433 | mBehavior->mCallback = NULL; // Notification callbacks only expect to be called once ever | ||
434 | } | ||
430 | close(); | 435 | close(); |
431 | return TRUE; | 436 | return TRUE; |
432 | } | 437 | } |
@@ -452,6 +457,16 @@ BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) | |||
452 | // virtual | 457 | // virtual |
453 | void LLNotifyBox::draw() | 458 | void LLNotifyBox::draw() |
454 | { | 459 | { |
460 | // If we are teleporting, stop the timer and restart it when the teleporting completes | ||
461 | if (gTeleportDisplay) | ||
462 | { | ||
463 | mEventTimer.stop(); | ||
464 | } | ||
465 | else if (!mEventTimer.getStarted()) | ||
466 | { | ||
467 | mEventTimer.start(); | ||
468 | } | ||
469 | |||
455 | F32 display_time = mAnimateTimer.getElapsedTimeF32(); | 470 | F32 display_time = mAnimateTimer.getElapsedTimeF32(); |
456 | 471 | ||
457 | if (mAnimating && display_time < ANIMATION_TIME) | 472 | if (mAnimating && display_time < ANIMATION_TIME) |
@@ -717,7 +732,7 @@ LLRect LLNotifyBox::getNotifyTipRect(const LLString &utf8message) | |||
717 | S32 notify_height = llceil((F32) (line_count+1) * sFont->getLineHeight()); | 732 | S32 notify_height = llceil((F32) (line_count+1) * sFont->getLineHeight()); |
718 | if(gOverlayBar) | 733 | if(gOverlayBar) |
719 | { | 734 | { |
720 | notify_height += gOverlayBar->getRect().getHeight(); | 735 | notify_height += gOverlayBar->getBoundingRect().mTop; |
721 | } | 736 | } |
722 | else | 737 | else |
723 | { | 738 | { |