Work on normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well)
Refactored toggle interaction between Notification Well and Notification Well Window: -- set "Button.SetDockableFloaterToggle" init callback to Notification Well -- remove deprecated functionality in code -- update interaction with screen channels to work properly. --HG-- branch : product-enginemaster
parent
22303da8a6
commit
653ebfbe7c
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue