From f9788fa6ce0196ffaba6cdcb0fda3ef5cbfe3265 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 5 Oct 2009 07:47:56 +0000 Subject: merge -r 1890-1893 https://svn.aws.productengine.com/secondlife/pe/stable-2 -> viewer-2.0.0-3 * Bugs: EXT-1217, EXT-1274, EXT-1272 * Dev: EXT-1101 --- indra/newview/llscreenchannel.cpp | 58 ++++++++++++++++++---- indra/newview/llsyswellwindow.cpp | 11 ++-- .../skins/default/xui/en/floater_camera.xml | 8 +-- .../skins/default/xui/en/floater_moveview.xml | 10 ++-- .../default/xui/en/panel_side_tray_tab_caption.xml | 3 +- 5 files changed, 66 insertions(+), 24 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 8a96a5a1ae..a72100a9b3 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -213,7 +213,7 @@ void LLScreenChannel::deleteToast(LLToast* toast) toast->mOnDeleteToastSignal(toast); // update channel's Hovering state - // turning hovering off mannualy because onMouseLeave won't happen if a toast was closed using a keyboard + // turning hovering off manually because onMouseLeave won't happen if a toast was closed using a keyboard if(toast->hasFocus()) setHovering(false); @@ -372,7 +372,8 @@ void LLScreenChannel::redrawToasts() void LLScreenChannel::showToastsBottom() { LLRect toast_rect; - S32 bottom = getRect().mBottom; + S32 bottom = getRect().mBottom - gFloaterView->getRect().mBottom; + S32 toast_margin = 0; std::vector::reverse_iterator it; for(it = mToastList.rbegin(); it != mToastList.rend(); ++it) @@ -380,19 +381,20 @@ void LLScreenChannel::showToastsBottom() if(it != mToastList.rbegin()) { bottom = (*(it-1)).toast->getRect().mTop; + toast_margin = gSavedSettings.getS32("ToastMargin"); } toast_rect = (*it).toast->getRect(); - toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setOriginAndSize(getRect().mLeft, bottom + toast_margin, toast_rect.getWidth() ,toast_rect.getHeight()); (*it).toast->setRect(toast_rect); - bool stop_showing_toasts = (*it).toast->getRect().mTop > getRect().getHeight(); + bool stop_showing_toasts = (*it).toast->getRect().mTop > getRect().mTop; if(!stop_showing_toasts) { if( it != mToastList.rend()-1) { - stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastMargin")) > getRect().getHeight(); + stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastMargin")) > getRect().mTop; } } @@ -477,6 +479,28 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) void LLScreenChannel::onOverflowToastHide() { mOverflowToastHidden = true; + + // remove all hidden toasts from channel and save interactive notifications + for(std::vector::iterator it = mToastList.begin(); it != mToastList.end();) + { + if(!(*it).toast->getVisible()) + { + if((*it).toast->getCanBeStored()) + { + storeToast((*it)); + } + else + { + deleteToast((*it).toast); + } + + it = mToastList.erase(it); + } + else + { + ++it; + } + } } //-------------------------------------------------------------------------- @@ -583,9 +607,7 @@ void LLScreenChannel::removeAndStoreAllStorableToasts() { if((*it).toast->getCanBeStored()) { - mStoredToastList.push_back(*it); - mOnStoreToast((*it).toast->getPanel(), (*it).id); - (*it).toast->stopTimer(); + storeToast(*(it)); it = mToastList.erase(it); } else @@ -664,14 +686,30 @@ void LLScreenChannel::updateShowToastsState() return; } - if(dynamic_cast(floater) || dynamic_cast(floater)) + // for IM floaters showed in a docked state - prohibit showing of ani toast + if(dynamic_cast(floater)) { setShowToasts(!(floater->getVisible() && floater->isDocked())); if (!getShowToasts()) { removeAndStoreAllStorableToasts(); } - + } + + // for Message Well floater showed in a docked state - adjust channel's height + if(dynamic_cast(floater)) + { + S32 channel_bottom = gViewerWindow->getWorldViewRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");; + LLRect this_rect = getRect(); + if(floater->getVisible() && floater->isDocked()) + { + channel_bottom += (floater->getRect().getHeight() + gSavedSettings.getS32("ToastMargin")); + } + + if(channel_bottom != this_rect.mBottom) + { + setRect(LLRect(this_rect.mLeft, this_rect.mTop, this_rect.mRight, channel_bottom)); + } } } diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 669d8d1d70..2bb1e80eb8 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -266,10 +266,6 @@ void LLSysWellWindow::toggleWindow() if(!getVisible()) { - if(mChannel) - { - mChannel->removeAndStoreAllStorableToasts(); - } if(isWindowEmpty()) { return; @@ -345,6 +341,13 @@ void LLSysWellWindow::reshapeWindow() curRect.setLeftTopAndSize(curRect.mLeft, newY, MIN_WINDOW_WIDTH, new_window_height); reshape(curRect.getWidth(), curRect.getHeight(), TRUE); setRect(curRect); + + // update notification channel state + // update on a window reshape is important only when a window is visible and docked + if(mChannel && getVisible() && isDocked()) + { + mChannel->updateShowToastsState(); + } } //--------------------------------------------------------------------------------- diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 0784b88944..c4a2654403 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -5,7 +5,7 @@ can_close="false" center_horiz="true" follows="top" - height="95" + height="110" layout="topleft" name="camera_floater" help_topic="camera_floater" @@ -26,7 +26,7 @@ -- cgit v1.2.3