summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llbottomtray.cpp4
-rw-r--r--indra/newview/llsyswellwindow.cpp70
-rw-r--r--indra/newview/llsyswellwindow.h9
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml7
5 files changed, 33 insertions, 64 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 002af391a6..d80aa66257 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -70,10 +70,6 @@ LLBottomTray::LLBottomTray(const LLSD&)
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
mNotificationWell = getChild<LLNotificationChiclet>("notification_well");
- // init mNotificationWell
- // set handler for a Click operation
- mNotificationWell->setClickCallback(boost::bind(&LLNotificationWellWindow::onChicletClick, LLNotificationWellWindow::getInstance()));
-
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2));
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 6852cd78f9..6b7c4049f4 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -90,12 +90,6 @@ BOOL LLSysWellWindow::postBuild()
//---------------------------------------------------------------------------------
void LLSysWellWindow::setMinimized(BOOL minimize)
{
- // we don't show empty Message Well window
- if (!minimize && isWindowEmpty())
- {
- return;
- }
-
LLDockableFloater::setMinimized(minimize);
}
@@ -117,11 +111,12 @@ void LLSysWellWindow::connectListUpdaterToSignal(std::string notification_type)
//---------------------------------------------------------------------------------
void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask)
{
- onChicletClick();
+ // just set floater visible. Screen channels will be cleared.
+ setVisible(TRUE);
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::onChicletClick()
+void LLSysWellWindow::clearScreenChannels()
{
// 1 - remove StartUp toast and channel if present
if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown())
@@ -129,8 +124,11 @@ void LLSysWellWindow::onChicletClick()
LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose();
}
- // 2 - toggle instance of SysWell's chiclet-window
- toggleWindow();
+ // 2 - remove toasts in Notification channel
+ if(mChannel)
+ {
+ mChannel->removeAndStoreAllStorableToasts();
+ }
}
//---------------------------------------------------------------------------------
@@ -243,57 +241,27 @@ void LLSysWellWindow::getAllowedRect(LLRect& rect)
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::toggleWindow()
-{
- if (getDockControl() == NULL)
- {
- setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getSysWell(), this,
- getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
- }
-
- if(!getVisible() || isMinimized())
- {
- if(mChannel)
- {
- mChannel->removeAndStoreAllStorableToasts();
- }
- if(isWindowEmpty())
- {
- return;
- }
- setVisible(TRUE);
- }
- else if (isDocked())
- {
- setVisible(FALSE);
- }
- else if(!isDocked())
- {
- // bring to front undocked floater
- setVisible(TRUE);
- }
-}
//---------------------------------------------------------------------------------
void LLSysWellWindow::setVisible(BOOL visible)
{
- if(visible)
+ if (visible)
{
- if (LLBottomTray::instanceExists())
+ if (NULL == getDockControl() && getDockTongue().notNull())
{
- LLBottomTray::getInstance()->getSysWell()->setToggleState(TRUE);
- }
- }
- else
- {
- if (LLBottomTray::instanceExists())
- {
- LLBottomTray::getInstance()->getSysWell()->setToggleState(FALSE);
+ setDockControl(new LLDockControl(
+ LLBottomTray::getInstance()->getSysWell(), this,
+ getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
}
+
+ // when Notification channel is cleared, storable toasts will be added into the list.
+ clearScreenChannels();
}
+ // do not show empty window
+ if (NULL == mMessageList || isWindowEmpty()) visible = FALSE;
+
LLDockableFloater::setVisible(visible);
// update notification channel state
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index fe0ac4b740..04596c0622 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -66,8 +66,6 @@ public:
// Operating with outfit
virtual void setVisible(BOOL visible);
void adjustWindowPosition();
- void toggleWindow();
- /*virtual*/ BOOL canClose() { return FALSE; }
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
// override LLFloater's minimization according to EXT-1216
/*virtual*/ void setMinimized(BOOL minimize);
@@ -76,7 +74,7 @@ public:
void onItemClick(LLSysWellItem* item);
void onItemClose(LLSysWellItem* item);
void onStoreToast(LLPanel* info_panel, LLUUID id);
- void onChicletClick();
+ void clearScreenChannels();
void onStartUpToastClick(S32 x, S32 y, MASK mask);
// size constants for the window and for its elements
@@ -154,11 +152,14 @@ private:
*
* It contains a list of notifications that have not been responded to.
*/
-class LLNotificationWellWindow : public LLSysWellWindow
+class LLNotificationWellWindow : public LLSysWellWindow, public LLInitClass<LLNotificationWellWindow>
{
public:
LLNotificationWellWindow(const LLSD& key);
static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD());
+
+ static void initClass() { getInstance(); }
+
};
/**
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
index be6d63716c..4e9388c2b2 100644
--- a/indra/newview/skins/default/xui/en/floater_sys_well.xml
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -6,19 +6,20 @@
top="0"
follows="right|bottom"
layout="topleft"
- name="notification_chiclet"
+ name="sys_well_window"
help_topic="notification_chiclet"
save_rect="true"
title="NOTIFICATIONS"
width="320"
min_width="320"
height="23"
- can_minimize="true"
+ can_minimize="false"
can_tear_off="false"
can_resize="true"
can_drag_on_left="false"
- can_close="false"
can_dock="true"
+ save_visibility="true"
+ single_instance="true"
>
<flat_list_view
color="FloaterDefaultBackgroundColor"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 9679d22e70..621dbdec61 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -346,8 +346,11 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
image_overlay_alignment="right"
pad_right="6"
pad_left="6"
- width="54"
- />
+ width="54" >
+ <button.init_callback
+ function="Button.SetDockableFloaterToggle"
+ parameter="notification_well_window" />
+ </button>
</chiclet_notification>
</layout_panel>
<icon