summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-05 07:47:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-05 07:47:56 +0000
commitf9788fa6ce0196ffaba6cdcb0fda3ef5cbfe3265 (patch)
tree7e9986aa1f645883bfeda4e64e90e3876849cba9 /indra/newview
parent2451b82d8ac45c12f4b3ba821ca102cdfbecf36c (diff)
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
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llscreenchannel.cpp58
-rw-r--r--indra/newview/llsyswellwindow.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml3
5 files changed, 66 insertions, 24 deletions
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<ToastElem>::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<ToastElem>::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<LLIMFloater*>(floater) || dynamic_cast<LLSysWellWindow*>(floater))
+ // for IM floaters showed in a docked state - prohibit showing of ani toast
+ if(dynamic_cast<LLIMFloater*>(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<LLSysWellWindow*>(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 @@
</floater.string>
<panel
border="true"
- height="64"
+ height="79"
layout="topleft"
left="0"
top="0"
@@ -46,7 +46,7 @@
scale_image="false"
sound_flags="3"
tool_tip="Orbit Camera Around Focus"
- top="0"
+ top="15"
width="64" />
<joystick_track
follows="top|left"
@@ -61,7 +61,7 @@
scale_image="false"
sound_flags="3"
tool_tip="Move Camera Up and Down, Left and Right"
- top="0"
+ top="15"
visible="false"
width="64" />
<joystick_zoom
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 82acea47be..65235da8d5 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -5,7 +5,7 @@
can_minimize="false"
center_horiz="true"
follows="bottom"
- height="95"
+ height="110"
layout="topleft"
name="move_floater"
help_topic="move_floater"
@@ -38,7 +38,7 @@
</string>
<panel
border="true"
- height="70"
+ height="83"
follows="left|top"
layout="topleft"
left="0"
@@ -57,7 +57,7 @@
picture_style="true"
scale_image="false"
tool_tip="Turn Left (press Left Arrow or A)"
- top="35"
+ top="45"
width="25" />
<button
follows="left|bottom"
@@ -83,7 +83,7 @@
picture_style="true"
scale_image="false"
tool_tip="Fly Up, Press &quot;E&quot;"
- top="4"
+ top="14"
width="25" />
<button
follows="left|bottom"
@@ -130,7 +130,7 @@
<!-- Width and height of this panel should be synchronized with panel_stand_stop_flying.xml -->
<panel
border="true"
- height="25"
+ height="27"
layout="topleft"
left="0"
name="panel_modes"
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
index aa76a61c15..3b1b049ff2 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml
@@ -28,7 +28,8 @@
name="show_help"
top="5"
right="-8"
- width="28">
+ width="28"
+ tool_tip="Show Help">
<button.commit_callback
function="Button.ShowHelp" />
</button>